From owner-svn-src-all@freebsd.org Sun Mar 10 00:56:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B27B153E977; Sun, 10 Mar 2019 00:56:39 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C6C7B83450; Sun, 10 Mar 2019 00:56:38 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B78651B468; Sun, 10 Mar 2019 00:56:38 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2A0ucDh013393; Sun, 10 Mar 2019 00:56:38 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2A0ucCT013392; Sun, 10 Mar 2019 00:56:38 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201903100056.x2A0ucCT013392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 10 Mar 2019 00:56:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344974 - stable/12/sys/netpfil/pf X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/12/sys/netpfil/pf X-SVN-Commit-Revision: 344974 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C6C7B83450 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 00:56:39 -0000 Author: kp Date: Sun Mar 10 00:56:38 2019 New Revision: 344974 URL: https://svnweb.freebsd.org/changeset/base/344974 Log: pf: Small performance tweak Because fetching a counter is a rather expansive function we should use counter_u64_fetch() in pf_state_expires() only when necessary. A "rdr pass" rule should not cause more effort than separate "rdr" and "pass" rules. For rules with adaptive timeout values the call of counter_u64_fetch() should be accepted, but otherwise not. From the man page: The adaptive timeout values can be defined both globally and for each rule. When used on a per-rule basis, the values relate to the number of states created by the rule, otherwise to the total number of states. This handling of adaptive timeouts is done in pf_state_expires(). The calculation needs three values: start, end and states. 1. Normal rules "pass .." without adaptive setting meaning "start = 0" runs in the else-section and therefore takes "start" and "end" from the global default settings and sets "states" to pf_status.states (= total number of states). 2. Special rules like "pass .. keep state (adaptive.start 500 adaptive.end 1000)" have start != 0, run in the if-section and take "start" and "end" from the rule and set "states" to the number of states created by their rule using counter_u64_fetch(). Thats all ok, but there is a third case without special handling in the above code snippet: 3. All "rdr/nat pass .." statements use together the pf_default_rule. Therefore we have "start != 0" in this case and we run the if-section but we better should run the else-section in this case and do not fetch the counter of the pf_default_rule but take the total number of states. Submitted by: Andreas Longwitz Modified: stable/12/sys/netpfil/pf/pf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/pf/pf.c ============================================================================== --- stable/12/sys/netpfil/pf/pf.c Sat Mar 9 21:09:44 2019 (r344973) +++ stable/12/sys/netpfil/pf/pf.c Sun Mar 10 00:56:38 2019 (r344974) @@ -1564,7 +1564,7 @@ pf_state_expires(const struct pf_state *state) if (!timeout) timeout = V_pf_default_rule.timeout[state->timeout]; start = state->rule.ptr->timeout[PFTM_ADAPTIVE_START]; - if (start) { + if (start && state->rule.ptr != &V_pf_default_rule) { end = state->rule.ptr->timeout[PFTM_ADAPTIVE_END]; states = counter_u64_fetch(state->rule.ptr->states_cur); } else { From owner-svn-src-all@freebsd.org Sun Mar 10 00:56:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41C6C153E97D; Sun, 10 Mar 2019 00:56:40 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D945C83451; Sun, 10 Mar 2019 00:56:39 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CEB651B469; Sun, 10 Mar 2019 00:56:39 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2A0udmO013437; Sun, 10 Mar 2019 00:56:39 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2A0ud2j013436; Sun, 10 Mar 2019 00:56:39 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201903100056.x2A0ud2j013436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 10 Mar 2019 00:56: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: r344975 - stable/11/sys/netpfil/pf X-SVN-Group: stable-11 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/11/sys/netpfil/pf X-SVN-Commit-Revision: 344975 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D945C83451 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 00:56:40 -0000 Author: kp Date: Sun Mar 10 00:56:39 2019 New Revision: 344975 URL: https://svnweb.freebsd.org/changeset/base/344975 Log: pf: Small performance tweak Because fetching a counter is a rather expansive function we should use counter_u64_fetch() in pf_state_expires() only when necessary. A "rdr pass" rule should not cause more effort than separate "rdr" and "pass" rules. For rules with adaptive timeout values the call of counter_u64_fetch() should be accepted, but otherwise not. From the man page: The adaptive timeout values can be defined both globally and for each rule. When used on a per-rule basis, the values relate to the number of states created by the rule, otherwise to the total number of states. This handling of adaptive timeouts is done in pf_state_expires(). The calculation needs three values: start, end and states. 1. Normal rules "pass .." without adaptive setting meaning "start = 0" runs in the else-section and therefore takes "start" and "end" from the global default settings and sets "states" to pf_status.states (= total number of states). 2. Special rules like "pass .. keep state (adaptive.start 500 adaptive.end 1000)" have start != 0, run in the if-section and take "start" and "end" from the rule and set "states" to the number of states created by their rule using counter_u64_fetch(). Thats all ok, but there is a third case without special handling in the above code snippet: 3. All "rdr/nat pass .." statements use together the pf_default_rule. Therefore we have "start != 0" in this case and we run the if-section but we better should run the else-section in this case and do not fetch the counter of the pf_default_rule but take the total number of states. Submitted by: Andreas Longwitz Modified: stable/11/sys/netpfil/pf/pf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/pf/pf.c ============================================================================== --- stable/11/sys/netpfil/pf/pf.c Sun Mar 10 00:56:38 2019 (r344974) +++ stable/11/sys/netpfil/pf/pf.c Sun Mar 10 00:56:39 2019 (r344975) @@ -1548,7 +1548,7 @@ pf_state_expires(const struct pf_state *state) if (!timeout) timeout = V_pf_default_rule.timeout[state->timeout]; start = state->rule.ptr->timeout[PFTM_ADAPTIVE_START]; - if (start) { + if (start && state->rule.ptr != &V_pf_default_rule) { end = state->rule.ptr->timeout[PFTM_ADAPTIVE_END]; states = counter_u64_fetch(state->rule.ptr->states_cur); } else { From owner-svn-src-all@freebsd.org Sun Mar 10 04:41:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F44215236BB; Sun, 10 Mar 2019 04:41:31 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 39C758B9CA; Sun, 10 Mar 2019 04:41:31 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2F1341DFC9; Sun, 10 Mar 2019 04:41:31 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2A4fVIY029770; Sun, 10 Mar 2019 04:41:31 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2A4fVGk029769; Sun, 10 Mar 2019 04:41:31 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201903100441.x2A4fVGk029769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 10 Mar 2019 04:41:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344976 - stable/12/sys/netpfil/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/12/sys/netpfil/ipfw X-SVN-Commit-Revision: 344976 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 39C758B9CA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.92 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.92)[-0.921,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 04:41:31 -0000 Author: ae Date: Sun Mar 10 04:41:30 2019 New Revision: 344976 URL: https://svnweb.freebsd.org/changeset/base/344976 Log: MFC r344870: Fix the problem with O_LIMIT states introduced in r344018. dyn_install_state() uses `rule` pointer when it creates state. For O_LIMIT states this pointer actually is not struct ip_fw, it is pointer to O_LIMIT_PARENT state, that keeps actual pointer to ip_fw parent rule. Thus we need to cache rule id and number before calling dyn_get_parent_state(), so we can use them later when the `rule` pointer is overrided. PR: 236292 Modified: stable/12/sys/netpfil/ipfw/ip_fw_dynamic.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/ipfw/ip_fw_dynamic.c ============================================================================== --- stable/12/sys/netpfil/ipfw/ip_fw_dynamic.c Sun Mar 10 00:56:39 2019 (r344975) +++ stable/12/sys/netpfil/ipfw/ip_fw_dynamic.c Sun Mar 10 04:41:30 2019 (r344976) @@ -1869,11 +1869,13 @@ dyn_install_state(const struct ipfw_flow_id *pkt, uint uint16_t kidx, uint8_t type) { struct ipfw_flow_id id; - uint32_t hashval, parent_hashval; + uint32_t hashval, parent_hashval, ruleid, rulenum; int ret; MPASS(type == O_LIMIT || type == O_KEEP_STATE); + ruleid = rule->id; + rulenum = rule->rulenum; if (type == O_LIMIT) { /* Create masked flow id and calculate bucket */ id.addr_type = pkt->addr_type; @@ -1928,11 +1930,11 @@ dyn_install_state(const struct ipfw_flow_id *pkt, uint hashval = hash_packet(pkt); if (IS_IP4_FLOW_ID(pkt)) - ret = dyn_add_ipv4_state(rule, rule->id, rule->rulenum, pkt, + ret = dyn_add_ipv4_state(rule, ruleid, rulenum, pkt, ulp, pktlen, hashval, info, fibnum, kidx, type); #ifdef INET6 else if (IS_IP6_FLOW_ID(pkt)) - ret = dyn_add_ipv6_state(rule, rule->id, rule->rulenum, pkt, + ret = dyn_add_ipv6_state(rule, ruleid, rulenum, pkt, zoneid, ulp, pktlen, hashval, info, fibnum, kidx, type); #endif /* INET6 */ else From owner-svn-src-all@freebsd.org Sun Mar 10 09:34:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FF18152D256; Sun, 10 Mar 2019 09:34:38 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F3B2D6DA47; Sun, 10 Mar 2019 09:34:37 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id CE277942B; Sun, 10 Mar 2019 09:34:37 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [10.0.2.193] (ptr-8rh08jyp2rmld95bwel.18120a2.ip6.access.telenet.be [IPv6:2a02:1811:240e:402:2980:fc78:46a9:71cd]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id A47FC1B4D1; Sun, 10 Mar 2019 10:34:35 +0100 (CET) From: "Kristof Provost" To: "Harry Schmalzbauer" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: Re: svn commit: r344974 - stable/12/sys/netpfil/pf Date: Sun, 10 Mar 2019 10:34:34 +0100 X-Mailer: MailMate (2.0BETAr6135) Message-ID: <8C805FB7-AE8B-4FF9-82E6-EA406C3B07BE@FreeBSD.org> In-Reply-To: <7bdf4d3c-61b3-4319-d5b7-5234991fad78@omnilan.de> References: <201903100056.x2A0ucCT013392@repo.freebsd.org> <7bdf4d3c-61b3-4319-d5b7-5234991fad78@omnilan.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: F3B2D6DA47 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset=utf-8; format=flowed; markup=markdown Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 09:34:38 -0000 On 10 Mar 2019, at 10:16, Harry Schmalzbauer wrote: > Am 10.03.2019 um 01:56 schrieb Kristof Provost: >> Author: kp >> Date: Sun Mar 10 00:56:38 2019 >> New Revision: 344974 >> URL: https://svnweb.freebsd.org/changeset/base/344974 >> >> Log: >> pf: Small performance tweak > > Seems to be the MFC of 344493. > Indeed, apologies for missing out the MFC tag here. That’ll teach me to sleep before I commit, rather than after. > Out of curiosity, do you have to manually write these log messages > each time?  > Yes. I should see about scripting these MFCs someday, to avoid silly mistakes like this. Regards, Kristof From owner-svn-src-all@freebsd.org Sun Mar 10 09:16:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FF10152CB59; Sun, 10 Mar 2019 09:16:22 +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 C30EE6D070; Sun, 10 Mar 2019 09:16:21 +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 x2A9GIe1030440; Sun, 10 Mar 2019 10:16:18 +0100 (CET) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id 1BB54DA0; Sun, 10 Mar 2019 10:16:18 +0100 (CET) Subject: Re: svn commit: r344974 - stable/12/sys/netpfil/pf To: Kristof Provost , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org References: <201903100056.x2A0ucCT013392@repo.freebsd.org> From: Harry Schmalzbauer Organization: OmniLAN Message-ID: <7bdf4d3c-61b3-4319-d5b7-5234991fad78@omnilan.de> Date: Sun, 10 Mar 2019 10:16:17 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <201903100056.x2A0ucCT013392@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Greylist: ACL 130 matched, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [78.138.80.130]); Sun, 10 Mar 2019 10:16:18 +0100 (CET) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: 78.138.80.135; Sender-helo: mh0.gentlemail.de; ) X-Rspamd-Queue-Id: C30EE6D070 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 09:16:22 -0000 Am 10.03.2019 um 01:56 schrieb Kristof Provost: > Author: kp > Date: Sun Mar 10 00:56:38 2019 > New Revision: 344974 > URL: https://svnweb.freebsd.org/changeset/base/344974 > > Log: > pf: Small performance tweak Seems to be the MFC of 344493. Out of curiosity, do you have to manually write these log messages each time?  I do my local svn commits with ' -m "A one liner since svn and me never beacem good friends, especailly if it's about log view/search"...  I saw the FreeBSD provided templates, but since my skills and time won't allow me to advance to commiting anything, I haven't had a closer look. Thanks, -harry From owner-svn-src-all@freebsd.org Sun Mar 10 15:39:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BAF815375B3 for ; Sun, 10 Mar 2019 15:39:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F8BF821BE for ; Sun, 10 Mar 2019 15:39:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x831.google.com with SMTP id d16so2428403qtn.10 for ; Sun, 10 Mar 2019 08:39:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nvJyhHZ/w78LGkLYjLVCVOHai19jxzMWylihSgBN7YY=; b=rkXuEZkfQDtzmn9A9mspu8kyD5oZPWCxZeScCe2ykctpXRzeDO3ZK5wilESR0XHyPF 1+VW53wjepYC0jxKvibIP134EPWkhCVTdWf1HjBj8aIuCscHCSSKSsLrVws/QFuOdMpm UdfdIGs1mGfNdTzYNdUFMCWL5XV1K14xWaFiADUpCTdYOP5lzFQ6jrxVEQRwM6fXTVJV bjjEjROYsd2VjlXRyVeJn1Y4+0TRllQn9e4YpGYyIugwrkOxduffygb3VJ1dazBY9DLO OI2bCz6ziFxiwBawTg65v6R//kzZWaDzvc7wW+mSUCuFbgSQR1pH6guX4H/m3kl7ND1d Y6Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nvJyhHZ/w78LGkLYjLVCVOHai19jxzMWylihSgBN7YY=; b=TmCSFmjsxl2dPvaAFh56OSOHSkHISRWKaktMrJwfnRQjJg1Fptd6OVUbfictmSIVSG Q2oMg0gmRWblqqydVL4e3uE/Dz34OIi/i0iXs6X3v2UueCC6+EH7wcWGSkL7344EToaR VE5GD8k8FZr/3DGTTVGhLfaJK+nFmbd5hZT/ghLCe//SzkTvv3F9rvu1eYYRFAWP3Knt Tm1NoYFh//rYZcHaLvYmM2kNzeepke0QmW+5fSET3NFWCLGTcOerMewvvwzv3YQEgeCp 7EkmlaeDi/PZf6hbgktPZla/Q40o3Y19OFWovUdvFi6d7iKJs0xdmXFbOpCoIweEZGm4 dr8A== X-Gm-Message-State: APjAAAX8N18/9BXEo5v9EV7rzwePYS/eOkc3KDfi7IG7HY6GAh93N2nA JB1wsACLjdLX/KR/qaTXG5N663tcPDTpCm5sXxuES9oM X-Google-Smtp-Source: APXvYqyCvY0gsUw/EAgr6EXeSTA6SSiwPp7s787rvkgzQ4i4a4iEpB2QoTUSJE850zrdqy596cj7au4/Okik+OrJh9k= X-Received: by 2002:ac8:3616:: with SMTP id m22mr10807872qtb.15.1552232345621; Sun, 10 Mar 2019 08:39:05 -0700 (PDT) MIME-Version: 1.0 References: <201903091717.x29HHjcc069618@repo.freebsd.org> <201903092000.x29K0Rf6002120@gndrsh.dnsmgr.net> <20190310150728.GA97029@FreeBSD.org> In-Reply-To: <20190310150728.GA97029@FreeBSD.org> From: Warner Losh Date: Sun, 10 Mar 2019 09:38:53 -0600 Message-ID: Subject: Re: svn commit: r344970 - head To: Alexey Dokuchaev Cc: "Rodney W. Grimes" , Warner Losh , svn-src-head , svn-src-all , src-committers X-Rspamd-Queue-Id: 6F8BF821BE X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=rkXuEZkf X-Spamd-Result: default: False [-4.71 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[1]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: ALT1.aspmx.l.google.com]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[1.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.93)[-0.930,0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; IP_SCORE(-2.77)[ip: (-9.00), ipnet: 2607:f8b0::/32(-2.73), asn: 15169(-2.06), country: US(-0.07)]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 15:39:07 -0000 On Sun, Mar 10, 2019 at 9:07 AM Alexey Dokuchaev wrote: > On Sat, Mar 09, 2019 at 12:00:27PM -0800, Rodney W. Grimes wrote: > > > New Revision: 344970 > > > URL: https://svnweb.freebsd.org/changeset/base/344970 > > > > > > Log: > > > Misc fixes based on upgrading a laptop from 11.1R to -current > > > > > > Add note about needing to start zfs because mount -a doesn't do that. > > > Add the word 'supported' before 'older branches' for older binaries. > > > Add note about options in custom config files as well. > > > > > > Modified: head/UPDATING > > > ... > > > binaries). Failure to do so may leave you with a system that is > > > hard to boot to recover. A GENERIC kernel will include suitable > > > - compatibility options to run binaries from older branches. > > > + compatibility options to run binaries from supported older > branches. > > > > This is probably not the best adjective here, supported only goes back to > > 11.x, there are COMPAT options that work all the way back to 4. > > I concur, this "supported" word sounds like we barely give a fuck. Being > able to run old (very old) binaries had always been one of our strengths, > and we should not suggest that it's not anymore. > It isn't saying we don't support older binaries. It sets the limits on what people can expect from GENERIC in this context. We may remove support for 4.x binaries from GENERIC at some later time, we may keep it. Either way, it doesn't affect upgrading. Part of the minimum upgrading guarantee is that we have old binary support in GENERIC for all branches we support upgrading from. We can (and do) support additional binaries, and having the clarification here doesn't change that. Warner From owner-svn-src-all@freebsd.org Sun Mar 10 18:48:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 031D0153D287; Sun, 10 Mar 2019 18:48:10 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9BEAD88FF1; Sun, 10 Mar 2019 18:48:09 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7F7FA272AA; Sun, 10 Mar 2019 18:48:09 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2AIm95G082208; Sun, 10 Mar 2019 18:48:09 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2AIm9hP082206; Sun, 10 Mar 2019 18:48:09 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201903101848.x2AIm9hP082206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 10 Mar 2019 18:48:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r344981 - head/sys/dev/flash X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/flash X-SVN-Commit-Revision: 344981 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9BEAD88FF1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 18:48:10 -0000 Author: ian Date: Sun Mar 10 18:48:08 2019 New Revision: 344981 URL: https://svnweb.freebsd.org/changeset/base/344981 Log: Give the mx25l device sole ownership of the name /dev/flash/spi* instead of trying to use disk_add_alias() to make spi* an alias for mx25l*. It turns out disk_add_alias() works for partitions, but not slices, and that's hard to fix. This change is, in effect, a partial revert of r344526. The mips world relies on the existence of flashmap names formatted as /dev/flash/spi0s.name, whereas pretty much nothing relies on at45d devices using the /dev/spi* names (because until recently the at45d driver didn't even work reliably). So this change makes mx25l devices the sole owner of the /dev/flash/spi* namespace, which actually makes some sense because it is a SpiFlash(tm) device, so flash/spi isn't a horrible name. Reported by: Mori Hiroki Modified: head/sys/dev/flash/at45d.c head/sys/dev/flash/mx25l.c Modified: head/sys/dev/flash/at45d.c ============================================================================== --- head/sys/dev/flash/at45d.c Sun Mar 10 17:20:09 2019 (r344980) +++ head/sys/dev/flash/at45d.c Sun Mar 10 18:48:08 2019 (r344981) @@ -381,7 +381,6 @@ at45d_delayed_attach(void *xsc) sc->disk->d_mediasize = pagesize * ident->pagecount; sc->disk->d_unit = device_get_unit(sc->dev); disk_create(sc->disk, DISK_VERSION); - disk_add_alias(sc->disk, "flash/spi"); bioq_init(&sc->bio_queue); kproc_create(&at45d_task, sc, &sc->p, 0, 0, "task: at45d flash"); sc->taskstate = TSTATE_RUNNING; Modified: head/sys/dev/flash/mx25l.c ============================================================================== --- head/sys/dev/flash/mx25l.c Sun Mar 10 17:20:09 2019 (r344980) +++ head/sys/dev/flash/mx25l.c Sun Mar 10 18:48:08 2019 (r344981) @@ -510,7 +510,7 @@ mx25l_attach(device_t dev) sc->sc_disk->d_strategy = mx25l_strategy; sc->sc_disk->d_getattr = mx25l_getattr; sc->sc_disk->d_ioctl = mx25l_ioctl; - sc->sc_disk->d_name = "flash/mx25l"; + sc->sc_disk->d_name = "flash/spi"; sc->sc_disk->d_drv1 = sc; sc->sc_disk->d_maxsize = DFLTPHYS; sc->sc_disk->d_sectorsize = MX25L_SECTORSIZE; @@ -522,7 +522,6 @@ mx25l_attach(device_t dev) sizeof(sc->sc_disk->d_descr)); disk_create(sc->sc_disk, DISK_VERSION); - disk_add_alias(sc->sc_disk, "flash/spi"); bioq_init(&sc->sc_bio_queue); kproc_create(&mx25l_task, sc, &sc->sc_p, 0, 0, "task: mx25l flash"); From owner-svn-src-all@freebsd.org Sun Mar 10 15:11:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 716F4153680D; Sun, 10 Mar 2019 15:11:41 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 154DD8120A; Sun, 10 Mar 2019 15:11:41 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 051411A33D; Sun, 10 Mar 2019 15:11:41 +0000 (UTC) Date: Sun, 10 Mar 2019 15:11:40 +0000 From: Alexey Dokuchaev To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r344648 - in head: . sys/kern sys/sys Message-ID: <20190310151140.GB97029@FreeBSD.org> References: <201902272256.x1RMutdK085216@repo.freebsd.org> <20190228074750.GA35369@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190228074750.GA35369@FreeBSD.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 154DD8120A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.90 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.91)[-0.907,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.997,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 15:11:41 -0000 On Thu, Feb 28, 2019 at 07:47:51AM +0000, Alexey Dokuchaev wrote: > On Wed, Feb 27, 2019 at 10:56:55PM +0000, Mateusz Guzik wrote: > > New Revision: 344648 > > URL: https://svnweb.freebsd.org/changeset/base/344648 > > > > Log: > > Rename seq to seqc to avoid namespace clashes with Linux > > > > ... > > Added: > > head/sys/sys/seqc.h (contents, props changed) > > Deleted: > > head/sys/sys/seq.h > > Why it was deleted and added as new file instead of being repocopied? Retransmit. ./danfe From owner-svn-src-all@freebsd.org Sun Mar 10 16:14:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFC6915387BE; Sun, 10 Mar 2019 16:14:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9716983600; Sun, 10 Mar 2019 16:14:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A4D5258F2; Sun, 10 Mar 2019 16:14:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2AGEhKn002153; Sun, 10 Mar 2019 16:14:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2AGEhZ7002151; Sun, 10 Mar 2019 16:14:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201903101614.x2AGEhZ7002151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Sun, 10 Mar 2019 16:14:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344978 - stable/12/lib/libc/tests/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/12/lib/libc/tests/sys X-SVN-Commit-Revision: 344978 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9716983600 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 16:14:44 -0000 Author: ngie Date: Sun Mar 10 16:14:42 2019 New Revision: 344978 URL: https://svnweb.freebsd.org/changeset/base/344978 Log: MFC r343362,r343365,r343367,r343368,r343461,r343751,r344310: r343362: Add [initial] functional tests for sendfile(2) as lib/libc/sys/sendfile These testcases exercise a number of functional requirements for sendfile(2). The testcases use IPv4 and IPv6 domain sockets with TCP, and were confirmed functional on UFS and ZFS. UDP address family sockets cannot be used per the sendfile(2) contract, thus using UDP sockets is outside the scope of testing the syscall in positive cases. As seen in `:s_negative_udp_socket_test`, UDP is used to test the sendfile(2) contract to ensure that EINVAL is returned by sendfile(2). The testcases added explicitly avoid testing out `SF_SYNC` due to the complexity of verifying that support. However, this is a good next logical item to verify. The `hdtr_positive*` testcases work to a certain degree (the header testcases pass), but the trailer testcases do not work (it is an expected failure). In particular, the value received by the mock server doesn't match the expected value, and instead looks something like the following (using python array notation): `trailer[:]message[1:]` instead of: `message[:]trailer[:]` This makes me think there's a buffer overrun issue or problem with the offset somewhere in the sendfile(2) system call, but I need to do some other testing first to verify that the code is indeed sane, and my assumptions/code isn't buggy. The `sbytes_negative` testcases that check `sbytes` being set to an invalid value resulting in `EFAULT` fails today as the other change (which checks `copyout(9)`) has not been committed [1]. Thus, it should remain an expected failure (see bug 232210 for more details on this item). Next steps for testing sendfile(2): 1. Fix the header/trailer testcases so that they pass. 2. Setup if_tap interface and test with it, instead of using "localhost", per @asomers's suggestion. 3. Handle short recv(2)'s in `server_cat(..)`. 4. Add `SF_SYNC` support. 5. Add some more negative tests outside the scope of the functional contract. PR: 232210 r343365: Unbreak the gcc build with sendfile_test after r343362 gcc 8.x is more pedantic than clang 7.x with format strings and the tests passed `void*` variables while supplying `%s` (which is technically incorrect). Make the affected `void*` variables use `char*` storage instead to address this issue, as the compiler will upcast the values to `char*`. MFC with: r343362 r343367: Unbreak the build on architectures where size_t isn't synonymous with uintmax_t I should have used `%zu` instead of `%ju` with `size_t` types. MFC with: r343362, r343365 Pointyhat to: ngie r343368: Fix up r343367 I should have only changed the format qualifier with the `size_t` value, `length`, not the other [`off_t`] value, `dest_file_size`. MFC with: r343362, r343365, r343367 r343461: Fix reporting errors with `gai_strerror(..)` The return value (`err`) should be checked; not the `errno` value. PR: 235200 MFC with: r343362, r343365, r343367-r343368 r343751: Avoid the DNS lookup for "localhost" ci.FreeBSD.org does not have access to a DNS resolver/network (unlike my test VM), so in order for the test to pass on the host, it needs to avoid the DNS lookup by using the numeric host address representation. PR: 235200 MFC with: r343362, r343365, r343367-r343368, r343461 r344310: Make `server_cat(..)` handle short receives In short, the prior code was far too simplistic when it came to calling recv(2) and failed intermittently (or in the case of Jenkins, deterministically). Handle short recv(2)s by checking the return code and incrementing the window into the buffer by the number of received bytes. If the number of received bytes <= 0, then bail out of the loop, and test the total number of received bytes vs the expected number of bytes sent for equality, and base whether or not the test passes/fails on that fact. Remove the expected failure, now that the hdtr testcases deterministically pass on my host after this change [1]. PR: 234809 [1], 235200 Approved by: emaste (mentor, implicit: MFC to ^/stable/11 in r344977) Differential Revision: https://reviews.freebsd.org/D19523 Added: stable/12/lib/libc/tests/sys/sendfile_test.c - copied, changed from r343362, head/lib/libc/tests/sys/sendfile_test.c Modified: stable/12/lib/libc/tests/sys/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/tests/sys/Makefile ============================================================================== --- stable/12/lib/libc/tests/sys/Makefile Sun Mar 10 16:13:00 2019 (r344977) +++ stable/12/lib/libc/tests/sys/Makefile Sun Mar 10 16:14:42 2019 (r344978) @@ -8,6 +8,7 @@ PACKAGE= tests ATF_TESTS_C+= brk_test .endif ATF_TESTS_C+= queue_test +ATF_TESTS_C+= sendfile_test # TODO: clone, lwp_create, lwp_ctl, posix_fadvise, recvmmsg, # swapcontext Copied and modified: stable/12/lib/libc/tests/sys/sendfile_test.c (from r343362, head/lib/libc/tests/sys/sendfile_test.c) ============================================================================== --- head/lib/libc/tests/sys/sendfile_test.c Wed Jan 23 22:00:17 2019 (r343362, copy source) +++ stable/12/lib/libc/tests/sys/sendfile_test.c Sun Mar 10 16:14:42 2019 (r344978) @@ -97,24 +97,33 @@ generate_random_port(int seed) static void resolve_localhost(struct addrinfo **res, int domain, int type, int port) { + const char *host; char *serv; struct addrinfo hints; int error; - ATF_REQUIRE_MSG(domain == AF_INET || domain == AF_INET6, - "unhandled domain: %d", domain); + switch (domain) { + case AF_INET: + host = "127.0.0.1"; + break; + case AF_INET6: + host = "::1"; + break; + default: + atf_tc_fail("unhandled domain: %d", domain); + } ATF_REQUIRE_MSG(asprintf(&serv, "%d", port) >= 0, "asprintf failed: %s", strerror(errno)); memset(&hints, 0, sizeof(hints)); hints.ai_family = domain; - hints.ai_flags = AI_ADDRCONFIG|AI_NUMERICSERV; + hints.ai_flags = AI_ADDRCONFIG|AI_NUMERICSERV|AI_NUMERICHOST; hints.ai_socktype = type; - error = getaddrinfo("localhost", serv, &hints, res); + error = getaddrinfo(host, serv, &hints, res); ATF_REQUIRE_EQ_MSG(error, 0, - "getaddrinfo failed: %s", gai_strerror(errno)); + "getaddrinfo failed: %s", gai_strerror(error)); free(serv); } @@ -147,6 +156,8 @@ setup_client(int domain, int type, int port) "Will try to connect to host='%s', address_family=%d, " "socket_type=%d\n", host, res->ai_family, res->ai_socktype); + /* Avoid a double print when forked by flushing. */ + fflush(stdout); sock = make_socket(res->ai_family, res->ai_socktype, res->ai_protocol); error = connect(sock, (struct sockaddr*)res->ai_addr, res->ai_addrlen); freeaddrinfo(res); @@ -178,6 +189,8 @@ setup_server(int domain, int type, int port) "Will try to bind socket to host='%s', address_family=%d, " "socket_type=%d\n", host, res->ai_family, res->ai_socktype); + /* Avoid a double print when forked by flushing. */ + fflush(stdout); error = bind(sock, res->ai_addr, res->ai_addrlen); freeaddrinfo(res); ATF_REQUIRE_EQ_MSG(error, 0, "bind failed: %s", strerror(errno)); @@ -195,11 +208,17 @@ setup_server(int domain, int type, int port) static void server_cat(const char *dest_filename, int server_sock, size_t len) { - void *buffer; + char *buffer, *buf_window_ptr; int recv_sock; - ssize_t received_bytes; + size_t buffer_size; + ssize_t received_bytes, recv_ret; - buffer = calloc(len + 1, sizeof(char)); + /* + * Ensure that there isn't excess data sent across the wire by + * capturing 10 extra bytes (plus 1 for nul). + */ + buffer_size = len + 10 + 1; + buffer = calloc(buffer_size, sizeof(char)); if (buffer == NULL) err(1, "malloc failed"); @@ -207,32 +226,26 @@ server_cat(const char *dest_filename, int server_sock, if (recv_sock == -1) err(1, "accept failed"); - /* - * XXX: this assumes the simplest case where all data is received in a - * single recv(2) call. - */ - if (recv(recv_sock, buffer, len, 0) == -1) - err(1, "recv failed"); + buf_window_ptr = buffer; + received_bytes = 0; + do { + recv_ret = recv(recv_sock, buf_window_ptr, + buffer_size - received_bytes, 0); + if (recv_ret <= 0) + break; + buf_window_ptr += recv_ret; + received_bytes += recv_ret; + } while (received_bytes < buffer_size); atf_utils_create_file(dest_filename, "%s", buffer); - /* - * This recv(2) call helps ensure the amount of sent data is exactly - * what was specified by `len`. - */ - received_bytes = recv(recv_sock, buffer, len, 0); - switch (received_bytes) { - case -1: - err(1, "recv failed"); - case 0: - break; - default: - errx(1, "received unexpected data: %s", buffer); - } - (void)close(recv_sock); (void)close(server_sock); free(buffer); + + if (received_bytes != len) + errx(1, "received unexpected data: %zd != %zd", received_bytes, + len); } static int @@ -268,7 +281,7 @@ static void verify_source_and_dest(const char* dest_filename, int src_fd, off_t offset, size_t nbytes) { - void *dest_pointer, *src_pointer; + char *dest_pointer, *src_pointer; off_t dest_file_size, src_file_size; size_t length; int dest_fd; @@ -290,7 +303,7 @@ verify_source_and_dest(const char* dest_filename, int ATF_REQUIRE_EQ_MSG(dest_file_size, length, "number of bytes written out to %s (%ju) doesn't match the " - "expected number of bytes (%ju)", dest_filename, dest_file_size, + "expected number of bytes (%zu)", dest_filename, dest_file_size, length); ATF_REQUIRE_EQ_MSG(0, lseek(src_fd, offset, SEEK_SET), @@ -384,7 +397,7 @@ ATF_TC_BODY(fd_positive_file_v6, tc) static void fd_positive_shm_test(int domain) { - void *shm_pointer; + char *shm_pointer; off_t offset; size_t nbytes, pattern_size; pid_t server_pid; @@ -658,10 +671,6 @@ hdtr_positive_test(int domain) offset = 0; nbytes = 0; - atf_tc_expect_fail( - "The header/trailer testcases fail today with a data mismatch; " - "bug # 234809"); - for (i = 0; i < nitems(testcases); i++) { struct sf_hdtr hdtr; char *pattern; @@ -687,9 +696,9 @@ hdtr_positive_test(int domain) client_sock = setup_tcp_client(domain, port); rc = asprintf(&pattern, "%s%s%s", - testcases[i].include_headers ? headers[0].iov_base : "", + testcases[i].include_headers ? (char *)headers[0].iov_base : "", DETERMINISTIC_PATTERN, - testcases[i].include_trailers ? trailers[0].iov_base : ""); + testcases[i].include_trailers ? (char *)trailers[0].iov_base : ""); ATF_REQUIRE_MSG(rc != -1, "asprintf failed: %s", strerror(errno)); atf_utils_create_file(SOURCE_FILE ".full", "%s", pattern); From owner-svn-src-all@freebsd.org Sun Mar 10 16:13:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C81A15386BA; Sun, 10 Mar 2019 16:13:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 404808340E; Sun, 10 Mar 2019 16:13:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D407258E0; Sun, 10 Mar 2019 16:13:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2AGD19s001982; Sun, 10 Mar 2019 16:13:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2AGD0nY001981; Sun, 10 Mar 2019 16:13:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201903101613.x2AGD0nY001981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Sun, 10 Mar 2019 16:13: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: r344977 - stable/11/lib/libc/tests/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/libc/tests/sys X-SVN-Commit-Revision: 344977 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 404808340E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 16:13:01 -0000 Author: ngie Date: Sun Mar 10 16:13:00 2019 New Revision: 344977 URL: https://svnweb.freebsd.org/changeset/base/344977 Log: MFC r343362,r343365,r343367,r343368,r343461,r343751,r344310: r343362: Add [initial] functional tests for sendfile(2) as lib/libc/sys/sendfile These testcases exercise a number of functional requirements for sendfile(2). The testcases use IPv4 and IPv6 domain sockets with TCP, and were confirmed functional on UFS and ZFS. UDP address family sockets cannot be used per the sendfile(2) contract, thus using UDP sockets is outside the scope of testing the syscall in positive cases. As seen in `:s_negative_udp_socket_test`, UDP is used to test the sendfile(2) contract to ensure that EINVAL is returned by sendfile(2). The testcases added explicitly avoid testing out `SF_SYNC` due to the complexity of verifying that support. However, this is a good next logical item to verify. The `hdtr_positive*` testcases work to a certain degree (the header testcases pass), but the trailer testcases do not work (it is an expected failure). In particular, the value received by the mock server doesn't match the expected value, and instead looks something like the following (using python array notation): `trailer[:]message[1:]` instead of: `message[:]trailer[:]` This makes me think there's a buffer overrun issue or problem with the offset somewhere in the sendfile(2) system call, but I need to do some other testing first to verify that the code is indeed sane, and my assumptions/code isn't buggy. The `sbytes_negative` testcases that check `sbytes` being set to an invalid value resulting in `EFAULT` fails today as the other change (which checks `copyout(9)`) has not been committed [1]. Thus, it should remain an expected failure (see bug 232210 for more details on this item). Next steps for testing sendfile(2): 1. Fix the header/trailer testcases so that they pass. 2. Setup if_tap interface and test with it, instead of using "localhost", per @asomers's suggestion. 3. Handle short recv(2)'s in `server_cat(..)`. 4. Add `SF_SYNC` support. 5. Add some more negative tests outside the scope of the functional contract. PR: 232210 r343365: Unbreak the gcc build with sendfile_test after r343362 gcc 8.x is more pedantic than clang 7.x with format strings and the tests passed `void*` variables while supplying `%s` (which is technically incorrect). Make the affected `void*` variables use `char*` storage instead to address this issue, as the compiler will upcast the values to `char*`. MFC with: r343362 r343367: Unbreak the build on architectures where size_t isn't synonymous with uintmax_t I should have used `%zu` instead of `%ju` with `size_t` types. MFC with: r343362, r343365 Pointyhat to: ngie r343368: Fix up r343367 I should have only changed the format qualifier with the `size_t` value, `length`, not the other [`off_t`] value, `dest_file_size`. MFC with: r343362, r343365, r343367 r343461: Fix reporting errors with `gai_strerror(..)` The return value (`err`) should be checked; not the `errno` value. PR: 235200 MFC with: r343362, r343365, r343367-r343368 r343751: Avoid the DNS lookup for "localhost" ci.FreeBSD.org does not have access to a DNS resolver/network (unlike my test VM), so in order for the test to pass on the host, it needs to avoid the DNS lookup by using the numeric host address representation. PR: 235200 MFC with: r343362, r343365, r343367-r343368, r343461 r344310: Make `server_cat(..)` handle short receives In short, the prior code was far too simplistic when it came to calling recv(2) and failed intermittently (or in the case of Jenkins, deterministically). Handle short recv(2)s by checking the return code and incrementing the window into the buffer by the number of received bytes. If the number of received bytes <= 0, then bail out of the loop, and test the total number of received bytes vs the expected number of bytes sent for equality, and base whether or not the test passes/fails on that fact. Remove the expected failure, now that the hdtr testcases deterministically pass on my host after this change [1]. PR: 234809 [1], 235200 Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D19524 Added: stable/11/lib/libc/tests/sys/sendfile_test.c - copied, changed from r343362, head/lib/libc/tests/sys/sendfile_test.c Modified: stable/11/lib/libc/tests/sys/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/tests/sys/Makefile ============================================================================== --- stable/11/lib/libc/tests/sys/Makefile Sun Mar 10 04:41:30 2019 (r344976) +++ stable/11/lib/libc/tests/sys/Makefile Sun Mar 10 16:13:00 2019 (r344977) @@ -5,6 +5,7 @@ PACKAGE= tests .include ATF_TESTS_C+= queue_test +ATF_TESTS_C+= sendfile_test # TODO: clone, lwp_create, lwp_ctl, posix_fadvise, recvmmsg, # swapcontext Copied and modified: stable/11/lib/libc/tests/sys/sendfile_test.c (from r343362, head/lib/libc/tests/sys/sendfile_test.c) ============================================================================== --- head/lib/libc/tests/sys/sendfile_test.c Wed Jan 23 22:00:17 2019 (r343362, copy source) +++ stable/11/lib/libc/tests/sys/sendfile_test.c Sun Mar 10 16:13:00 2019 (r344977) @@ -97,24 +97,33 @@ generate_random_port(int seed) static void resolve_localhost(struct addrinfo **res, int domain, int type, int port) { + const char *host; char *serv; struct addrinfo hints; int error; - ATF_REQUIRE_MSG(domain == AF_INET || domain == AF_INET6, - "unhandled domain: %d", domain); + switch (domain) { + case AF_INET: + host = "127.0.0.1"; + break; + case AF_INET6: + host = "::1"; + break; + default: + atf_tc_fail("unhandled domain: %d", domain); + } ATF_REQUIRE_MSG(asprintf(&serv, "%d", port) >= 0, "asprintf failed: %s", strerror(errno)); memset(&hints, 0, sizeof(hints)); hints.ai_family = domain; - hints.ai_flags = AI_ADDRCONFIG|AI_NUMERICSERV; + hints.ai_flags = AI_ADDRCONFIG|AI_NUMERICSERV|AI_NUMERICHOST; hints.ai_socktype = type; - error = getaddrinfo("localhost", serv, &hints, res); + error = getaddrinfo(host, serv, &hints, res); ATF_REQUIRE_EQ_MSG(error, 0, - "getaddrinfo failed: %s", gai_strerror(errno)); + "getaddrinfo failed: %s", gai_strerror(error)); free(serv); } @@ -147,6 +156,8 @@ setup_client(int domain, int type, int port) "Will try to connect to host='%s', address_family=%d, " "socket_type=%d\n", host, res->ai_family, res->ai_socktype); + /* Avoid a double print when forked by flushing. */ + fflush(stdout); sock = make_socket(res->ai_family, res->ai_socktype, res->ai_protocol); error = connect(sock, (struct sockaddr*)res->ai_addr, res->ai_addrlen); freeaddrinfo(res); @@ -178,6 +189,8 @@ setup_server(int domain, int type, int port) "Will try to bind socket to host='%s', address_family=%d, " "socket_type=%d\n", host, res->ai_family, res->ai_socktype); + /* Avoid a double print when forked by flushing. */ + fflush(stdout); error = bind(sock, res->ai_addr, res->ai_addrlen); freeaddrinfo(res); ATF_REQUIRE_EQ_MSG(error, 0, "bind failed: %s", strerror(errno)); @@ -195,11 +208,17 @@ setup_server(int domain, int type, int port) static void server_cat(const char *dest_filename, int server_sock, size_t len) { - void *buffer; + char *buffer, *buf_window_ptr; int recv_sock; - ssize_t received_bytes; + size_t buffer_size; + ssize_t received_bytes, recv_ret; - buffer = calloc(len + 1, sizeof(char)); + /* + * Ensure that there isn't excess data sent across the wire by + * capturing 10 extra bytes (plus 1 for nul). + */ + buffer_size = len + 10 + 1; + buffer = calloc(buffer_size, sizeof(char)); if (buffer == NULL) err(1, "malloc failed"); @@ -207,32 +226,26 @@ server_cat(const char *dest_filename, int server_sock, if (recv_sock == -1) err(1, "accept failed"); - /* - * XXX: this assumes the simplest case where all data is received in a - * single recv(2) call. - */ - if (recv(recv_sock, buffer, len, 0) == -1) - err(1, "recv failed"); + buf_window_ptr = buffer; + received_bytes = 0; + do { + recv_ret = recv(recv_sock, buf_window_ptr, + buffer_size - received_bytes, 0); + if (recv_ret <= 0) + break; + buf_window_ptr += recv_ret; + received_bytes += recv_ret; + } while (received_bytes < buffer_size); atf_utils_create_file(dest_filename, "%s", buffer); - /* - * This recv(2) call helps ensure the amount of sent data is exactly - * what was specified by `len`. - */ - received_bytes = recv(recv_sock, buffer, len, 0); - switch (received_bytes) { - case -1: - err(1, "recv failed"); - case 0: - break; - default: - errx(1, "received unexpected data: %s", buffer); - } - (void)close(recv_sock); (void)close(server_sock); free(buffer); + + if (received_bytes != len) + errx(1, "received unexpected data: %zd != %zd", received_bytes, + len); } static int @@ -268,7 +281,7 @@ static void verify_source_and_dest(const char* dest_filename, int src_fd, off_t offset, size_t nbytes) { - void *dest_pointer, *src_pointer; + char *dest_pointer, *src_pointer; off_t dest_file_size, src_file_size; size_t length; int dest_fd; @@ -290,7 +303,7 @@ verify_source_and_dest(const char* dest_filename, int ATF_REQUIRE_EQ_MSG(dest_file_size, length, "number of bytes written out to %s (%ju) doesn't match the " - "expected number of bytes (%ju)", dest_filename, dest_file_size, + "expected number of bytes (%zu)", dest_filename, dest_file_size, length); ATF_REQUIRE_EQ_MSG(0, lseek(src_fd, offset, SEEK_SET), @@ -384,7 +397,7 @@ ATF_TC_BODY(fd_positive_file_v6, tc) static void fd_positive_shm_test(int domain) { - void *shm_pointer; + char *shm_pointer; off_t offset; size_t nbytes, pattern_size; pid_t server_pid; @@ -658,10 +671,6 @@ hdtr_positive_test(int domain) offset = 0; nbytes = 0; - atf_tc_expect_fail( - "The header/trailer testcases fail today with a data mismatch; " - "bug # 234809"); - for (i = 0; i < nitems(testcases); i++) { struct sf_hdtr hdtr; char *pattern; @@ -687,9 +696,9 @@ hdtr_positive_test(int domain) client_sock = setup_tcp_client(domain, port); rc = asprintf(&pattern, "%s%s%s", - testcases[i].include_headers ? headers[0].iov_base : "", + testcases[i].include_headers ? (char *)headers[0].iov_base : "", DETERMINISTIC_PATTERN, - testcases[i].include_trailers ? trailers[0].iov_base : ""); + testcases[i].include_trailers ? (char *)trailers[0].iov_base : ""); ATF_REQUIRE_MSG(rc != -1, "asprintf failed: %s", strerror(errno)); atf_utils_create_file(SOURCE_FILE ".full", "%s", pattern); From owner-svn-src-all@freebsd.org Sun Mar 10 15:07:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA0241536788; Sun, 10 Mar 2019 15:07:28 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47B7C81033; Sun, 10 Mar 2019 15:07:28 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 1F58F1A232; Sun, 10 Mar 2019 15:07:28 +0000 (UTC) Date: Sun, 10 Mar 2019 15:07:28 +0000 From: Alexey Dokuchaev To: rgrimes@freebsd.org Cc: Warner Losh , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r344970 - head Message-ID: <20190310150728.GA97029@FreeBSD.org> References: <201903091717.x29HHjcc069618@repo.freebsd.org> <201903092000.x29K0Rf6002120@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201903092000.x29K0Rf6002120@gndrsh.dnsmgr.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 47B7C81033 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.90 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.90)[-0.902,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.997,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 15:07:28 -0000 On Sat, Mar 09, 2019 at 12:00:27PM -0800, Rodney W. Grimes wrote: > > New Revision: 344970 > > URL: https://svnweb.freebsd.org/changeset/base/344970 > > > > Log: > > Misc fixes based on upgrading a laptop from 11.1R to -current > > > > Add note about needing to start zfs because mount -a doesn't do that. > > Add the word 'supported' before 'older branches' for older binaries. > > Add note about options in custom config files as well. > > > > Modified: head/UPDATING > > ... > > binaries). Failure to do so may leave you with a system that is > > hard to boot to recover. A GENERIC kernel will include suitable > > - compatibility options to run binaries from older branches. > > + compatibility options to run binaries from supported older branches. > > This is probably not the best adjective here, supported only goes back to > 11.x, there are COMPAT options that work all the way back to 4. I concur, this "supported" word sounds like we barely give a fuck. Being able to run old (very old) binaries had always been one of our strengths, and we should not suggest that it's not anymore. ./danfe From owner-svn-src-all@freebsd.org Sun Mar 10 17:20:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C8F3153A733; Sun, 10 Mar 2019 17:20:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C594485B3D; Sun, 10 Mar 2019 17:20:09 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B903A2635B; Sun, 10 Mar 2019 17:20:09 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2AHK9q3034244; Sun, 10 Mar 2019 17:20:09 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2AHK9Yb034242; Sun, 10 Mar 2019 17:20:09 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201903101720.x2AHK9Yb034242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 10 Mar 2019 17:20:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r344980 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 344980 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C594485B3D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 17:20:10 -0000 Author: glebius Date: Sun Mar 10 17:20:09 2019 New Revision: 344980 URL: https://svnweb.freebsd.org/changeset/base/344980 Log: Most Ethernet drivers that potentially can run a pfil(9) hook with PFIL_MEMPTR flag are intentionally providing a memory address that isn't aligned to pointer alignment. This is done to align an IPv4 or IPv6 header that is expected to follow Ethernet header. When we return PFIL_REALLOCED we store a pointer to allocated mbuf at this address. With this change the KPI changes to store the pointer at aligned address, which usually yields in +2 bytes. Provide two inlines: pfil_packet_align() to get aligned pfil_packet_t for a misaligned one pfil_mem2mbuf() to read out mbuf pointer from misaligned pfil_packet_t Provide function pfil_realloc(), not used yet, that would convert a memory pfil_packet_t to an mbuf one. Reported by: hps Reviewed by: hps, gallatin Modified: head/sys/net/pfil.c head/sys/net/pfil.h Modified: head/sys/net/pfil.c ============================================================================== --- head/sys/net/pfil.c Sun Mar 10 17:08:05 2019 (r344979) +++ head/sys/net/pfil.c Sun Mar 10 17:20:09 2019 (r344980) @@ -118,15 +118,31 @@ VNET_DEFINE_STATIC(struct pfilhookhead, pfil_hook_list static struct pfil_link *pfil_link_remove(pfil_chain_t *, pfil_hook_t ); static void pfil_link_free(epoch_context_t); +int +pfil_realloc(pfil_packet_t *p, int flags, struct ifnet *ifp) +{ + struct mbuf *m; + + MPASS(flags & PFIL_MEMPTR); + + if ((m = m_devget(p->mem, PFIL_LENGTH(flags), 0, ifp, NULL)) == NULL) + return (ENOMEM); + *p = pfil_packet_align(*p); + *p->m = m; + + return (0); +} + static __noinline int -pfil_fake_mbuf(pfil_func_t func, void *mem, struct ifnet *ifp, int flags, +pfil_fake_mbuf(pfil_func_t func, pfil_packet_t *p, struct ifnet *ifp, int flags, void *ruleset, struct inpcb *inp) { struct mbuf m, *mp; pfil_return_t rv; (void)m_init(&m, M_NOWAIT, MT_DATA, M_NOFREE | M_PKTHDR); - m_extadd(&m, mem, PFIL_LENGTH(flags), NULL, NULL, NULL, 0, EXT_RXRING); + m_extadd(&m, p->mem, PFIL_LENGTH(flags), NULL, NULL, NULL, 0, + EXT_RXRING); m.m_len = m.m_pkthdr.len = PFIL_LENGTH(flags); mp = &m; flags &= ~(PFIL_MEMPTR | PFIL_LENMASK); @@ -135,10 +151,11 @@ pfil_fake_mbuf(pfil_func_t func, void *mem, struct ifn if (rv == PFIL_PASS && mp != &m) { /* * Firewalls that need pfil_fake_mbuf() most likely don't - * know to return PFIL_REALLOCED. + * know they need return PFIL_REALLOCED. */ rv = PFIL_REALLOCED; - *(struct mbuf **)mem = mp; + *p = pfil_packet_align(*p); + *p->m = mp; } return (rv); @@ -168,8 +185,8 @@ pfil_run_hooks(struct pfil_head *head, pfil_packet_t p PFIL_EPOCH_ENTER(et); CK_STAILQ_FOREACH(link, pch, link_chain) { if ((flags & PFIL_MEMPTR) && !(link->link_flags & PFIL_MEMPTR)) - rv = pfil_fake_mbuf(link->link_func, p.mem, ifp, - flags, link->link_ruleset, inp); + rv = pfil_fake_mbuf(link->link_func, &p, ifp, flags, + link->link_ruleset, inp); else rv = (*link->link_func)(p, ifp, flags, link->link_ruleset, inp); Modified: head/sys/net/pfil.h ============================================================================== --- head/sys/net/pfil.h Sun Mar 10 17:08:05 2019 (r344979) +++ head/sys/net/pfil.h Sun Mar 10 17:20:09 2019 (r344980) @@ -98,8 +98,25 @@ struct inpcb; typedef union { struct mbuf **m; void *mem; + uintptr_t __ui; } pfil_packet_t __attribute__((__transparent_union__)); +static inline pfil_packet_t +pfil_packet_align(pfil_packet_t p) +{ + + return ((pfil_packet_t ) (((uintptr_t)(p).mem + + (_Alignof(void *) - 1)) & - _Alignof(void *))); +} + +static inline struct mbuf * +pfil_mem2mbuf(void *v) +{ + + return (*(struct mbuf **) (((uintptr_t)(v) + + (_Alignof(void *) - 1)) & - _Alignof(void *))); +} + typedef enum { PFIL_PASS = 0, PFIL_DROPPED, @@ -187,6 +204,11 @@ struct _pfil_head { }; #define PFIL_HOOKED_IN(p) (((struct _pfil_head *)(p))->head_nhooksin > 0) #define PFIL_HOOKED_OUT(p) (((struct _pfil_head *)(p))->head_nhooksout > 0) + +/* + * Alloc mbuf to be used instead of memory pointer. + */ +int pfil_realloc(pfil_packet_t *, int, struct ifnet *); #endif /* _KERNEL */ #endif /* _NET_PFIL_H_ */ From owner-svn-src-all@freebsd.org Mon Mar 11 01:27:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 785D215272B8; Mon, 11 Mar 2019 01:27:09 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4980271668; Mon, 11 Mar 2019 01:27:09 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E4EA3994; Mon, 11 Mar 2019 01:27:09 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2B1R98a090926; Mon, 11 Mar 2019 01:27:09 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2B1R2as090886; Mon, 11 Mar 2019 01:27:02 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903110127.x2B1R2as090886@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 11 Mar 2019 01:27:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r344990 - in head: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn sys/... X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in head: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn sys/dev/usb/wlan sys/dev/wi s... X-SVN-Commit-Revision: 344990 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4980271668 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 01:27:10 -0000 Author: avos Date: Mon Mar 11 01:27:01 2019 New Revision: 344990 URL: https://svnweb.freebsd.org/changeset/base/344990 Log: Fix ieee80211_radiotap(9) usage in wireless drivers: - Alignment issues: * Add missing __packed attributes + padding across all drivers; in most places there was an assumption that padding will be always minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) - padding was just missing. * Add __aligned(8) attribute for all Rx radiotap headers since they can contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, so just drop the attribute here. Refresh ieee80211_radiotap(9) man page accordingly. - Since net80211 automatically updates channel frequency / flags in ieee80211_radiotap_chan_change() drop duplicate setup for these fields in drivers. Tested with Netgear WG111 v3 (urtw(4)), STA mode. MFC after: 2 weeks Modified: head/share/man/man9/ieee80211_radiotap.9 head/sys/dev/ath/if_athioctl.h head/sys/dev/bwi/if_bwi.c head/sys/dev/bwi/if_bwivar.h head/sys/dev/bwn/if_bwn.c head/sys/dev/bwn/if_bwnvar.h head/sys/dev/ipw/if_ipwvar.h head/sys/dev/iwi/if_iwivar.h head/sys/dev/iwm/if_iwmvar.h head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnvar.h head/sys/dev/malo/if_maloioctl.h head/sys/dev/mwl/if_mwlioctl.h head/sys/dev/otus/if_otus.c head/sys/dev/otus/if_otusreg.h head/sys/dev/ral/rt2560var.h head/sys/dev/ral/rt2661var.h head/sys/dev/ral/rt2860var.h head/sys/dev/rtwn/if_rtwn.c head/sys/dev/rtwn/if_rtwnvar.h head/sys/dev/usb/wlan/if_rsu.c head/sys/dev/usb/wlan/if_rsureg.h head/sys/dev/usb/wlan/if_rumvar.h head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_runvar.h head/sys/dev/usb/wlan/if_uathvar.h head/sys/dev/usb/wlan/if_upgtvar.h head/sys/dev/usb/wlan/if_uralvar.h head/sys/dev/usb/wlan/if_urtw.c head/sys/dev/usb/wlan/if_urtwvar.h head/sys/dev/usb/wlan/if_zydreg.h head/sys/dev/wi/if_wireg.h head/sys/dev/wpi/if_wpivar.h head/sys/dev/wtap/if_wtapioctl.h Modified: head/share/man/man9/ieee80211_radiotap.9 ============================================================================== --- head/share/man/man9/ieee80211_radiotap.9 Mon Mar 11 01:12:23 2019 (r344989) +++ head/share/man/man9/ieee80211_radiotap.9 Mon Mar 11 01:27:01 2019 (r344990) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 4, 2009 +.Dd March 11, 2019 .Dt IEEE80211_RADIOTAP 9 .Os .Sh NAME @@ -257,7 +257,7 @@ struct wi_rx_radiotap_header { uint16_t wr_chan_flags; uint8_t wr_antsignal; uint8_t wr_antnoise; -} __packed; +} __packed __aligned(8); .Ed .Pp and transmit definitions for the Atheros driver: Modified: head/sys/dev/ath/if_athioctl.h ============================================================================== --- head/sys/dev/ath/if_athioctl.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/ath/if_athioctl.h Mon Mar 11 01:27:01 2019 (r344990) @@ -373,7 +373,7 @@ struct ath_rx_radiotap_header { */ struct ath_radiotap_vendor_hdr wr_v; #endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ -} __packed; +} __packed __aligned(8); #define ATH_TX_RADIOTAP_PRESENT ( \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: head/sys/dev/bwi/if_bwi.c ============================================================================== --- head/sys/dev/bwi/if_bwi.c Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/bwi/if_bwi.c Mon Mar 11 01:27:01 2019 (r344990) @@ -1729,15 +1729,6 @@ bwi_set_channel(struct ieee80211com *ic) bwi_rf_set_chan(mac, ieee80211_chan2ieee(ic, c), 0); sc->sc_rates = ieee80211_get_ratetable(c); - - /* - * Setup radio tap channel freq and flags - */ - sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq = - htole16(c->ic_freq); - sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags = - htole16(c->ic_flags & 0xffff); - BWI_UNLOCK(sc); } Modified: head/sys/dev/bwi/if_bwivar.h ============================================================================== --- head/sys/dev/bwi/if_bwivar.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/bwi/if_bwivar.h Mon Mar 11 01:27:01 2019 (r344990) @@ -513,7 +513,7 @@ struct bwi_tx_radiotap_hdr { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -}; +} __packed; #define BWI_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ @@ -533,7 +533,7 @@ struct bwi_rx_radiotap_hdr { int8_t wr_antsignal; int8_t wr_antnoise; /* TODO: sq */ -}; +} __packed __aligned(8); struct bwi_vap { struct ieee80211vap bv_vap; Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/bwn/if_bwn.c Mon Mar 11 01:27:01 2019 (r344990) @@ -2001,14 +2001,6 @@ bwn_set_channel(struct ieee80211com *ic) bwn_mac_enable(mac); fail: - /* - * Setup radio tap channel freq and flags - */ - sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq = - htole16(ic->ic_curchan->ic_freq); - sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags = - htole16(ic->ic_curchan->ic_flags & 0xffff); - BWN_UNLOCK(sc); } Modified: head/sys/dev/bwn/if_bwnvar.h ============================================================================== --- head/sys/dev/bwn/if_bwnvar.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/bwn/if_bwnvar.h Mon Mar 11 01:27:01 2019 (r344990) @@ -570,7 +570,7 @@ struct bwn_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; u_int8_t wr_antenna; -}; +} __packed __aligned(8); #define BWN_TX_RADIOTAP_PRESENT ( \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -588,7 +588,7 @@ struct bwn_tx_radiotap_header { u_int16_t wt_chan_flags; u_int8_t wt_txpower; u_int8_t wt_antenna; -}; +} __packed; struct bwn_stats { int32_t rtsfail; Modified: head/sys/dev/ipw/if_ipwvar.h ============================================================================== --- head/sys/dev/ipw/if_ipwvar.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/ipw/if_ipwvar.h Mon Mar 11 01:27:01 2019 (r344990) @@ -57,11 +57,12 @@ struct ipw_soft_buf { struct ipw_rx_radiotap_header { struct ieee80211_radiotap_header wr_ihdr; uint8_t wr_flags; + uint8_t wr_pad; uint16_t wr_chan_freq; uint16_t wr_chan_flags; int8_t wr_antsignal; int8_t wr_antnoise; -}; +} __packed __aligned(8); #define IPW_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -72,9 +73,10 @@ struct ipw_rx_radiotap_header { struct ipw_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -}; +} __packed; #define IPW_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: head/sys/dev/iwi/if_iwivar.h ============================================================================== --- head/sys/dev/iwi/if_iwivar.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/iwi/if_iwivar.h Mon Mar 11 01:27:01 2019 (r344990) @@ -38,7 +38,7 @@ struct iwi_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; uint8_t wr_antenna; -}; +} __packed __aligned(8); #define IWI_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -51,9 +51,10 @@ struct iwi_rx_radiotap_header { struct iwi_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -}; +} __packed; #define IWI_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/iwm/if_iwmvar.h Mon Mar 11 01:27:01 2019 (r344990) @@ -113,7 +113,7 @@ struct iwm_rx_radiotap_header { uint16_t wr_chan_flags; int8_t wr_dbm_antsignal; int8_t wr_dbm_antnoise; -} __packed; +} __packed __aligned(8); #define IWM_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/iwn/if_iwn.c Mon Mar 11 01:27:01 2019 (r344990) @@ -9102,18 +9102,12 @@ iwn_scan_end(struct ieee80211com *ic) static void iwn_set_channel(struct ieee80211com *ic) { - const struct ieee80211_channel *c = ic->ic_curchan; struct iwn_softc *sc = ic->ic_softc; int error; DPRINTF(sc, IWN_DEBUG_TRACE, "->Doing %s\n", __func__); IWN_LOCK(sc); - sc->sc_rxtap.wr_chan_freq = htole16(c->ic_freq); - sc->sc_rxtap.wr_chan_flags = htole16(c->ic_flags); - sc->sc_txtap.wt_chan_freq = htole16(c->ic_freq); - sc->sc_txtap.wt_chan_flags = htole16(c->ic_flags); - /* * Only need to set the channel in Monitor mode. AP scanning and auth * are already taken care of by their respective firmware commands. Modified: head/sys/dev/iwn/if_iwnvar.h ============================================================================== --- head/sys/dev/iwn/if_iwnvar.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/iwn/if_iwnvar.h Mon Mar 11 01:27:01 2019 (r344990) @@ -62,7 +62,7 @@ struct iwn_rx_radiotap_header { uint16_t wr_chan_flags; int8_t wr_dbm_antsignal; int8_t wr_dbm_antnoise; -} __packed; +} __packed __aligned(8); #define IWN_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ Modified: head/sys/dev/malo/if_maloioctl.h ============================================================================== --- head/sys/dev/malo/if_maloioctl.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/malo/if_maloioctl.h Mon Mar 11 01:27:01 2019 (r344990) @@ -93,7 +93,7 @@ struct malo_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; u_int8_t wr_antenna; -}; +} __packed __aligned(8); #define MALO_TX_RADIOTAP_PRESENT ( \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -111,6 +111,6 @@ struct malo_tx_radiotap_header { u_int16_t wt_chan_flags; u_int8_t wt_txpower; u_int8_t wt_antenna; -}; +} __packed; #endif /* _DEV_MALO_MVIOCTL_H */ Modified: head/sys/dev/mwl/if_mwlioctl.h ============================================================================== --- head/sys/dev/mwl/if_mwlioctl.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/mwl/if_mwlioctl.h Mon Mar 11 01:27:01 2019 (r344990) @@ -115,7 +115,7 @@ struct mwl_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; u_int8_t wr_antenna; -}; +} __packed __aligned(8); #define MWL_TX_RADIOTAP_PRESENT ( \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -133,6 +133,6 @@ struct mwl_tx_radiotap_header { u_int16_t wt_chan_flags; u_int8_t wt_txpower; u_int8_t wt_antenna; -}; +} __packed; #endif /* _DEV_MWL_MVIOCTL_H */ Modified: head/sys/dev/otus/if_otus.c ============================================================================== --- head/sys/dev/otus/if_otus.c Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/otus/if_otus.c Mon Mar 11 01:27:01 2019 (r344990) @@ -1670,8 +1670,6 @@ otus_sub_rxeof(struct otus_softc *sc, uint8_t *buf, in struct mbuf mb; tap->wr_flags = 0; - tap->wr_chan_freq = htole16(ic->ic_ibss_chan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_ibss_chan->ic_flags); tap->wr_antsignal = tail->rssi; tap->wr_rate = 2; /* In case it can't be found below. */ switch (tail->status & AR_RX_STATUS_MT_MASK) { Modified: head/sys/dev/otus/if_otusreg.h ============================================================================== --- head/sys/dev/otus/if_otusreg.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/otus/if_otusreg.h Mon Mar 11 01:27:01 2019 (r344990) @@ -900,7 +900,7 @@ struct otus_rx_radiotap_header { uint16_t wr_chan_freq; uint16_t wr_chan_flags; uint8_t wr_antsignal; -} __packed; +} __packed __aligned(8); #define OTUS_RX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ Modified: head/sys/dev/ral/rt2560var.h ============================================================================== --- head/sys/dev/ral/rt2560var.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/ral/rt2560var.h Mon Mar 11 01:27:01 2019 (r344990) @@ -27,7 +27,7 @@ struct rt2560_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; uint8_t wr_antenna; -}; +} __packed __aligned(8); #define RT2560_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ @@ -45,7 +45,7 @@ struct rt2560_tx_radiotap_header { uint16_t wt_chan_freq; uint16_t wt_chan_flags; uint8_t wt_antenna; -}; +} __packed; #define RT2560_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: head/sys/dev/ral/rt2661var.h ============================================================================== --- head/sys/dev/ral/rt2661var.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/ral/rt2661var.h Mon Mar 11 01:27:01 2019 (r344990) @@ -42,7 +42,7 @@ struct rt2661_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define RT2661_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: head/sys/dev/ral/rt2860var.h ============================================================================== --- head/sys/dev/ral/rt2860var.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/ral/rt2860var.h Mon Mar 11 01:27:01 2019 (r344990) @@ -55,7 +55,7 @@ struct rt2860_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define RT2860_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: head/sys/dev/rtwn/if_rtwn.c ============================================================================== --- head/sys/dev/rtwn/if_rtwn.c Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/rtwn/if_rtwn.c Mon Mar 11 01:27:01 2019 (r344990) @@ -1560,10 +1560,6 @@ rtwn_set_channel(struct ieee80211com *ic) RTWN_LOCK(sc); rtwn_set_chan(sc, c); - sc->sc_rxtap.wr_chan_freq = htole16(c->ic_freq); - sc->sc_rxtap.wr_chan_flags = htole16(c->ic_flags); - sc->sc_txtap.wt_chan_freq = htole16(c->ic_freq); - sc->sc_txtap.wt_chan_flags = htole16(c->ic_flags); RTWN_UNLOCK(sc); } Modified: head/sys/dev/rtwn/if_rtwnvar.h ============================================================================== --- head/sys/dev/rtwn/if_rtwnvar.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/rtwn/if_rtwnvar.h Mon Mar 11 01:27:01 2019 (r344990) @@ -62,9 +62,10 @@ struct rtwn_rx_radiotap_header { struct rtwn_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define RTWN_TX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/usb/wlan/if_rsu.c Mon Mar 11 01:27:01 2019 (r344990) @@ -2447,8 +2447,6 @@ rsu_rx_frame(struct rsu_softc *sc, struct mbuf *m) tap->wr_rate = rxs.c_rate; tap->wr_dbm_antsignal = rssi; - tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); }; (void) ieee80211_add_rx_params(m, &rxs); @@ -2750,7 +2748,6 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no struct mbuf *m0, struct rsu_data *data) { const struct ieee80211_txparam *tp = ni->ni_txparms; - struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = ni->ni_vap; struct ieee80211_frame *wh; struct ieee80211_key *k = NULL; @@ -2894,8 +2891,6 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no struct rsu_tx_radiotap_header *tap = &sc->sc_txtap; tap->wt_flags = 0; - tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); ieee80211_radiotap_tx(vap, m0); } Modified: head/sys/dev/usb/wlan/if_rsureg.h ============================================================================== --- head/sys/dev/usb/wlan/if_rsureg.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/usb/wlan/if_rsureg.h Mon Mar 11 01:27:01 2019 (r344990) @@ -800,9 +800,10 @@ struct rsu_rx_radiotap_header { struct rsu_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define RSU_TX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ Modified: head/sys/dev/usb/wlan/if_rumvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_rumvar.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/usb/wlan/if_rumvar.h Mon Mar 11 01:27:01 2019 (r344990) @@ -49,7 +49,7 @@ struct rum_tx_radiotap_header { uint16_t wt_chan_freq; uint16_t wt_chan_flags; uint8_t wt_antenna; -} __packed __aligned(8); +} __packed; #define RT2573_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/usb/wlan/if_run.c Mon Mar 11 01:27:01 2019 (r344990) @@ -2900,8 +2900,6 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uin uint16_t phy; tap->wr_flags = 0; - tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); tap->wr_antsignal = rssi; tap->wr_antenna = ant; tap->wr_dbm_antsignal = run_rssi2dbm(sc, rssi, ant); @@ -3173,8 +3171,6 @@ tr_setup: (struct rt2860_txwi *)(&data->desc + sizeof(struct rt2870_txd)); tap->wt_flags = 0; tap->wt_rate = rt2860_rates[data->ridx].rate; - tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); tap->wt_hwqueue = index; if (le16toh(txwi->phy) & RT2860_PHY_SHPRE) tap->wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; Modified: head/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_runvar.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/usb/wlan/if_runvar.h Mon Mar 11 01:27:01 2019 (r344990) @@ -71,7 +71,7 @@ struct run_tx_radiotap_header { uint16_t wt_chan_freq; uint16_t wt_chan_flags; uint8_t wt_hwqueue; -} __packed __aligned(8); +} __packed; #define IEEE80211_RADIOTAP_HWQUEUE 15 Modified: head/sys/dev/usb/wlan/if_uathvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_uathvar.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/usb/wlan/if_uathvar.h Mon Mar 11 01:27:01 2019 (r344990) @@ -67,9 +67,10 @@ struct uath_rx_radiotap_header { struct uath_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define UATH_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: head/sys/dev/usb/wlan/if_upgtvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_upgtvar.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/usb/wlan/if_upgtvar.h Mon Mar 11 01:27:01 2019 (r344990) @@ -394,7 +394,7 @@ struct upgt_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define UPGT_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: head/sys/dev/usb/wlan/if_uralvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_uralvar.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/usb/wlan/if_uralvar.h Mon Mar 11 01:27:01 2019 (r344990) @@ -51,7 +51,7 @@ struct ural_tx_radiotap_header { uint16_t wt_chan_freq; uint16_t wt_chan_flags; uint8_t wt_antenna; -} __packed __aligned(8); +} __packed; #define RAL_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/usb/wlan/if_urtw.c Mon Mar 11 01:27:01 2019 (r344990) @@ -1684,11 +1684,7 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_ if (ieee80211_radiotap_active_vap(vap)) { struct urtw_tx_radiotap_header *tap = &sc->sc_txtap; - /* XXX Are variables correct? */ tap->wt_flags = 0; - tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); - ieee80211_radiotap_tx(vap, m0); } @@ -3976,9 +3972,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da if (ieee80211_radiotap_active(ic)) { struct urtw_rx_radiotap_header *tap = &sc->sc_rxtap; - /* XXX Are variables correct? */ - tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); + tap->wr_flags = 0; tap->wr_dbm_antsignal = (int8_t)rssi; } Modified: head/sys/dev/usb/wlan/if_urtwvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_urtwvar.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/usb/wlan/if_urtwvar.h Mon Mar 11 01:27:01 2019 (r344990) @@ -56,6 +56,7 @@ typedef STAILQ_HEAD(, urtw_data) urtw_datahead; struct urtw_rx_radiotap_header { struct ieee80211_radiotap_header wr_ihdr; uint8_t wr_flags; + uint8_t wr_pad; uint16_t wr_chan_freq; uint16_t wr_chan_flags; int8_t wr_dbm_antsignal; @@ -69,9 +70,10 @@ struct urtw_rx_radiotap_header { struct urtw_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define URTW_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: head/sys/dev/usb/wlan/if_zydreg.h ============================================================================== --- head/sys/dev/usb/wlan/if_zydreg.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/usb/wlan/if_zydreg.h Mon Mar 11 01:27:01 2019 (r344990) @@ -1200,7 +1200,7 @@ struct zyd_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define ZYD_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: head/sys/dev/wi/if_wireg.h ============================================================================== --- head/sys/dev/wi/if_wireg.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/wi/if_wireg.h Mon Mar 11 01:27:01 2019 (r344990) @@ -709,7 +709,7 @@ struct wi_rx_radiotap_header { u_int16_t wr_chan_flags; u_int8_t wr_antsignal; u_int8_t wr_antnoise; -}; +} __packed __aligned(8); #define WI_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -722,5 +722,5 @@ struct wi_tx_radiotap_header { u_int8_t wt_rate; u_int16_t wt_chan_freq; u_int16_t wt_chan_flags; -}; +} __packed; #endif /* IEEE80211_RADIOTAP_F_CFP */ Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/wpi/if_wpivar.h Mon Mar 11 01:27:01 2019 (r344990) @@ -26,7 +26,7 @@ struct wpi_rx_radiotap_header { int8_t wr_dbm_antsignal; int8_t wr_dbm_antnoise; uint8_t wr_antenna; -} __packed; +} __packed __aligned(8); #define WPI_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ Modified: head/sys/dev/wtap/if_wtapioctl.h ============================================================================== --- head/sys/dev/wtap/if_wtapioctl.h Mon Mar 11 01:12:23 2019 (r344989) +++ head/sys/dev/wtap/if_wtapioctl.h Mon Mar 11 01:27:01 2019 (r344990) @@ -159,7 +159,7 @@ struct wtap_rx_radiotap_header { u_int8_t wr_chan_ieee; int8_t wr_chan_maxpow; #endif -} __packed; +} __packed __aligned(8); #define WTAP_TX_RADIOTAP_PRESENT ( \ 0) @@ -167,7 +167,6 @@ struct wtap_rx_radiotap_header { struct wtap_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; #if 0 - u_int64_t wt_tsf; u_int8_t wt_flags; u_int8_t wt_rate; u_int8_t wt_txpower; From owner-svn-src-all@freebsd.org Sun Mar 10 16:54:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39BB01539741 for ; Sun, 10 Mar 2019 16:54:51 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1.eu.mailhop.org (outbound1.eu.mailhop.org [52.28.251.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39DB7849B7 for ; Sun, 10 Mar 2019 16:54:50 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1552236881; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=IJPOUKACowZbnxrJwd2EGOm9ObSL3tWtzZpBOiW0Eu3gwKBTsbs9p0uUh5gvZiR+WO4RZH6Oo13xT YfKpqNcuG5wi4vckhn6/YTP6JUsGlKyo0kXR4ak5AwNH/rhU8M+ek3Q8p92MNRY3+WeWwlGyl+Cne/ oJojJl3sSZG/mLnk4PG2D6tgfnBjTu+3aJThY0smzar3RQE64nxe7cMn4FUb4RUeFp1qk4P8Lp6svE RQJHfxWGWkAvi7PBxgrln4BV8kRXQYttymolo3/4p1VDC8oRxu8Xs/A6YE0BkX6HV2jpNwBBH0K15+ EnpCCdnKtvFiA7k2/NXFtFb2rFaJK7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=n6lH6/FamoF/uluarbPO/lm5V540v40hxw54ayupNUM=; b=jmMflR5nZUap+HRdV+6VJRz/dwWqmiuS3l0co4CRVZCoeZWzoabU4TQ29Lp9jJFSsarMSwGBp/TCN 5SVTixVWnO7iEG+/5dPyzOk3GnE+gaQOX17bGSSsbbCsE6ttnU8lkxlC48TzuAr+AE8k4fYXuMnRVA 9uQ6G1NVeIoRO1gJFzElNr/ocQy4RMzBqszTmECu1FIx80A8Zxtf1Yh0EiaSz+7wzJqNSrm5hR0Kwe I8qb5fDVlALgttrCZgoRLgWTu67FkOtWGBW9bnRqItUlEtZvVkzzYJIUGMAuDEe85WV7qn+qRqj/s+ taYTHhWXckGvR+GYUVyKSfKjra6QF7Q== ARC-Authentication-Results: i=1; outbound3.eu.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=n6lH6/FamoF/uluarbPO/lm5V540v40hxw54ayupNUM=; b=WCF1SSo+O+chjbPc/SyMHXojJL7av1FSXKBFlpqmmeHuWNrT13XAKx7FFEzQAipzw3eeM06feKdXQ id3PZCVueusn9c4eFoN9aW1/vQMM0lvGjoiAF5GKpKveDv7GwhjpJtlDEX/03czNN9c8f5t8/VMMib o5y90pt7wXo9ZsGmFF6n718Y4r99oUiqu/AVbZ3N64DpY3KYhEImgbfnrAWdVz42kIZL72rPz4Jee/ L9AYq0jfGPgmhnlamL9SdiYyJkDD84VhGCdoRvzLL9sH+U5iGp+FHH/JsGAHBEcScU+7fqkTeh3wsW /VNWiAB0HuM/NsxoFEPljtEpCFnj9Jg== X-MHO-RoutePath: aGlwcGll X-MHO-User: 2fde6095-4355-11e9-908b-352056dbf2de X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.eu.mailhop.org (Halon) with ESMTPSA id 2fde6095-4355-11e9-908b-352056dbf2de; Sun, 10 Mar 2019 16:54:38 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x2AGsauC040553; Sun, 10 Mar 2019 10:54:36 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: svn commit: r344974 - stable/12/sys/netpfil/pf From: Ian Lepore To: Kristof Provost , Harry Schmalzbauer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Date: Sun, 10 Mar 2019 10:54:36 -0600 In-Reply-To: <8C805FB7-AE8B-4FF9-82E6-EA406C3B07BE@FreeBSD.org> References: <201903100056.x2A0ucCT013392@repo.freebsd.org> <7bdf4d3c-61b3-4319-d5b7-5234991fad78@omnilan.de> <8C805FB7-AE8B-4FF9-82E6-EA406C3B07BE@FreeBSD.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 39DB7849B7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 16:54:51 -0000 On Sun, 2019-03-10 at 10:34 +0100, Kristof Provost wrote: > On 10 Mar 2019, at 10:16, Harry Schmalzbauer wrote: > > Am 10.03.2019 um 01:56 schrieb Kristof Provost: > > > Author: kp > > > Date: Sun Mar 10 00:56:38 2019 > > > New Revision: 344974 > > > URL: https://svnweb.freebsd.org/changeset/base/344974 > > > > > > Log: > > > pf: Small performance tweak > > > > Seems to be the MFC of 344493. > > > > Indeed, apologies for missing out the MFC tag here. That’ll teach me > to sleep before I commit, rather than after. > > > Out of curiosity, do you have to manually write these log messages > > each time? > > > > Yes. I should see about scripting these MFCs someday, to avoid silly > mistakes like this. > Or looking into using gonzo's mfc helper website at https://mfc.kernelnomicon.org/6/ It will let you select one or more of your (or somebody else's) prior commits and it'll generate the commands to do the mfc, and the text you can paste into the commit message. -- Ian From owner-svn-src-all@freebsd.org Sun Mar 10 16:57:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09F491539817; Sun, 10 Mar 2019 16:57:37 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2DEA84B44; Sun, 10 Mar 2019 16:57:36 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 71A24C43A; Sun, 10 Mar 2019 16:57:36 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [10.0.2.193] (ptr-8rh08k0c8y7tidee3xm.18120a2.ip6.access.telenet.be [IPv6:2a02:1811:240e:402:9596:89f9:e3f6:8d6a]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id 143C91B760; Sun, 10 Mar 2019 17:57:35 +0100 (CET) From: "Kristof Provost" To: "Ian Lepore" Cc: "Harry Schmalzbauer" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: Re: svn commit: r344974 - stable/12/sys/netpfil/pf Date: Sun, 10 Mar 2019 17:57:34 +0100 X-Mailer: MailMate (2.0BETAr6135) Message-ID: <93666CE2-959E-425D-80F9-71858D6B6B85@FreeBSD.org> In-Reply-To: References: <201903100056.x2A0ucCT013392@repo.freebsd.org> <7bdf4d3c-61b3-4319-d5b7-5234991fad78@omnilan.de> <8C805FB7-AE8B-4FF9-82E6-EA406C3B07BE@FreeBSD.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: A2DEA84B44 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.93)[-0.927,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] Content-Type: text/plain; markup=markdown X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 16:57:37 -0000 On 10 Mar 2019, at 17:54, Ian Lepore wrote: > On Sun, 2019-03-10 at 10:34 +0100, Kristof Provost wrote: >> Yes. I should see about scripting these MFCs someday, to avoid silly >> mistakes like this. >> > > Or looking into using gonzo's mfc helper website at > > https://mfc.kernelnomicon.org/6/ > > It will let you select one or more of your (or somebody else's) prior > commits and it'll generate the commands to do the mfc, and the text you > can paste into the commit message. > Oooh! I did not know it could do that. Shiny! Kristof From owner-svn-src-all@freebsd.org Sun Mar 10 20:59:00 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E12F01541ADC; Sun, 10 Mar 2019 20:58:59 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8021D8E075; Sun, 10 Mar 2019 20:58:59 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 75026995; Sun, 10 Mar 2019 20:58:59 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2AKwxUF050491; Sun, 10 Mar 2019 20:58:59 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2AKwxK9050490; Sun, 10 Mar 2019 20:58:59 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201903102058.x2AKwxK9050490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sun, 10 Mar 2019 20:58:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r344985 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 344985 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8021D8E075 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 20:59:00 -0000 Author: 0mp (ports committer) Date: Sun Mar 10 20:58:59 2019 New Revision: 344985 URL: https://svnweb.freebsd.org/changeset/base/344985 Log: style.mdoc.5: Fix formatting issues Reviewed by: bcr Approved by: bcr (doc) Approved by: krion (mentor, implicit), mat (mentor, implicit) Differential Revision: https://reviews.freebsd.org/D19532 Modified: head/share/man/man5/style.mdoc.5 Modified: head/share/man/man5/style.mdoc.5 ============================================================================== --- head/share/man/man5/style.mdoc.5 Sun Mar 10 20:58:24 2019 (r344984) +++ head/share/man/man5/style.mdoc.5 Sun Mar 10 20:58:59 2019 (r344985) @@ -1,7 +1,7 @@ .\" .\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD .\" -.\" Copyright (c) 2018 Mateusz Piotrowski <0mp@FreeBSD.org> +.\" Copyright (c) 2018-2019 Mateusz Piotrowski <0mp@FreeBSD.org> .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 29, 2018 +.Dd March 10, 2019 .Dt STYLE.MDOC 5 .Os .Sh NAME @@ -76,13 +76,13 @@ Format the section in the following way: .Bd -literal -offset indent \&.Bl -tag -width 0n -\&.It Sy Example 1\&: No Doing Something +\&.It Sy Example 1\\&: No Doing Something \&.Pp The following command does something. \&.Bd -literal -offset 2n \&.Li # Ic make -VLEGAL \&.Ed -\&.It Sy Example 2\&: No Doing Something Different +\&.It Sy Example 2\\&: No Doing Something Different \&.Pp The following command does something different. \&.Bd -literal -offset 2n @@ -90,7 +90,6 @@ The following command does something different. \&.Ed \&.Pp It is good to know this command. -\&.El \&.El .Ed .Pp From owner-svn-src-all@freebsd.org Sun Mar 10 21:43:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD7841543065; Sun, 10 Mar 2019 21:43:14 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DE8B8FCF2; Sun, 10 Mar 2019 21:43:14 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E8171227; Sun, 10 Mar 2019 21:43:14 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2ALhEch075983; Sun, 10 Mar 2019 21:43:14 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2ALhEnM075982; Sun, 10 Mar 2019 21:43:14 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201903102143.x2ALhEnM075982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Sun, 10 Mar 2019 21:43:14 +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: r344986 - stable/11/sys/dev/evdev X-SVN-Group: stable-11 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: stable/11/sys/dev/evdev X-SVN-Commit-Revision: 344986 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5DE8B8FCF2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 21:43:14 -0000 Author: wulf Date: Sun Mar 10 21:43:13 2019 New Revision: 344986 URL: https://svnweb.freebsd.org/changeset/base/344986 Log: Fix build breakage caused by r344984 This is a direct commit to stable/11 Modified: stable/11/sys/dev/evdev/evdev.c Modified: stable/11/sys/dev/evdev/evdev.c ============================================================================== --- stable/11/sys/dev/evdev/evdev.c Sun Mar 10 20:58:59 2019 (r344985) +++ stable/11/sys/dev/evdev/evdev.c Sun Mar 10 21:43:13 2019 (r344986) @@ -205,9 +205,9 @@ evdev_sysctl_create(struct evdev_dev *evdev) snprintf(ev_unit_str, sizeof(ev_unit_str), "%d", evdev->ev_unit); sysctl_ctx_init(&evdev->ev_sysctl_ctx); - ev_sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&evdev->ev_sysctl_ctx, + ev_sysctl_tree = SYSCTL_ADD_NODE(&evdev->ev_sysctl_ctx, SYSCTL_STATIC_CHILDREN(_kern_evdev_input), OID_AUTO, - ev_unit_str, CTLFLAG_RD, NULL, "", "device index"); + ev_unit_str, CTLFLAG_RD, NULL, ""); SYSCTL_ADD_STRING(&evdev->ev_sysctl_ctx, SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "name", CTLFLAG_RD, From owner-svn-src-all@freebsd.org Sun Mar 10 20:19:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFB7E154064E; Sun, 10 Mar 2019 20:19:44 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 64B508C90F; Sun, 10 Mar 2019 20:19:44 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A6BA2AD; Sun, 10 Mar 2019 20:19:44 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2AKJiRr029808; Sun, 10 Mar 2019 20:19:44 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2AKJiJY029807; Sun, 10 Mar 2019 20:19:44 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201903102019.x2AKJiJY029807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Sun, 10 Mar 2019 20:19:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r344982 - head/sys/x86/isa X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/sys/x86/isa X-SVN-Commit-Revision: 344982 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 64B508C90F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 20:19:45 -0000 Author: wulf Date: Sun Mar 10 20:19:43 2019 New Revision: 344982 URL: https://svnweb.freebsd.org/changeset/base/344982 Log: atrtc(4): install ACPI RTC/CMOS operation region handler FreeBSD base system does not provide an ACPI handler for the PC/AT RTC/CMOS device with PnP ID PNP0B00; on some HP laptops, the absence of this handler causes suspend/resume and poweroff(8) to hang or fail [1], [2]. On these laptops EC _REG method queries the RTC date/time registers via ACPI before suspending/powering off. The handler should be registered before acpi_ec driver is loaded. This change adds handler to access CMOS RTC operation region described in section 9.15 of ACPI-6.2 specification [3]. It is installed only for ACPI version of atrtc(4) so it should not affect old ACPI-less i386 systems. It is possible to disable the handler with loader tunable: debug.acpi.disabled=atrtc Informational debugging printf can be enabled by setting hw.acpi.verbose=1 in loader.conf [1] https://wiki.freebsd.org/Laptops/HP_Envy_6Z-1100 [2] https://wiki.freebsd.org/Laptops/HP_Notebook_15-af104ur [3] https://uefi.org/sites/default/files/resources/ACPI_6_2.pdf PR: 207419, 213039 Submitted by: Anthony Jenkins Reviewed by: ian Discussed on: acpi@, 2013-2015, several threads MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D19314 Modified: head/sys/x86/isa/atrtc.c Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Sun Mar 10 18:48:08 2019 (r344981) +++ head/sys/x86/isa/atrtc.c Sun Mar 10 20:19:43 2019 (r344982) @@ -32,6 +32,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_acpi.h" #include "opt_isa.h" #include @@ -54,8 +55,12 @@ __FBSDID("$FreeBSD$"); #endif #include #include "clock_if.h" +#ifdef DEV_ACPI #include +#include +#include #include +#endif /* * atrtc_lock protects low-level access to individual hardware registers. @@ -193,6 +198,9 @@ struct atrtc_softc { struct resource *intr_res; void *intr_handler; struct eventtimer et; +#ifdef DEV_ACPI + ACPI_HANDLE acpi_handle; +#endif }; static int @@ -247,7 +255,145 @@ rtc_intr(void *arg) return(flag ? FILTER_HANDLED : FILTER_STRAY); } +#ifdef DEV_ACPI /* + * ACPI RTC CMOS address space handler + */ +#define ATRTC_LAST_REG 0x40 + +static void +rtcin_region(int reg, void *buf, int len) +{ + u_char *ptr = buf; + + /* Drop lock after each IO as intr and settime have greater priority */ + while (len-- > 0) + *ptr++ = rtcin(reg++) & 0xff; +} + +static void +rtcout_region(int reg, const void *buf, int len) +{ + const u_char *ptr = buf; + + while (len-- > 0) + writertc(reg++, *ptr++); +} + +static bool +atrtc_check_cmos_access(bool is_read, ACPI_PHYSICAL_ADDRESS addr, UINT32 len) +{ + + /* Block address space wrapping on out-of-bound access */ + if (addr >= ATRTC_LAST_REG || addr + len > ATRTC_LAST_REG) + return (false); + + if (is_read) { + /* Reading 0x0C will muck with interrupts */ + if (addr <= RTC_INTR && addr + len > RTC_INTR) + return (false); + } else { + /* + * Allow single-byte writes to alarm registers and + * multi-byte writes to addr >= 0x30, else deny. + */ + if (!((len == 1 && (addr == RTC_SECALRM || + addr == RTC_MINALRM || + addr == RTC_HRSALRM)) || + addr >= 0x30)) + return (false); + } + return (true); +} + +static ACPI_STATUS +atrtc_acpi_cmos_handler(UINT32 func, ACPI_PHYSICAL_ADDRESS addr, + UINT32 bitwidth, UINT64 *value, void *context, void *region_context) +{ + device_t dev = context; + UINT32 bytewidth = howmany(bitwidth, 8); + bool is_read = func == ACPI_READ; + + /* ACPICA is very verbose on CMOS handler failures, so we, too */ +#define CMOS_HANDLER_ERR(fmt, ...) \ + device_printf(dev, "ACPI [SystemCMOS] handler: " fmt, ##__VA_ARGS__) + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + if (value == NULL) { + CMOS_HANDLER_ERR("NULL parameter\n"); + return (AE_BAD_PARAMETER); + } + if (bitwidth == 0 || (bitwidth & 0x07) != 0) { + CMOS_HANDLER_ERR("Invalid bitwidth: %u\n", bitwidth); + return (AE_BAD_PARAMETER); + } + if (!atrtc_check_cmos_access(is_read, addr, bytewidth)) { + CMOS_HANDLER_ERR("%s access rejected: addr=%#04jx, len=%u\n", + is_read ? "Read" : "Write", (uintmax_t)addr, bytewidth); + return (AE_BAD_PARAMETER); + } + + switch (func) { + case ACPI_READ: + rtcin_region(addr, value, bytewidth); + break; + case ACPI_WRITE: + rtcout_region(addr, value, bytewidth); + break; + default: + CMOS_HANDLER_ERR("Invalid function: %u\n", func); + return (AE_BAD_PARAMETER); + } + + ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), + "ACPI RTC CMOS %s access: addr=%#04x, len=%u, val=%*D\n", + is_read ? "read" : "write", (unsigned)addr, bytewidth, + bytewidth, value, " "); + + return (AE_OK); +} + +static int +atrtc_reg_acpi_cmos_handler(device_t dev) +{ + struct atrtc_softc *sc = device_get_softc(dev); + + ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); + + /* Don't handle address space events if driver is disabled. */ + if (acpi_disabled("atrtc")) + return (ENXIO); + + sc->acpi_handle = acpi_get_handle(dev); + if (sc->acpi_handle == NULL || + ACPI_FAILURE(AcpiInstallAddressSpaceHandler(sc->acpi_handle, + ACPI_ADR_SPACE_CMOS, atrtc_acpi_cmos_handler, NULL, dev))) { + sc->acpi_handle = NULL; + device_printf(dev, + "Can't register ACPI CMOS address space handler\n"); + return (ENXIO); + } + + return (0); +} + +static int +atrtc_unreg_acpi_cmos_handler(device_t dev) +{ + struct atrtc_softc *sc = device_get_softc(dev); + + ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); + + if (sc->acpi_handle != NULL) + AcpiRemoveAddressSpaceHandler(sc->acpi_handle, + ACPI_ADR_SPACE_CMOS, atrtc_acpi_cmos_handler); + + return (0); +} +#endif /* DEV_ACPI */ + +/* * Attach to the ISA PnP descriptors for the timer and realtime clock. */ static struct isa_pnp_id atrtc_ids[] = { @@ -258,12 +404,15 @@ static struct isa_pnp_id atrtc_ids[] = { static bool atrtc_acpi_disabled(void) { +#ifdef DEV_ACPI uint16_t flags; if (!acpi_get_fadt_bootflags(&flags)) return (false); return ((flags & ACPI_FADT_NO_CMOS_RTC) != 0); - return (true); +#else + return (false); +#endif } static int @@ -334,6 +483,37 @@ atrtc_attach(device_t dev) } static int +atrtc_isa_attach(device_t dev) +{ + + return (atrtc_attach(dev)); +} + +#ifdef DEV_ACPI +static int +atrtc_acpi_attach(device_t dev) +{ + int ret; + + ret = atrtc_attach(dev); + if (ret) + return (ret); + + (void)atrtc_reg_acpi_cmos_handler(dev); + + return (0); +} + +static int +atrtc_acpi_detach(device_t dev) +{ + + (void)atrtc_unreg_acpi_cmos_handler(dev); + return (0); +} +#endif /* DEV_ACPI */ + +static int atrtc_resume(device_t dev) { @@ -419,10 +599,10 @@ atrtc_gettime(device_t dev, struct timespec *ts) return (clock_bcd_to_ts(&bct, ts, false)); } -static device_method_t atrtc_methods[] = { +static device_method_t atrtc_isa_methods[] = { /* Device interface */ DEVMETHOD(device_probe, atrtc_probe), - DEVMETHOD(device_attach, atrtc_attach), + DEVMETHOD(device_attach, atrtc_isa_attach), DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), @@ -436,14 +616,39 @@ static device_method_t atrtc_methods[] = { { 0, 0 } }; -static driver_t atrtc_driver = { +static driver_t atrtc_isa_driver = { "atrtc", - atrtc_methods, + atrtc_isa_methods, sizeof(struct atrtc_softc), }; +#ifdef DEV_ACPI +static device_method_t atrtc_acpi_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, atrtc_probe), + DEVMETHOD(device_attach, atrtc_acpi_attach), + DEVMETHOD(device_detach, atrtc_acpi_detach), + /* XXX stop statclock? */ + DEVMETHOD(device_resume, atrtc_resume), + + /* clock interface */ + DEVMETHOD(clock_gettime, atrtc_gettime), + DEVMETHOD(clock_settime, atrtc_settime), + + { 0, 0 } +}; + +static driver_t atrtc_acpi_driver = { + "atrtc", + atrtc_acpi_methods, + sizeof(struct atrtc_softc), +}; +#endif /* DEV_ACPI */ + static devclass_t atrtc_devclass; -DRIVER_MODULE(atrtc, isa, atrtc_driver, atrtc_devclass, 0, 0); -DRIVER_MODULE(atrtc, acpi, atrtc_driver, atrtc_devclass, 0, 0); +DRIVER_MODULE(atrtc, isa, atrtc_isa_driver, atrtc_devclass, 0, 0); +#ifdef DEV_ACPI +DRIVER_MODULE(atrtc, acpi, atrtc_acpi_driver, atrtc_devclass, 0, 0); +#endif ISA_PNP_INFO(atrtc_ids); From owner-svn-src-all@freebsd.org Sun Mar 10 21:22:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7ACC21542614; Sun, 10 Mar 2019 21:22:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 917838F04B; Sun, 10 Mar 2019 21:22:14 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x2ALM1l7040649 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 10 Mar 2019 23:22:05 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x2ALM1l7040649 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x2ALM1DQ040648; Sun, 10 Mar 2019 23:22:01 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 10 Mar 2019 23:22:01 +0200 From: Konstantin Belousov To: Vladimir Kondratyev 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: r344984 - in stable/11: sbin/sysctl sys/dev/evdev Message-ID: <20190310212201.GS2492@kib.kiev.ua> References: <201903102058.x2AKwOmF050410@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201903102058.x2AKwOmF050410@repo.freebsd.org> User-Agent: Mutt/1.11.3 (2019-02-01) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 21:22:15 -0000 On Sun, Mar 10, 2019 at 08:58:24PM +0000, Vladimir Kondratyev wrote: > Author: wulf > Date: Sun Mar 10 20:58:24 2019 > New Revision: 344984 > URL: https://svnweb.freebsd.org/changeset/base/344984 > > Log: > MFC r344494,r344495: > > evdev: export event device properties through sysctl interface > > A big security advantage of Wayland is not allowing applications to read > input devices all the time. Having /dev/input/* accessible to the user > account subverts this advantage. > > libudev-devd was opening the evdev devices to detect their types (mouse, > keyboard, touchpad, etc). This don't work if /dev/input/* is inaccessible. > With the kernel exposing this information as sysctls (kern.evdev.input.*), > we can work w/o /dev/input/* access, preserving the Wayland security model. > > Submitted by: Greg V > Reviewed by: wulf, imp > Differential Revision: https://reviews.freebsd.org/D18694 > > Modified: > stable/11/sbin/sysctl/sysctl.c > stable/11/sys/dev/evdev/evdev.c > stable/11/sys/dev/evdev/evdev_private.h > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/sbin/sysctl/sysctl.c > ============================================================================== > --- stable/11/sbin/sysctl/sysctl.c Sun Mar 10 20:43:08 2019 (r344983) > +++ stable/11/sbin/sysctl/sysctl.c Sun Mar 10 20:58:24 2019 (r344984) > @@ -47,6 +47,7 @@ static const char rcsid[] = > #include > #include > #include > +#include > > #ifdef __amd64__ > #include > @@ -678,6 +679,22 @@ S_vmtotal(size_t l2, void *p) > return (0); > } > > +static int > +S_input_id(size_t l2, void *p) > +{ > + struct input_id *id = p; > + > + if (l2 != sizeof(*id)) { > + warnx("S_input_id %zu != %zu", l2, sizeof(*id)); > + return (1); > + } > + > + printf("{ bustype = 0x%04x, vendor = 0x%04x, " > + "product = 0x%04x, version = 0x%04x }", > + id->bustype, id->vendor, id->product, id->version); > + return (0); > +} > + > #ifdef __amd64__ > static int > S_efi_map(size_t l2, void *p) > @@ -1097,6 +1114,8 @@ show_var(int *oid, int nlen) > func = S_loadavg; > else if (strcmp(fmt, "S,vmtotal") == 0) > func = S_vmtotal; > + else if (strcmp(fmt, "S,input_id") == 0) > + func = S_input_id; > #ifdef __amd64__ > else if (strcmp(fmt, "S,efi_map_header") == 0) > func = S_efi_map; > > Modified: stable/11/sys/dev/evdev/evdev.c > ============================================================================== > --- stable/11/sys/dev/evdev/evdev.c Sun Mar 10 20:43:08 2019 (r344983) > +++ stable/11/sys/dev/evdev/evdev.c Sun Mar 10 20:58:24 2019 (r344984) > @@ -67,14 +67,16 @@ MALLOC_DEFINE(M_EVDEV, "evdev", "evdev memory"); > int evdev_rcpt_mask = EVDEV_RCPT_SYSMOUSE | EVDEV_RCPT_KBDMUX; > int evdev_sysmouse_t_axis = 0; > > -#ifdef EVDEV_SUPPORT > SYSCTL_NODE(_kern, OID_AUTO, evdev, CTLFLAG_RW, 0, "Evdev args"); > +#ifdef EVDEV_SUPPORT > SYSCTL_INT(_kern_evdev, OID_AUTO, rcpt_mask, CTLFLAG_RW, &evdev_rcpt_mask, 0, > "Who is receiving events: bit0 - sysmouse, bit1 - kbdmux, " > "bit2 - mouse hardware, bit3 - keyboard hardware"); > SYSCTL_INT(_kern_evdev, OID_AUTO, sysmouse_t_axis, CTLFLAG_RW, > &evdev_sysmouse_t_axis, 0, "Extract T-axis from 0-none, 1-ums, 2-psm"); > #endif > +SYSCTL_NODE(_kern_evdev, OID_AUTO, input, CTLFLAG_RD, 0, > + "Evdev input devices"); > > static void evdev_start_repeat(struct evdev_dev *, uint16_t); > static void evdev_stop_repeat(struct evdev_dev *); > @@ -194,6 +196,87 @@ evdev_estimate_report_size(struct evdev_dev *evdev) > return (size); > } > > +static void > +evdev_sysctl_create(struct evdev_dev *evdev) > +{ > + struct sysctl_oid *ev_sysctl_tree; > + char ev_unit_str[8]; > + > + snprintf(ev_unit_str, sizeof(ev_unit_str), "%d", evdev->ev_unit); > + sysctl_ctx_init(&evdev->ev_sysctl_ctx); > + > + ev_sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&evdev->ev_sysctl_ctx, > + SYSCTL_STATIC_CHILDREN(_kern_evdev_input), OID_AUTO, > + ev_unit_str, CTLFLAG_RD, NULL, "", "device index"); This change depends on r310051 which was not merged to stable/11. From owner-svn-src-all@freebsd.org Sun Mar 10 23:05:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A63E15459DC; Sun, 10 Mar 2019 23:05:39 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 32FAC6BD11; Sun, 10 Mar 2019 23:05:39 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 215EF1FFF; Sun, 10 Mar 2019 23:05:39 +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 x2AN5daQ017776; Sun, 10 Mar 2019 23:05:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2AN5c4s017775; Sun, 10 Mar 2019 23:05:38 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201903102305.x2AN5c4s017775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 10 Mar 2019 23:05:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r344987 - head/sys/dev/smartpqi X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/dev/smartpqi X-SVN-Commit-Revision: 344987 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 32FAC6BD11 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 23:05:39 -0000 Author: trasz Date: Sun Mar 10 23:05:38 2019 New Revision: 344987 URL: https://svnweb.freebsd.org/changeset/base/344987 Log: Fix crash in low memory conditions. Usual backtrace looked like this: pqisrc_build_sgl() at pqisrc_build_sgl+0x8d/frame 0xfffffe009e8b7a00 pqisrc_build_raid_io() at pqisrc_build_raid_io+0x231/frame 0xfffffe009e8b7a40 pqisrc_build_send_io() at pqisrc_build_send_io+0x375/frame 0xfffffe009e8b7b00 pqi_request_map_helper() at pqi_request_map_helper+0x282/frame 0xfffffe009e8b7ba0 bus_dmamap_load_ccb() at bus_dmamap_load_ccb+0xd7/frame 0xfffffe009e8b7c00 pqi_map_request() at pqi_map_request+0x9b/frame 0xfffffe009e8b7c70 pqisrc_io_start() at pqisrc_io_start+0x55c/frame 0xfffffe009e8b7d50 smartpqi_cam_action() at smartpqi_cam_action+0xb8/frame 0xfffffe009e8b7de0 xpt_run_devq() at xpt_run_devq+0x30a/frame 0xfffffe009e8b7e40 xpt_action_default() at xpt_action_default+0x94b/frame 0xfffffe009e8b7e90 dastart() at dastart+0x33b/frame 0xfffffe009e8b7ee0 xpt_run_allocq() at xpt_run_allocq+0x1a2/frame 0xfffffe009e8b7f30 dastrategy() at dastrategy+0x71/frame 0xfffffe009e8b7f60 g_disk_start() at g_disk_start+0x351/frame 0xfffffe009e8b7fc0 g_io_request() at g_io_request+0x3cf/frame 0xfffffe009e8b8010 g_part_start() at g_part_start+0x120/frame 0xfffffe009e8b8090 g_io_request() at g_io_request+0x3cf/frame 0xfffffe009e8b80e0 zio_vdev_io_start() at zio_vdev_io_start+0x4b2/frame 0xfffffe009e8b8140 zio_execute() at zio_execute+0x17c/frame 0xfffffe009e8b8180 zio_nowait() at zio_nowait+0xc4/frame 0xfffffe009e8b81b0 vdev_queue_io_done() at vdev_queue_io_done+0x138/frame 0xfffffe009e8b81f0 zio_vdev_io_done() at zio_vdev_io_done+0x151/frame 0xfffffe009e8b8220 zio_execute() at zio_execute+0x17c/frame 0xfffffe009e8b8260 taskqueue_run_locked() at taskqueue_run_locked+0x10c/frame 0xfffffe009e8b82c0 taskqueue_thread_loop() at taskqueue_thread_loop+0x88/frame 0xfffffe009e8b82f0 fork_exit() at fork_exit+0x84/frame 0xfffffe009e8b8330 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe009e8b8330 Reviewed by: deepak.ukey_microsemi.com, sbruno MFC after: 2 weeks Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D19470 Modified: head/sys/dev/smartpqi/smartpqi_cam.c Modified: head/sys/dev/smartpqi/smartpqi_cam.c ============================================================================== --- head/sys/dev/smartpqi/smartpqi_cam.c Sun Mar 10 21:43:13 2019 (r344986) +++ head/sys/dev/smartpqi/smartpqi_cam.c Sun Mar 10 23:05:38 2019 (r344987) @@ -483,13 +483,21 @@ pqi_request_map_helper(void *arg, bus_dma_segment_t *s } rcb->sgt = os_mem_alloc(softs, nseg * sizeof(rcb_t)); + if (rcb->sgt == NULL) { + xpt_freeze_simq(softs->os_specific.sim, 1); + rcb->cm_ccb->ccb_h.status |= (CAM_REQUEUE_REQ| + CAM_RELEASE_SIMQ); + DBG_ERR_BTL(rcb->dvp, "os_mem_alloc() failed; nseg = %d\n", nseg); + pqi_unmap_request(rcb); + xpt_done((union ccb *)rcb->cm_ccb); + return; + } + rcb->nseg = nseg; - if (rcb->sgt != NULL) { - for (int i = 0; i < nseg; i++) { - rcb->sgt[i].addr = segs[i].ds_addr; - rcb->sgt[i].len = segs[i].ds_len; - rcb->sgt[i].flags = 0; - } + for (int i = 0; i < nseg; i++) { + rcb->sgt[i].addr = segs[i].ds_addr; + rcb->sgt[i].len = segs[i].ds_len; + rcb->sgt[i].flags = 0; } if (rcb->data_dir == SOP_DATA_DIR_FROM_DEVICE) From owner-svn-src-all@freebsd.org Mon Mar 11 02:02:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C2351527F97; Mon, 11 Mar 2019 02:02:05 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 41C66725EE; Mon, 11 Mar 2019 02:02:05 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F36A3FF3; Mon, 11 Mar 2019 02:02:05 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2B225pH011326; Mon, 11 Mar 2019 02:02:05 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2B2244l011265; Mon, 11 Mar 2019 02:02:04 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903110202.x2B2244l011265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 11 Mar 2019 02:02:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r344994 - head/sys/dev/usb/wlan X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/dev/usb/wlan X-SVN-Commit-Revision: 344994 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 41C66725EE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 02:02:05 -0000 Author: avos Date: Mon Mar 11 02:02:04 2019 New Revision: 344994 URL: https://svnweb.freebsd.org/changeset/base/344994 Log: urtw(4): add promiscuous mode callback Also, pass control frames to the host while in MONITOR mode and / or when promiscuous mode is enabled. Tested with Netgear WG111 v3 (RTL8187B), STA / MONITOR modes. MFC after: 2 weeks Modified: head/sys/dev/usb/wlan/if_urtw.c Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Mon Mar 11 01:45:26 2019 (r344993) +++ head/sys/dev/usb/wlan/if_urtw.c Mon Mar 11 02:02:04 2019 (r344994) @@ -670,6 +670,7 @@ static void urtw_scan_end(struct ieee80211com *); static void urtw_getradiocaps(struct ieee80211com *, int, int *, struct ieee80211_channel[]); static void urtw_set_channel(struct ieee80211com *); +static void urtw_update_promisc(struct ieee80211com *); static void urtw_update_mcast(struct ieee80211com *); static int urtw_tx_start(struct urtw_softc *, struct ieee80211_node *, struct mbuf *, @@ -896,6 +897,7 @@ urtw_attach(device_t dev) ic->ic_updateslot = urtw_updateslot; ic->ic_vap_create = urtw_vap_create; ic->ic_vap_delete = urtw_vap_delete; + ic->ic_update_promisc = urtw_update_promisc; ic->ic_update_mcast = urtw_update_mcast; ic->ic_parent = urtw_parent; ic->ic_transmit = urtw_transmit; @@ -1631,6 +1633,17 @@ fail: } static void +urtw_update_promisc(struct ieee80211com *ic) +{ + struct urtw_softc *sc = ic->ic_softc; + + URTW_LOCK(sc); + if (sc->sc_flags & URTW_RUNNING) + urtw_rx_setconf(sc); + URTW_UNLOCK(sc); +} + +static void urtw_update_mcast(struct ieee80211com *ic) { @@ -3873,7 +3886,6 @@ urtw_rx_setconf(struct urtw_softc *sc) if (sc->sc_flags & URTW_RTL8187B) { data = data | URTW_RX_FILTER_MNG | URTW_RX_FILTER_DATA | URTW_RX_FILTER_MCAST | URTW_RX_FILTER_BCAST | - URTW_RX_FILTER_NICMAC | URTW_RX_CHECK_BSSID | URTW_RX_FIFO_THRESHOLD_NONE | URTW_MAX_RX_DMA_2048 | URTW_RX_AUTORESETPHY | URTW_RCR_ONLYERLPKT; @@ -3888,19 +3900,21 @@ urtw_rx_setconf(struct urtw_softc *sc) if (sc->sc_crcmon == 1 && ic->ic_opmode == IEEE80211_M_MONITOR) data = data | URTW_RX_FILTER_CRCERR; - if (ic->ic_opmode == IEEE80211_M_MONITOR || - ic->ic_promisc > 0 || ic->ic_allmulti > 0) { - data = data | URTW_RX_FILTER_ALLMAC; - } else { - data = data | URTW_RX_FILTER_NICMAC; - data = data | URTW_RX_CHECK_BSSID; - } - data = data &~ URTW_RX_FIFO_THRESHOLD_MASK; data = data | URTW_RX_FIFO_THRESHOLD_NONE | URTW_RX_AUTORESETPHY; data = data &~ URTW_MAX_RX_DMA_MASK; data = data | URTW_MAX_RX_DMA_2048 | URTW_RCR_ONLYERLPKT; + } + + /* XXX allmulti should not be checked here... */ + if (ic->ic_opmode == IEEE80211_M_MONITOR || + ic->ic_promisc > 0 || ic->ic_allmulti > 0) { + data = data | URTW_RX_FILTER_CTL; + data = data | URTW_RX_FILTER_ALLMAC; + } else { + data = data | URTW_RX_FILTER_NICMAC; + data = data | URTW_RX_CHECK_BSSID; } urtw_write32_m(sc, URTW_RX, data); From owner-svn-src-all@freebsd.org Mon Mar 11 01:12:24 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 616401526A53; Mon, 11 Mar 2019 01:12:24 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B285870B73; Mon, 11 Mar 2019 01:12:23 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E54E37AB; Mon, 11 Mar 2019 01:12:23 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2B1CNBU085056; Mon, 11 Mar 2019 01:12:23 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2B1CNAk085055; Mon, 11 Mar 2019 01:12:23 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201903110112.x2B1CNAk085055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 11 Mar 2019 01:12: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: r344989 - stable/11/sys/geom/eli X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sys/geom/eli X-SVN-Commit-Revision: 344989 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B285870B73 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 01:12:24 -0000 Author: kevans Date: Mon Mar 11 01:12:23 2019 New Revision: 344989 URL: https://svnweb.freebsd.org/changeset/base/344989 Log: MFC r336255: Only define g_eli_key_cmp in the kernel Modified: stable/11/sys/geom/eli/g_eli_key_cache.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/eli/g_eli_key_cache.c ============================================================================== --- stable/11/sys/geom/eli/g_eli_key_cache.c Mon Mar 11 00:52:55 2019 (r344988) +++ stable/11/sys/geom/eli/g_eli_key_cache.c Mon Mar 11 01:12:23 2019 (r344989) @@ -59,8 +59,6 @@ static uint64_t g_eli_key_cache_misses; SYSCTL_UQUAD(_kern_geom_eli, OID_AUTO, key_cache_misses, CTLFLAG_RW, &g_eli_key_cache_misses, 0, "Key cache misses"); -#endif /* _KERNEL */ - static int g_eli_key_cmp(const struct g_eli_key *a, const struct g_eli_key *b) { @@ -71,6 +69,7 @@ g_eli_key_cmp(const struct g_eli_key *a, const struct return (-1); return (0); } +#endif /* _KERNEL */ void g_eli_key_fill(struct g_eli_softc *sc, struct g_eli_key *key, uint64_t keyno) From owner-svn-src-all@freebsd.org Sun Mar 10 20:43:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D41F1541517; Sun, 10 Mar 2019 20:43:09 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2395D8D8EC; Sun, 10 Mar 2019 20:43:09 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 17FDD7D9; Sun, 10 Mar 2019 20:43:09 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2AKh8OD044748; Sun, 10 Mar 2019 20:43:08 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2AKh87N044745; Sun, 10 Mar 2019 20:43:08 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201903102043.x2AKh87N044745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Sun, 10 Mar 2019 20:43:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344983 - in stable/12: sbin/sysctl sys/dev/evdev X-SVN-Group: stable-12 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: in stable/12: sbin/sysctl sys/dev/evdev X-SVN-Commit-Revision: 344983 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2395D8D8EC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 20:43:09 -0000 Author: wulf Date: Sun Mar 10 20:43:08 2019 New Revision: 344983 URL: https://svnweb.freebsd.org/changeset/base/344983 Log: MFC r344494,r344495: evdev: export event device properties through sysctl interface A big security advantage of Wayland is not allowing applications to read input devices all the time. Having /dev/input/* accessible to the user account subverts this advantage. libudev-devd was opening the evdev devices to detect their types (mouse, keyboard, touchpad, etc). This don't work if /dev/input/* is inaccessible. With the kernel exposing this information as sysctls (kern.evdev.input.*), we can work w/o /dev/input/* access, preserving the Wayland security model. Submitted by: Greg V Reviewed by: wulf, imp Differential Revision: https://reviews.freebsd.org/D18694 Modified: stable/12/sbin/sysctl/sysctl.c stable/12/sys/dev/evdev/evdev.c stable/12/sys/dev/evdev/evdev_private.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/sysctl/sysctl.c ============================================================================== --- stable/12/sbin/sysctl/sysctl.c Sun Mar 10 20:19:43 2019 (r344982) +++ stable/12/sbin/sysctl/sysctl.c Sun Mar 10 20:43:08 2019 (r344983) @@ -49,6 +49,7 @@ static const char rcsid[] = #include #include #include +#include #ifdef __amd64__ #include @@ -680,6 +681,22 @@ S_vmtotal(size_t l2, void *p) return (0); } +static int +S_input_id(size_t l2, void *p) +{ + struct input_id *id = p; + + if (l2 != sizeof(*id)) { + warnx("S_input_id %zu != %zu", l2, sizeof(*id)); + return (1); + } + + printf("{ bustype = 0x%04x, vendor = 0x%04x, " + "product = 0x%04x, version = 0x%04x }", + id->bustype, id->vendor, id->product, id->version); + return (0); +} + #ifdef __amd64__ static int S_efi_map(size_t l2, void *p) @@ -983,6 +1000,8 @@ show_var(int *oid, int nlen) func = S_loadavg; else if (strcmp(fmt, "S,vmtotal") == 0) func = S_vmtotal; + else if (strcmp(fmt, "S,input_id") == 0) + func = S_input_id; #ifdef __amd64__ else if (strcmp(fmt, "S,efi_map_header") == 0) func = S_efi_map; Modified: stable/12/sys/dev/evdev/evdev.c ============================================================================== --- stable/12/sys/dev/evdev/evdev.c Sun Mar 10 20:19:43 2019 (r344982) +++ stable/12/sys/dev/evdev/evdev.c Sun Mar 10 20:43:08 2019 (r344983) @@ -69,14 +69,16 @@ MALLOC_DEFINE(M_EVDEV, "evdev", "evdev memory"); int evdev_rcpt_mask = EVDEV_RCPT_SYSMOUSE | EVDEV_RCPT_KBDMUX; int evdev_sysmouse_t_axis = 0; -#ifdef EVDEV_SUPPORT SYSCTL_NODE(_kern, OID_AUTO, evdev, CTLFLAG_RW, 0, "Evdev args"); +#ifdef EVDEV_SUPPORT SYSCTL_INT(_kern_evdev, OID_AUTO, rcpt_mask, CTLFLAG_RW, &evdev_rcpt_mask, 0, "Who is receiving events: bit0 - sysmouse, bit1 - kbdmux, " "bit2 - mouse hardware, bit3 - keyboard hardware"); SYSCTL_INT(_kern_evdev, OID_AUTO, sysmouse_t_axis, CTLFLAG_RW, &evdev_sysmouse_t_axis, 0, "Extract T-axis from 0-none, 1-ums, 2-psm"); #endif +SYSCTL_NODE(_kern_evdev, OID_AUTO, input, CTLFLAG_RD, 0, + "Evdev input devices"); static void evdev_start_repeat(struct evdev_dev *, uint16_t); static void evdev_stop_repeat(struct evdev_dev *); @@ -196,6 +198,87 @@ evdev_estimate_report_size(struct evdev_dev *evdev) return (size); } +static void +evdev_sysctl_create(struct evdev_dev *evdev) +{ + struct sysctl_oid *ev_sysctl_tree; + char ev_unit_str[8]; + + snprintf(ev_unit_str, sizeof(ev_unit_str), "%d", evdev->ev_unit); + sysctl_ctx_init(&evdev->ev_sysctl_ctx); + + ev_sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&evdev->ev_sysctl_ctx, + SYSCTL_STATIC_CHILDREN(_kern_evdev_input), OID_AUTO, + ev_unit_str, CTLFLAG_RD, NULL, "", "device index"); + + SYSCTL_ADD_STRING(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "name", CTLFLAG_RD, + evdev->ev_name, 0, + "Input device name"); + + SYSCTL_ADD_STRUCT(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "id", CTLFLAG_RD, + &evdev->ev_id, input_id, + "Input device identification"); + + /* ioctl returns ENOENT if phys is not set. sysctl returns "" here */ + SYSCTL_ADD_STRING(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "phys", CTLFLAG_RD, + evdev->ev_shortname, 0, + "Input device short name"); + + /* ioctl returns ENOENT if uniq is not set. sysctl returns "" here */ + SYSCTL_ADD_STRING(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "uniq", CTLFLAG_RD, + evdev->ev_serial, 0, + "Input device unique number"); + + SYSCTL_ADD_OPAQUE(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "props", CTLFLAG_RD, + evdev->ev_prop_flags, sizeof(evdev->ev_prop_flags), "", + "Input device properties"); + + SYSCTL_ADD_OPAQUE(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "type_bits", CTLFLAG_RD, + evdev->ev_type_flags, sizeof(evdev->ev_type_flags), "", + "Input device supported events types"); + + SYSCTL_ADD_OPAQUE(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "key_bits", CTLFLAG_RD, + evdev->ev_key_flags, sizeof(evdev->ev_key_flags), + "", "Input device supported keys"); + + SYSCTL_ADD_OPAQUE(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "rel_bits", CTLFLAG_RD, + evdev->ev_rel_flags, sizeof(evdev->ev_rel_flags), "", + "Input device supported relative events"); + + SYSCTL_ADD_OPAQUE(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "abs_bits", CTLFLAG_RD, + evdev->ev_abs_flags, sizeof(evdev->ev_abs_flags), "", + "Input device supported absolute events"); + + SYSCTL_ADD_OPAQUE(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "msc_bits", CTLFLAG_RD, + evdev->ev_msc_flags, sizeof(evdev->ev_msc_flags), "", + "Input device supported miscellaneous events"); + + SYSCTL_ADD_OPAQUE(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "led_bits", CTLFLAG_RD, + evdev->ev_led_flags, sizeof(evdev->ev_led_flags), "", + "Input device supported LED events"); + + SYSCTL_ADD_OPAQUE(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "snd_bits", CTLFLAG_RD, + evdev->ev_snd_flags, sizeof(evdev->ev_snd_flags), "", + "Input device supported sound events"); + + SYSCTL_ADD_OPAQUE(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "sw_bits", CTLFLAG_RD, + evdev->ev_sw_flags, sizeof(evdev->ev_sw_flags), "", + "Input device supported switch events"); +} + static int evdev_register_common(struct evdev_dev *evdev) { @@ -235,6 +318,12 @@ evdev_register_common(struct evdev_dev *evdev) /* Create char device node */ ret = evdev_cdev_create(evdev); + if (ret != 0) + goto bail_out; + + /* Create sysctls (for device enumeration without /dev/input access rights) */ + evdev_sysctl_create(evdev); + bail_out: return (ret); } @@ -271,6 +360,8 @@ evdev_unregister(struct evdev_dev *evdev) int ret; debugf(evdev, "%s: unregistered evdev provider: %s\n", evdev->ev_shortname, evdev->ev_name); + + sysctl_ctx_free(&evdev->ev_sysctl_ctx); EVDEV_LOCK(evdev); evdev->ev_cdev->si_drv1 = NULL; Modified: stable/12/sys/dev/evdev/evdev_private.h ============================================================================== --- stable/12/sys/dev/evdev/evdev_private.h Sun Mar 10 20:19:43 2019 (r344982) +++ stable/12/sys/dev/evdev/evdev_private.h Sun Mar 10 20:43:08 2019 (r344983) @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -131,6 +132,9 @@ struct evdev_dev /* Parent driver callbacks: */ const struct evdev_methods * ev_methods; void * ev_softc; + + /* Sysctl: */ + struct sysctl_ctx_list ev_sysctl_ctx; LIST_ENTRY(evdev_dev) ev_link; LIST_HEAD(, evdev_client) ev_clients; From owner-svn-src-all@freebsd.org Sun Mar 10 20:58:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C5511541ABE; Sun, 10 Mar 2019 20:58:25 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D42C8DF8C; Sun, 10 Mar 2019 20:58:25 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F1E4C993; Sun, 10 Mar 2019 20:58:24 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2AKwOQa050412; Sun, 10 Mar 2019 20:58:24 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2AKwOmF050410; Sun, 10 Mar 2019 20:58:24 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201903102058.x2AKwOmF050410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Sun, 10 Mar 2019 20:58:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r344984 - in stable/11: sbin/sysctl sys/dev/evdev X-SVN-Group: stable-11 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: in stable/11: sbin/sysctl sys/dev/evdev X-SVN-Commit-Revision: 344984 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0D42C8DF8C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 20:58:25 -0000 Author: wulf Date: Sun Mar 10 20:58:24 2019 New Revision: 344984 URL: https://svnweb.freebsd.org/changeset/base/344984 Log: MFC r344494,r344495: evdev: export event device properties through sysctl interface A big security advantage of Wayland is not allowing applications to read input devices all the time. Having /dev/input/* accessible to the user account subverts this advantage. libudev-devd was opening the evdev devices to detect their types (mouse, keyboard, touchpad, etc). This don't work if /dev/input/* is inaccessible. With the kernel exposing this information as sysctls (kern.evdev.input.*), we can work w/o /dev/input/* access, preserving the Wayland security model. Submitted by: Greg V Reviewed by: wulf, imp Differential Revision: https://reviews.freebsd.org/D18694 Modified: stable/11/sbin/sysctl/sysctl.c stable/11/sys/dev/evdev/evdev.c stable/11/sys/dev/evdev/evdev_private.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/sysctl/sysctl.c ============================================================================== --- stable/11/sbin/sysctl/sysctl.c Sun Mar 10 20:43:08 2019 (r344983) +++ stable/11/sbin/sysctl/sysctl.c Sun Mar 10 20:58:24 2019 (r344984) @@ -47,6 +47,7 @@ static const char rcsid[] = #include #include #include +#include #ifdef __amd64__ #include @@ -678,6 +679,22 @@ S_vmtotal(size_t l2, void *p) return (0); } +static int +S_input_id(size_t l2, void *p) +{ + struct input_id *id = p; + + if (l2 != sizeof(*id)) { + warnx("S_input_id %zu != %zu", l2, sizeof(*id)); + return (1); + } + + printf("{ bustype = 0x%04x, vendor = 0x%04x, " + "product = 0x%04x, version = 0x%04x }", + id->bustype, id->vendor, id->product, id->version); + return (0); +} + #ifdef __amd64__ static int S_efi_map(size_t l2, void *p) @@ -1097,6 +1114,8 @@ show_var(int *oid, int nlen) func = S_loadavg; else if (strcmp(fmt, "S,vmtotal") == 0) func = S_vmtotal; + else if (strcmp(fmt, "S,input_id") == 0) + func = S_input_id; #ifdef __amd64__ else if (strcmp(fmt, "S,efi_map_header") == 0) func = S_efi_map; Modified: stable/11/sys/dev/evdev/evdev.c ============================================================================== --- stable/11/sys/dev/evdev/evdev.c Sun Mar 10 20:43:08 2019 (r344983) +++ stable/11/sys/dev/evdev/evdev.c Sun Mar 10 20:58:24 2019 (r344984) @@ -67,14 +67,16 @@ MALLOC_DEFINE(M_EVDEV, "evdev", "evdev memory"); int evdev_rcpt_mask = EVDEV_RCPT_SYSMOUSE | EVDEV_RCPT_KBDMUX; int evdev_sysmouse_t_axis = 0; -#ifdef EVDEV_SUPPORT SYSCTL_NODE(_kern, OID_AUTO, evdev, CTLFLAG_RW, 0, "Evdev args"); +#ifdef EVDEV_SUPPORT SYSCTL_INT(_kern_evdev, OID_AUTO, rcpt_mask, CTLFLAG_RW, &evdev_rcpt_mask, 0, "Who is receiving events: bit0 - sysmouse, bit1 - kbdmux, " "bit2 - mouse hardware, bit3 - keyboard hardware"); SYSCTL_INT(_kern_evdev, OID_AUTO, sysmouse_t_axis, CTLFLAG_RW, &evdev_sysmouse_t_axis, 0, "Extract T-axis from 0-none, 1-ums, 2-psm"); #endif +SYSCTL_NODE(_kern_evdev, OID_AUTO, input, CTLFLAG_RD, 0, + "Evdev input devices"); static void evdev_start_repeat(struct evdev_dev *, uint16_t); static void evdev_stop_repeat(struct evdev_dev *); @@ -194,6 +196,87 @@ evdev_estimate_report_size(struct evdev_dev *evdev) return (size); } +static void +evdev_sysctl_create(struct evdev_dev *evdev) +{ + struct sysctl_oid *ev_sysctl_tree; + char ev_unit_str[8]; + + snprintf(ev_unit_str, sizeof(ev_unit_str), "%d", evdev->ev_unit); + sysctl_ctx_init(&evdev->ev_sysctl_ctx); + + ev_sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&evdev->ev_sysctl_ctx, + SYSCTL_STATIC_CHILDREN(_kern_evdev_input), OID_AUTO, + ev_unit_str, CTLFLAG_RD, NULL, "", "device index"); + + SYSCTL_ADD_STRING(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "name", CTLFLAG_RD, + evdev->ev_name, 0, + "Input device name"); + + SYSCTL_ADD_STRUCT(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "id", CTLFLAG_RD, + &evdev->ev_id, input_id, + "Input device identification"); + + /* ioctl returns ENOENT if phys is not set. sysctl returns "" here */ + SYSCTL_ADD_STRING(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "phys", CTLFLAG_RD, + evdev->ev_shortname, 0, + "Input device short name"); + + /* ioctl returns ENOENT if uniq is not set. sysctl returns "" here */ + SYSCTL_ADD_STRING(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "uniq", CTLFLAG_RD, + evdev->ev_serial, 0, + "Input device unique number"); + + SYSCTL_ADD_OPAQUE(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "props", CTLFLAG_RD, + evdev->ev_prop_flags, sizeof(evdev->ev_prop_flags), "", + "Input device properties"); + + SYSCTL_ADD_OPAQUE(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "type_bits", CTLFLAG_RD, + evdev->ev_type_flags, sizeof(evdev->ev_type_flags), "", + "Input device supported events types"); + + SYSCTL_ADD_OPAQUE(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "key_bits", CTLFLAG_RD, + evdev->ev_key_flags, sizeof(evdev->ev_key_flags), + "", "Input device supported keys"); + + SYSCTL_ADD_OPAQUE(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "rel_bits", CTLFLAG_RD, + evdev->ev_rel_flags, sizeof(evdev->ev_rel_flags), "", + "Input device supported relative events"); + + SYSCTL_ADD_OPAQUE(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "abs_bits", CTLFLAG_RD, + evdev->ev_abs_flags, sizeof(evdev->ev_abs_flags), "", + "Input device supported absolute events"); + + SYSCTL_ADD_OPAQUE(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "msc_bits", CTLFLAG_RD, + evdev->ev_msc_flags, sizeof(evdev->ev_msc_flags), "", + "Input device supported miscellaneous events"); + + SYSCTL_ADD_OPAQUE(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "led_bits", CTLFLAG_RD, + evdev->ev_led_flags, sizeof(evdev->ev_led_flags), "", + "Input device supported LED events"); + + SYSCTL_ADD_OPAQUE(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "snd_bits", CTLFLAG_RD, + evdev->ev_snd_flags, sizeof(evdev->ev_snd_flags), "", + "Input device supported sound events"); + + SYSCTL_ADD_OPAQUE(&evdev->ev_sysctl_ctx, + SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "sw_bits", CTLFLAG_RD, + evdev->ev_sw_flags, sizeof(evdev->ev_sw_flags), "", + "Input device supported switch events"); +} + static int evdev_register_common(struct evdev_dev *evdev) { @@ -233,6 +316,12 @@ evdev_register_common(struct evdev_dev *evdev) /* Create char device node */ ret = evdev_cdev_create(evdev); + if (ret != 0) + goto bail_out; + + /* Create sysctls (for device enumeration without /dev/input access rights) */ + evdev_sysctl_create(evdev); + bail_out: return (ret); } @@ -269,6 +358,8 @@ evdev_unregister(struct evdev_dev *evdev) int ret; debugf(evdev, "%s: unregistered evdev provider: %s\n", evdev->ev_shortname, evdev->ev_name); + + sysctl_ctx_free(&evdev->ev_sysctl_ctx); EVDEV_LOCK(evdev); evdev->ev_cdev->si_drv1 = NULL; Modified: stable/11/sys/dev/evdev/evdev_private.h ============================================================================== --- stable/11/sys/dev/evdev/evdev_private.h Sun Mar 10 20:43:08 2019 (r344983) +++ stable/11/sys/dev/evdev/evdev_private.h Sun Mar 10 20:58:24 2019 (r344984) @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -127,6 +128,9 @@ struct evdev_dev /* Parent driver callbacks: */ const struct evdev_methods * ev_methods; void * ev_softc; + + /* Sysctl: */ + struct sysctl_ctx_list ev_sysctl_ctx; LIST_ENTRY(evdev_dev) ev_link; LIST_HEAD(, evdev_client) ev_clients; From owner-svn-src-all@freebsd.org Mon Mar 11 01:45:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A9591527A1C; Mon, 11 Mar 2019 01:45:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C91172093; Mon, 11 Mar 2019 01:45:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 083A53D8C; Mon, 11 Mar 2019 01:45:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2B1jQVl001851; Mon, 11 Mar 2019 01:45:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2B1jQux001850; Mon, 11 Mar 2019 01:45:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903110145.x2B1jQux001850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 11 Mar 2019 01:45:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344993 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 344993 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1C91172093 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 01:45:27 -0000 Author: mav Date: Mon Mar 11 01:45:26 2019 New Revision: 344993 URL: https://svnweb.freebsd.org/changeset/base/344993 Log: MFC r344782: bridge: Fix spurious warnings about capabilities Mask off the bits we don't care about when checking that capabilities of the member interfaces have been disabled as intended. Modified: stable/12/sys/net/if_bridge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if_bridge.c ============================================================================== --- stable/12/sys/net/if_bridge.c Mon Mar 11 01:44:37 2019 (r344992) +++ stable/12/sys/net/if_bridge.c Mon Mar 11 01:45:26 2019 (r344993) @@ -925,7 +925,7 @@ bridge_set_ifcap(struct bridge_softc *sc, struct bridg { struct ifnet *ifp = bif->bif_ifp; struct ifreq ifr; - int error; + int error, mask, stuck; BRIDGE_UNLOCK_ASSERT(sc); @@ -938,10 +938,12 @@ bridge_set_ifcap(struct bridge_softc *sc, struct bridg if_printf(sc->sc_ifp, "error setting capabilities on %s: %d\n", ifp->if_xname, error); - if ((ifp->if_capenable & ~set) != 0) + mask = BRIDGE_IFCAPS_MASK | BRIDGE_IFCAPS_STRIP; + stuck = ifp->if_capenable & mask & ~set; + if (stuck != 0) if_printf(sc->sc_ifp, "can't disable some capabilities on %s: 0x%x\n", - ifp->if_xname, ifp->if_capenable & ~set); + ifp->if_xname, stuck); } } From owner-svn-src-all@freebsd.org Mon Mar 11 02:24:26 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C17E31528C59 for ; Mon, 11 Mar 2019 02:24:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B20D7363E for ; Mon, 11 Mar 2019 02:24:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x734.google.com with SMTP id z3so1864158qkf.5 for ; Sun, 10 Mar 2019 19:24:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=t83DPOiEb8StNtEMX1wiZcpkXFBlXH5lDIUpA8kwqak=; b=YASHFDu2zt/a/YsjGG3Otn1ZEsWJDZU/9BTd647d4jH4MR80coRc5PXE+ppakwa5cr 7yVxJKPYT+1TFBYl7hbC4gwdrI8YN1aNfP56MR2RMORB27z8Edxe8HbM3L6UPaC+AntW 5hGVXwX5XilpLUUHGgT4LYvwIwqjgfwnyFXOo7FNYKV0zvC8Tn/FN6xCoJkN9lvF/HdM YdOX+H4HO4smjy7uVFHm6k94zJtFbcJ0sD4XRFDxhzU5/b+mtBTyDJt4iO7yCA/K5tYE 2ISsWj3gKD1EuZ27qJUD/9js9cFSgsDd9H8mgJ/NWc8d3zoQFa3MgMSzZJhbNyaPPb7M bQBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=t83DPOiEb8StNtEMX1wiZcpkXFBlXH5lDIUpA8kwqak=; b=ig9ckbd2qILilPsIIlE5Cg6V/bT9QR+kHHTeDWXtj9cCaGqcPDMbkPa8oC31gyOP/j 7i5xvzW5xlDUa3lm6sEi91TussQnd9EYSln9IkjeWxRg0PAen4u3G8zmRUzCzl5irw78 1jNQt0EWcPFZbs5yP/OfTeaIxcXNtX7Bv+lN5SxX6kBnyBNoGSVBsD1lLLiYtdakYWp9 JEkC9C3nXqO5PmAeUTEfpSnvGnAcWs9w4WEDSevyn/lfT7R/HQZZyZS2/fjnp5Q1wtGy jfJMT0m2pThuK5LPgT5dFdw9RBWPMNi5FrYrDliEH/5/EL87yre0iACbeViF2ZHMHqvy ZmPQ== X-Gm-Message-State: APjAAAXfmASAAHNpW6Ve5LxUIqp9OqJfLF7kjpaun3CgEpkd4sZDL+dD gzBRyJooOPOpRzdII+9jEypifKtWYj6NXijoxYa7Ew== X-Google-Smtp-Source: APXvYqyWJE5HE5BPlxSpgDJzqZGWveLYGq4qZHWKEZKcOszWLNc7SCsVlg7veiJqwzeMOOaJbN8ggFQlcw7lmEu9Kmw= X-Received: by 2002:a05:620a:1393:: with SMTP id k19mr10972014qki.245.1552271064907; Sun, 10 Mar 2019 19:24:24 -0700 (PDT) MIME-Version: 1.0 References: <201903110127.x2B1R2as090886@repo.freebsd.org> <5c85c429.1c69fb81.1869f.e87bSMTPIN_ADDED_BROKEN@mx.google.com> In-Reply-To: <5c85c429.1c69fb81.1869f.e87bSMTPIN_ADDED_BROKEN@mx.google.com> From: Warner Losh Date: Sun, 10 Mar 2019 20:24:12 -0600 Message-ID: Subject: Re: svn commit: r344990 - in head: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn sys/... To: "Rodney W. Grimes" Cc: Andriy Voskoboinyk , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 9B20D7363E X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=YASHFDu2 X-Spamd-Result: default: False [-5.44 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; MX_GOOD(-0.01)[cached: ALT1.aspmx.l.google.com]; RCVD_IN_DNSWL_NONE(0.00)[4.3.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.70)[-0.702,0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; IP_SCORE(-2.73)[ip: (-8.79), ipnet: 2607:f8b0::/32(-2.74), asn: 15169(-2.07), country: US(-0.07)]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 02:24:27 -0000 On Sun, Mar 10, 2019 at 8:12 PM Rodney W. Grimes wrote: > > Author: avos > > Date: Mon Mar 11 01:27:01 2019 > > New Revision: 344990 > > URL: https://svnweb.freebsd.org/changeset/base/344990 > > > > Log: > > Fix ieee80211_radiotap(9) usage in wireless drivers: > > > > - Alignment issues: > > * Add missing __packed attributes + padding across all drivers; in > > most places there was an assumption that padding will be always > > minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) - > > padding was just missing. > > * Add __aligned(8) attribute for all Rx radiotap headers since they > can > > contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, > so > > just drop the attribute here. Refresh ieee80211_radiotap(9) man page > > accordingly. > > > > - Since net80211 automatically updates channel frequency / flags in > > ieee80211_radiotap_chan_change() drop duplicate setup for these fields > > in drivers. > > > > Tested with Netgear WG111 v3 (urtw(4)), STA mode. > > > > MFC after: 2 weeks > > Isnt this going to seriously break module load compatibility > due to struct size and alignment changes if you merge this to stable/12? > It looks like all these changes are within the modules, not in the KBI... It looks like this will make things work better on architectures that don't like unaligned accesses. It seems like modules that aren't updated don't work today on those architectures... Warner > > Modified: > > head/share/man/man9/ieee80211_radiotap.9 > > head/sys/dev/ath/if_athioctl.h > > head/sys/dev/bwi/if_bwi.c > > head/sys/dev/bwi/if_bwivar.h > > head/sys/dev/bwn/if_bwn.c > > head/sys/dev/bwn/if_bwnvar.h > ... > > > -- > Rod Grimes > rgrimes@freebsd.org > > From owner-svn-src-all@freebsd.org Mon Mar 11 03:00:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69A06152A35B; Mon, 11 Mar 2019 03:00:34 +0000 (UTC) (envelope-from sef@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 08C5975173; Mon, 11 Mar 2019 03:00:34 +0000 (UTC) (envelope-from sef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F24DA4999; Mon, 11 Mar 2019 03:00:33 +0000 (UTC) (envelope-from sef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2B30XNt038462; Mon, 11 Mar 2019 03:00:33 GMT (envelope-from sef@FreeBSD.org) Received: (from sef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2B30XnL038461; Mon, 11 Mar 2019 03:00:33 GMT (envelope-from sef@FreeBSD.org) Message-Id: <201903110300.x2B30XnL038461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sef set sender to sef@FreeBSD.org using -f From: Sean Eric Fagan Date: Mon, 11 Mar 2019 03:00:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344997 - stable/12/lib/libutil X-SVN-Group: stable-12 X-SVN-Commit-Author: sef X-SVN-Commit-Paths: stable/12/lib/libutil X-SVN-Commit-Revision: 344997 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 08C5975173 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.94)[-0.936,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 03:00:34 -0000 Author: sef Date: Mon Mar 11 03:00:33 2019 New Revision: 344997 URL: https://svnweb.freebsd.org/changeset/base/344997 Log: MFC r343881 r339008 broke repquota for UFS. This rectifies that. Refactor the function calls and tests so that, on UFS, the proper fields are filled out. PR: 233849 Modified: stable/12/lib/libutil/quotafile.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libutil/quotafile.c ============================================================================== --- stable/12/lib/libutil/quotafile.c Mon Mar 11 02:57:00 2019 (r344996) +++ stable/12/lib/libutil/quotafile.c Mon Mar 11 03:00:33 2019 (r344997) @@ -119,6 +119,7 @@ quota_open(struct fstab *fs, int quotatype, int openfl struct group *grp; struct stat st; int qcmd, serrno; + int ufs; if ((qf = calloc(1, sizeof(*qf))) == NULL) return (NULL); @@ -129,15 +130,21 @@ quota_open(struct fstab *fs, int quotatype, int openfl goto error; qf->dev = st.st_dev; qcmd = QCMD(Q_GETQUOTASIZE, quotatype); + ufs = strcmp(fs->fs_vfstype, "ufs") == 0; + /* + * On UFS, hasquota() fills in qf->qfname. But we only care about + * this for UFS. So we need to call hasquota() for UFS, first. + */ + if (ufs) { + serrno = hasquota(fs, quotatype, qf->qfname, + sizeof(qf->qfname)); + } if (quotactl(qf->fsname, qcmd, 0, &qf->wordsize) == 0) return (qf); - /* We only check the quota file for ufs */ - if (strcmp(fs->fs_vfstype, "ufs")) { + if (!ufs) { errno = 0; goto error; - } - serrno = hasquota(fs, quotatype, qf->qfname, sizeof(qf->qfname)); - if (serrno == 0) { + } else if (serrno == 0) { errno = EOPNOTSUPP; goto error; } From owner-svn-src-all@freebsd.org Mon Mar 11 00:52:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2CE01525779; Mon, 11 Mar 2019 00:52:56 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 452C26FB98; Mon, 11 Mar 2019 00:52:56 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3AD9F32A6; Mon, 11 Mar 2019 00:52:56 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2B0qutB074349; Mon, 11 Mar 2019 00:52:56 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2B0qtaf074348; Mon, 11 Mar 2019 00:52:55 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201903110052.x2B0qtaf074348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 11 Mar 2019 00:52:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344988 - in stable/12/sys: kern vm X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12/sys: kern vm X-SVN-Commit-Revision: 344988 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 452C26FB98 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.92 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.93)[-0.929,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 00:52:56 -0000 Author: markj Date: Mon Mar 11 00:52:55 2019 New Revision: 344988 URL: https://svnweb.freebsd.org/changeset/base/344988 Log: MFC r344550: Improve vmem tuning for platforms without a direct map. Modified: stable/12/sys/kern/subr_vmem.c stable/12/sys/vm/vm_kern.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/subr_vmem.c ============================================================================== --- stable/12/sys/kern/subr_vmem.c Sun Mar 10 23:05:38 2019 (r344987) +++ stable/12/sys/kern/subr_vmem.c Mon Mar 11 00:52:55 2019 (r344988) @@ -689,9 +689,11 @@ vmem_startup(void) /* * Reserve enough tags to allocate new tags. We allow multiple * CPUs to attempt to allocate new tags concurrently to limit - * false restarts in UMA. + * false restarts in UMA. vmem_bt_alloc() allocates from a per-domain + * arena, which may involve importing a range from the kernel arena, + * so we need to keep at least 2 * BT_MAXALLOC tags reserved. */ - uma_zone_reserve(vmem_bt_zone, BT_MAXALLOC * (mp_ncpus + 1) / 2); + uma_zone_reserve(vmem_bt_zone, 2 * BT_MAXALLOC * mp_ncpus); uma_zone_set_allocf(vmem_bt_zone, vmem_bt_alloc); #endif } Modified: stable/12/sys/vm/vm_kern.c ============================================================================== --- stable/12/sys/vm/vm_kern.c Sun Mar 10 23:05:38 2019 (r344987) +++ stable/12/sys/vm/vm_kern.c Mon Mar 11 00:52:55 2019 (r344988) @@ -124,8 +124,8 @@ SYSCTL_ULONG(_vm, OID_AUTO, max_kernel_address, CTLFLA #if VM_NRESERVLEVEL > 0 #define KVA_QUANTUM_SHIFT (VM_LEVEL_0_ORDER + PAGE_SHIFT) #else -/* On non-superpage architectures want large import sizes. */ -#define KVA_QUANTUM_SHIFT (10 + PAGE_SHIFT) +/* On non-superpage architectures we want large import sizes. */ +#define KVA_QUANTUM_SHIFT (8 + PAGE_SHIFT) #endif #define KVA_QUANTUM (1 << KVA_QUANTUM_SHIFT) From owner-svn-src-all@freebsd.org Mon Mar 11 02:42:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BBD31529801; Mon, 11 Mar 2019 02:42:50 +0000 (UTC) (envelope-from sef@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4202D7480B; Mon, 11 Mar 2019 02:42:50 +0000 (UTC) (envelope-from sef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 346A047E8; Mon, 11 Mar 2019 02:42:50 +0000 (UTC) (envelope-from sef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2B2goSi032897; Mon, 11 Mar 2019 02:42:50 GMT (envelope-from sef@FreeBSD.org) Received: (from sef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2B2gnNE032896; Mon, 11 Mar 2019 02:42:49 GMT (envelope-from sef@FreeBSD.org) Message-Id: <201903110242.x2B2gnNE032896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sef set sender to sef@FreeBSD.org using -f From: Sean Eric Fagan Date: Mon, 11 Mar 2019 02:42:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344995 - in stable/12: sys/kgssapi usr.sbin/gssd X-SVN-Group: stable-12 X-SVN-Commit-Author: sef X-SVN-Commit-Paths: in stable/12: sys/kgssapi usr.sbin/gssd X-SVN-Commit-Revision: 344995 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4202D7480B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.936,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 02:42:50 -0000 Author: sef Date: Mon Mar 11 02:42:49 2019 New Revision: 344995 URL: https://svnweb.freebsd.org/changeset/base/344995 Log: MFC r344402 * Handle SIGPIPE in gssd We've got some cases where the other end of gssd's AF_LOCAL socket gets closed, resulting in an error (and SIGPIPE) when it tries to do I/O to it. Closing without cleaning up means the next time nfsd starts up, it hangs, unkillably; this allows gssd to handle that particular error. * Limit the retry cound in gssd_syscall to 5. The default is INT_MAX, which effectively means forever. And it's an uninterruptable RPC call, so it will never stop. The two changes mitigate the problem. Modified: stable/12/sys/kgssapi/gss_impl.c stable/12/usr.sbin/gssd/gssd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kgssapi/gss_impl.c ============================================================================== --- stable/12/sys/kgssapi/gss_impl.c Mon Mar 11 02:02:04 2019 (r344994) +++ stable/12/sys/kgssapi/gss_impl.c Mon Mar 11 02:42:49 2019 (r344995) @@ -112,6 +112,15 @@ sys_gssd_syscall(struct thread *td, struct gssd_syscal cl = clnt_reconnect_create(nconf, (struct sockaddr *) &sun, GSSD, GSSDVERS, RPC_MAXDATASIZE, RPC_MAXDATASIZE); + /* + * The number of retries defaults to INT_MAX, which effectively + * means an infinite, uninterruptable loop. Limiting it to + * five retries keeps it from running forever. + */ + if (cl != NULL) { + int retry_count = 5; + CLNT_CONTROL(cl, CLSET_RETRIES, &retry_count); + } } else cl = NULL; Modified: stable/12/usr.sbin/gssd/gssd.c ============================================================================== --- stable/12/usr.sbin/gssd/gssd.c Mon Mar 11 02:02:04 2019 (r344994) +++ stable/12/usr.sbin/gssd/gssd.c Mon Mar 11 02:42:49 2019 (r344995) @@ -202,6 +202,7 @@ main(int argc, char **argv) signal(SIGHUP, SIG_IGN); } signal(SIGTERM, gssd_terminate); + signal(SIGPIPE, gssd_terminate); memset(&sun, 0, sizeof sun); sun.sun_family = AF_LOCAL; From owner-svn-src-all@freebsd.org Mon Mar 11 06:23:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C74D1532036; Mon, 11 Mar 2019 06:23:17 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D153845BC; Mon, 11 Mar 2019 06:23:16 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 8CF91777D; Mon, 11 Mar 2019 06:23:16 +0000 (UTC) Date: Mon, 11 Mar 2019 06:23:16 +0000 From: Alexey Dokuchaev To: Justin Hibbits Cc: svn-src-head@freebsd.org, Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r344960 - head/sys/powerpc/powerpc Message-ID: <20190311062316.GA41091@FreeBSD.org> References: <201903090318.x293IcLc023548@repo.freebsd.org> <20190309085058.GA60945@FreeBSD.org> <20190310171640.31bb9c54@titan.knownspace> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190310171640.31bb9c54@titan.knownspace> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 9D153845BC X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.991,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.983,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 06:23:17 -0000 On Sun, Mar 10, 2019 at 05:16:40PM -0500, Justin Hibbits wrote: > On Sat, 9 Mar 2019 08:50:58 +0000 > Alexey Dokuchaev wrote: > > On Sat, Mar 09, 2019 at 03:18:38AM +0000, Justin Hibbits wrote: > > > New Revision: 344960 > > > URL: https://svnweb.freebsd.org/changeset/base/344960 > > > > > > Log: > > > powerpc: Print trap frame address for fatal traps > > > > > > MFC after: 1 week > > > > > > Modified: head/sys/powerpc/powerpc/trap.c > > > ... > > > current msr = 0x%" PRIxPTR "\n", mfmsr()); printf(" > > > lr = 0x%" PRIxPTR " (0x%" PRIxPTR ")\n", frame->lr, > > > frame->lr - (register_t)(__startkernel - KERNBASE)); > > > + printf(" frame = %p\n", frame); > > > printf(" curthread = %p\n", curthread); > > > > Some of those are printed with %PRIxPTR, some with %p. Perhaps this > > inconsistency can be avoided? > > PRIxPTR is for printing a pointer-like value that's not a pointer. > The other values printed are of type register_t, not void *. Ah, okay, I've somehow missed that, thanks for pointing this out. ./danfe From owner-svn-src-all@freebsd.org Mon Mar 11 07:18:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC61A1534581; Mon, 11 Mar 2019 07:18:40 +0000 (UTC) (envelope-from ygy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8103786E70; Mon, 11 Mar 2019 07:18:40 +0000 (UTC) (envelope-from ygy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 756877623; Mon, 11 Mar 2019 07:18:40 +0000 (UTC) (envelope-from ygy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2B7Ievv073392; Mon, 11 Mar 2019 07:18:40 GMT (envelope-from ygy@FreeBSD.org) Received: (from ygy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2B7Ieun073391; Mon, 11 Mar 2019 07:18:40 GMT (envelope-from ygy@FreeBSD.org) Message-Id: <201903110718.x2B7Ieun073391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ygy set sender to ygy@FreeBSD.org using -f From: Guangyuan Yang Date: Mon, 11 Mar 2019 07:18:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345001 - stable/12/sbin/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: ygy X-SVN-Commit-Paths: stable/12/sbin/ipfw X-SVN-Commit-Revision: 345001 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8103786E70 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 07:18:41 -0000 Author: ygy (doc committer) Date: Mon Mar 11 07:18:40 2019 New Revision: 345001 URL: https://svnweb.freebsd.org/changeset/base/345001 Log: MFC r344709: Fix typos and caps for ipfw(8) man page. PR: 236030 Submitted by: olgeni Modified: stable/12/sbin/ipfw/ipfw.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ipfw/ipfw.8 ============================================================================== --- stable/12/sbin/ipfw/ipfw.8 Mon Mar 11 03:07:05 2019 (r345000) +++ stable/12/sbin/ipfw/ipfw.8 Mon Mar 11 07:18:40 2019 (r345001) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 4, 2018 +.Dd March 1, 2019 .Dt IPFW 8 .Os .Sh NAME @@ -1329,11 +1329,11 @@ its use is discouraged. .Brc .Bl -tag -width indent .It Cm any -matches any IP address. +Matches any IP address. .It Cm me -matches any IP address configured on an interface in the system. +Matches any IP address configured on an interface in the system. .It Cm me6 -matches any IPv6 address configured on an interface in the system. +Matches any IPv6 address configured on an interface in the system. The address list is evaluated at the time the packet is analysed. .It Cm table Ns Pq Ar name Ns Op , Ns Ar value @@ -2083,7 +2083,7 @@ The following table types are supported: .It Ar flow-spec : Ar flow-field Ns Op , Ns Ar flow-spec .It Ar flow-field : src-ip | proto | src-port | dst-ip | dst-port .It Cm addr -matches IPv4 or IPv6 address. +Matches IPv4 or IPv6 address. Each entry is represented by an .Ar addr Ns Op / Ns Ar masklen and will match all addresses with base @@ -2097,11 +2097,11 @@ is not specified, it defaults to 32 for IPv4 and 128 f When looking up an IP address in a table, the most specific entry will match. .It Cm iface -matches interface names. +Matches interface names. Each entry is represented by string treated as interface name. Wildcards are not supported. .It Cm number -maches protocol ports, uids/gids or jail IDs. +Matches protocol ports, uids/gids or jail IDs. Each entry is represented by 32-bit unsigned integer. Ranges are not supported. .It Cm flow @@ -2792,7 +2792,7 @@ specifies the quantum (credit) of the scheduler. .Ar m is the number of bytes a queue can serve before being moved to the tail of old queues list. -The default is 1514 bytes, and the maximum accepable value +The default is 1514 bytes, and the maximum acceptable value is 9000 bytes. .It Cm limit .Ar m @@ -2800,14 +2800,14 @@ specifies the hard size limit (in unit of packets) of instance of the scheduler. The default value of .Ar m -is 10240 packets, and the maximum accepable value is 20480 packets. +is 10240 packets, and the maximum acceptable value is 20480 packets. .It Cm flows .Ar m specifies the total number of flow queues (sub-queues) that fq_* creates and manages. By default, 1024 sub-queues are created when an instance of the fq_{codel/pie} scheduler is created. -The maximum accepable value is +The maximum acceptable value is 65536. .El .Pp @@ -2906,7 +2906,7 @@ is the typical queue size for Ethernet devices. Note that for slow speed links you should keep the queue size short or your traffic might be affected by a significant queueing delay. -E.g., 50 max-sized ethernet packets (1500 bytes) mean 600Kbit +E.g., 50 max-sized Ethernet packets (1500 bytes) mean 600Kbit or 20s of queue on a 30Kbit/s pipe. Even worse effects can result if you get packets from an interface with a much larger MTU, e.g.\& the loopback interface @@ -3053,7 +3053,7 @@ De-randomisation is enabled by default. .It Cm onoff enable turning PIE on and off depending on queue load. If this option is enabled, -PIE turnes on when over 1/3 of queue becomes full. +PIE turns on when over 1/3 of queue becomes full. This option is disabled by default. .It Cm dre | ts @@ -4089,7 +4089,7 @@ by adding the following to the appropriate place in ru If your network has network traffic analyzer connected to your host directly via dedicated interface or remotely via RSPAN vlan, you can selectively mirror -some ethernet layer2 frames to the analyzer. +some Ethernet layer2 frames to the analyzer. .Pp First, make sure your firewall is already configured and runs. Then, enable layer2 processing if not already enabled: @@ -4434,7 +4434,7 @@ or it could be split in: .Dl "ipfw nat 5 config redirect_port tcp" .Dl " 192.168.0.1:80,192.168.0.10:22,192.168.0.20:25 500" .Pp -Sometimes you may want to mix NAT and dynamic rules. It could be achived with +Sometimes you may want to mix NAT and dynamic rules. It could be achieved with .Cm record-state and .Cm defer-action @@ -4447,8 +4447,8 @@ rule will be performed as soon as rule is matched. In .Cm allow rule packet need to be passed to NAT, not allowed as soon is possible. .Pp -There is example of set of rules to achive this. Bear in mind that this -is exmaple only and it is not very usefult by itself. +There is example of set of rules to achieve this. Bear in mind that this +is exmaple only and it is not very useful by itself. .Pp On way out, after all checks place this rules: .Pp From owner-svn-src-all@freebsd.org Mon Mar 11 08:17:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19EF71536B45; Mon, 11 Mar 2019 08:17:07 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (vtr.rulingia.com [IPv6:2001:19f0:5801:ebe:5400:1ff:fe53:30fd]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vtr.rulingia.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B65089659; Mon, 11 Mar 2019 08:17:05 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp59-167-167-3.static.internode.on.net [59.167.167.3]) by vtr.rulingia.com (8.15.2/8.15.2) with ESMTPS id x2B8GpUq001917 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 11 Mar 2019 19:16:57 +1100 (AEDT) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.15.2/8.15.2) with ESMTPS id x2B8Gjxm091028 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 11 Mar 2019 19:16:45 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.15.2/8.15.2/Submit) id x2B8GiuN091027; Mon, 11 Mar 2019 19:16:44 +1100 (AEDT) (envelope-from peter) Date: Mon, 11 Mar 2019 19:16:44 +1100 From: Peter Jeremy To: Warner Losh Cc: Alexey Dokuchaev , "Rodney W. Grimes" , Warner Losh , svn-src-head , svn-src-all , src-committers Subject: Re: svn commit: r344970 - head Message-ID: <20190311081644.GA87064@server.rulingia.com> References: <201903091717.x29HHjcc069618@repo.freebsd.org> <201903092000.x29K0Rf6002120@gndrsh.dnsmgr.net> <20190310150728.GA97029@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zhXaljGHf11kAtnf" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.11.1 (2018-12-01) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 08:17:07 -0000 --zhXaljGHf11kAtnf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2019-Mar-10 09:38:53 -0600, Warner Losh wrote: >On Sun, Mar 10, 2019 at 9:07 AM Alexey Dokuchaev wrote: > >> On Sat, Mar 09, 2019 at 12:00:27PM -0800, Rodney W. Grimes wrote: >> > > New Revision: 344970 >> > > binaries). Failure to do so may leave you with a system that is >> > > hard to boot to recover. A GENERIC kernel will include suitable >> > > - compatibility options to run binaries from older branches. >> > > + compatibility options to run binaries from supported older >> branches. >> > >> > This is probably not the best adjective here, supported only goes back= to >> > 11.x, there are COMPAT options that work all the way back to 4. >> >> I concur, this "supported" word sounds like we barely give a fuck. Being >> able to run old (very old) binaries had always been one of our strengths, >> and we should not suggest that it's not anymore. >> > >It isn't saying we don't support older binaries. It sets the limits on what =2E.. >upgrading from. We can (and do) support additional binaries, and having the >clarification here doesn't change that. I think the changed wording implies that we no longer provide compatibity with unsupported branches. I agree that we might in future decide to remove COMPAT_FREEBSDx for unsupported x but until then, I'd prefer wording along the lines of: "A GENERIC kernel will include suitable compatibility options to run binaries from older branches. Note that the ability to run binaries from unsupported branches is not guaranteed." --=20 Peter Jeremy --zhXaljGHf11kAtnf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAlyGGWxfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzQ9/Q//alwnrCnIBEGE8YP4bvmgS/f7toPlTJx5OStjtTK0aG1uoErmO8THKzV0 jH439z1yrfi9xBhCOZvU91dTYbCFu0P8Hgswp0V741dAfjx6C3kmlmbLYtcFreaL KJfwa0ogGAy27B8XBlPCZFuqT1K6JqLAQO56KxI6Jl+rakpx2DZ4gePT+RRAofwL eIwJkEo9SOoj/Hg2avw9019ixOlj6K+JQJSEqVRfvt7BHgGT2cGBy5IvQqkXB62Q 901QXl3odMGq6j30qxmx/034V9+cEWdUSEYhGaa/41MBN20aVXvPrn5sbjRgPbDF vnAdzQ/N7lRaT6uDyJDeZbdtdaRTy+Qj5OVM8wocwfxFX3GjBNNWFc92raD3eRow IHLeCt32JR7krE0qR52byBbb8/x9MJg6qt0ELcUV7JDkSeNGnn9Wj2e5llfH6mtg KNke/YpWz7p1U/xm3EjUbBwLNA4NMJHNadmRc0jtraQ2v9v+rNb0DMp7nv3DASYp 7bBHHkEVBUjKtwtnipXa6PparAM4G19X47c0CpZ6zkLezdNGXkvF4x+HWsJlngOG MoXeyo7EB/7diBMMK9JKo0pqzD2yb+hb9Tsl6WxXdLmJEClPJO9olya+QQMaAVP7 yTCpYzBhtsnFXPEnzh5LqKaw6kAb4jY0u+qMy9Yl6untCORDoFI= =nst/ -----END PGP SIGNATURE----- --zhXaljGHf11kAtnf-- From owner-svn-src-all@freebsd.org Sun Mar 10 16:39:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DB89153910A for ; Sun, 10 Mar 2019 16:39:10 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E701841FF for ; Sun, 10 Mar 2019 16:39:09 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f65.google.com with SMTP id y6so1947265ioq.10 for ; Sun, 10 Mar 2019 09:39:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:cc; bh=BNcQzXhduxukTdq9coVzEwoAUEj3XKw5Z/Agh6Dx04I=; b=RpTPMeKRwhFiVJDpBbtIS3P6dWJwfk5DaIPSXdn7RjjsUBdJY+Zef/mw6/nss44J/P tXJc3B6SjzkjF2wAfYadbwf8XFlAp4/LpJdCKwJQr9VdpWwhNwxRJv/+4AbBYZYUbMjJ i6mEdxeGNwKmIiny6UZi9+ylN5UgfYlafqaMQ4v/MJb3QE2suw0eAw0mVwYcLwL/9n13 hKnqrzlK71DoN3q6eBRZrnGsnYHkOnQizfEttaj7YK6V8idOdrrr+BMWxU97XSSirtzN dMBL0FNNeRVDKXdNq70dAzEetGL6ct0DgZomHxM6C/jZjvKcj7TRkCLM7DxrezJfaH13 Nfzw== X-Gm-Message-State: APjAAAX45s53ftHMxXQUjbKUuQ/I7RLfcSdK3p86+OHbn/I8J5J4m983 pQNaMf/OZ91dXoaLbaw4TqHg2FJ/Y/AsdRDBAbM= X-Received: by 2002:a6b:ee02:: with SMTP id i2mt13803728ioh.294.1552235943171; Sun, 10 Mar 2019 09:39:03 -0700 (PDT) MIME-Version: 1.0 References: <201902232114.x1NLE0cH085345@repo.freebsd.org> In-Reply-To: <201902232114.x1NLE0cH085345@repo.freebsd.org> From: Ed Maste Date: Sun, 10 Mar 2019 12:38:50 -0400 Message-ID: Subject: Re: svn commit: r344487 - in head/sys: conf gnu/gcov Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 9E701841FF X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.65 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-1.68 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-0.99)[-0.994,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.48)[-0.483,0]; RCVD_IN_DNSWL_NONE(0.00)[65.166.85.209.list.dnswl.org : 127.0.5.0]; MISSING_TO(2.00)[]; RCVD_TLS_LAST(0.00)[]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; IP_SCORE(-1.20)[ipnet: 209.85.128.0/17(-3.85), asn: 15169(-2.06), country: US(-0.07)]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 16:39:10 -0000 On Sat, 23 Feb 2019 at 16:14, Matt Macy wrote: > > Author: mmacy > Date: Sat Feb 23 21:14:00 2019 > New Revision: 344487 > URL: https://svnweb.freebsd.org/changeset/base/344487 > > Log: > gcov support I've added gcov to https://wiki.freebsd.org/GPLinBase. From owner-svn-src-all@freebsd.org Sun Mar 10 17:08:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20126153A077; Sun, 10 Mar 2019 17:08:06 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B76CF85450; Sun, 10 Mar 2019 17:08:05 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A7D63261A9; Sun, 10 Mar 2019 17:08:05 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2AH85nm028755; Sun, 10 Mar 2019 17:08:05 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2AH85Eo028754; Sun, 10 Mar 2019 17:08:05 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201903101708.x2AH85Eo028754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 10 Mar 2019 17:08:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r344979 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 344979 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B76CF85450 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 17:08:06 -0000 Author: glebius Date: Sun Mar 10 17:08:05 2019 New Revision: 344979 URL: https://svnweb.freebsd.org/changeset/base/344979 Log: Properly handle a case when a first filter returns PFIL_REALLOCED, then second one returns PFIL_PASS. Modified: head/sys/net/pfil.c Modified: head/sys/net/pfil.c ============================================================================== --- head/sys/net/pfil.c Sun Mar 10 16:14:42 2019 (r344978) +++ head/sys/net/pfil.c Sun Mar 10 17:08:05 2019 (r344979) @@ -154,7 +154,8 @@ pfil_run_hooks(struct pfil_head *head, pfil_packet_t p struct epoch_tracker et; pfil_chain_t *pch; struct pfil_link *link; - pfil_return_t rv, rvi; + pfil_return_t rv; + bool realloc = false; if (PFIL_DIR(flags) == PFIL_IN) pch = &head->head_in; @@ -167,21 +168,22 @@ pfil_run_hooks(struct pfil_head *head, pfil_packet_t p PFIL_EPOCH_ENTER(et); CK_STAILQ_FOREACH(link, pch, link_chain) { if ((flags & PFIL_MEMPTR) && !(link->link_flags & PFIL_MEMPTR)) - rvi = pfil_fake_mbuf(link->link_func, p.mem, ifp, + rv = pfil_fake_mbuf(link->link_func, p.mem, ifp, flags, link->link_ruleset, inp); else - rvi = (*link->link_func)(p, ifp, flags, + rv = (*link->link_func)(p, ifp, flags, link->link_ruleset, inp); - if (rvi == PFIL_DROPPED || rvi == PFIL_CONSUMED) { - rv = rvi; + if (rv == PFIL_DROPPED || rv == PFIL_CONSUMED) break; - } else if (rv == PFIL_REALLOCED) { + else if (rv == PFIL_REALLOCED) { flags &= ~(PFIL_MEMPTR | PFIL_LENMASK); - rv = rvi; + realloc = true; } } PFIL_EPOCH_EXIT(et); - return (rvi); + if (realloc && rv == PFIL_PASS) + rv = PFIL_REALLOCED; + return (rv); } /* From owner-svn-src-all@freebsd.org Mon Mar 11 01:44:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7332915279F6; Mon, 11 Mar 2019 01:44:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 162C971ECA; Mon, 11 Mar 2019 01:44:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 033F53D8A; Mon, 11 Mar 2019 01:44:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2B1iI1L001680; Mon, 11 Mar 2019 01:44:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2B1iIM1001678; Mon, 11 Mar 2019 01:44:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903110144.x2B1iIM1001678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 11 Mar 2019 01:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344991 - stable/12/sys/cam/ctl X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cam/ctl X-SVN-Commit-Revision: 344991 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 162C971ECA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 01:44:19 -0000 Author: mav Date: Mon Mar 11 01:44:18 2019 New Revision: 344991 URL: https://svnweb.freebsd.org/changeset/base/344991 Log: MFC r344489: Free some space in struct ctl_io_hdr for better use. - Collapse original_sc and serializing_sc fields into one, since they are never used simultanously, we have only one local I/O and one remote. - Move remote_sglist and local_sglist fields into CTL_PRIV_BACKEND, since they are used only on Originating SC in XFER mode, where requests don't ever reach backends, so we can reuse backend's private storage. Modified: stable/12/sys/cam/ctl/ctl.c stable/12/sys/cam/ctl/ctl_io.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/ctl/ctl.c ============================================================================== --- stable/12/sys/cam/ctl/ctl.c Mon Mar 11 01:27:01 2019 (r344990) +++ stable/12/sys/cam/ctl/ctl.c Mon Mar 11 01:44:18 2019 (r344991) @@ -651,7 +651,7 @@ ctl_ha_datamove(union ctl_io *io) memset(&msg.dt, 0, sizeof(msg.dt)); msg.hdr.msg_type = CTL_MSG_DATAMOVE; - msg.hdr.original_sc = io->io_hdr.original_sc; + msg.hdr.original_sc = io->io_hdr.remote_io; msg.hdr.serializing_sc = io; msg.hdr.nexus = io->io_hdr.nexus; msg.hdr.status = io->io_hdr.status; @@ -766,7 +766,7 @@ ctl_ha_done(union ctl_io *io) if (io->io_hdr.io_type == CTL_IO_SCSI) { memset(&msg, 0, sizeof(msg)); msg.hdr.msg_type = CTL_MSG_FINISH_IO; - msg.hdr.original_sc = io->io_hdr.original_sc; + msg.hdr.original_sc = io->io_hdr.remote_io; msg.hdr.nexus = io->io_hdr.nexus; msg.hdr.status = io->io_hdr.status; msg.scsi.scsi_status = io->scsiio.scsi_status; @@ -1439,7 +1439,7 @@ ctl_isc_event_handler(ctl_ha_channel channel, ctl_ha_e // populate ctsio from msg io->io_hdr.io_type = CTL_IO_SCSI; io->io_hdr.msg_type = CTL_MSG_SERIALIZE; - io->io_hdr.original_sc = msg->hdr.original_sc; + io->io_hdr.remote_io = msg->hdr.original_sc; io->io_hdr.flags |= CTL_FLAG_FROM_OTHER_SC | CTL_FLAG_IO_ACTIVE; /* @@ -1495,7 +1495,7 @@ ctl_isc_event_handler(ctl_ha_channel channel, ctl_ha_e * Keep track of this, we need to send it back over * when the datamove is complete. */ - io->io_hdr.serializing_sc = msg->hdr.serializing_sc; + io->io_hdr.remote_io = msg->hdr.serializing_sc; if (msg->hdr.status == CTL_SUCCESS) io->io_hdr.status = msg->hdr.status; @@ -1508,9 +1508,8 @@ ctl_isc_event_handler(ctl_ha_channel channel, ctl_ha_e CTL_HA_DATAMOVE_SEGMENT + 1; sgl = malloc(sizeof(*sgl) * i, M_CTL, M_WAITOK | M_ZERO); - io->io_hdr.remote_sglist = sgl; - io->io_hdr.local_sglist = - &sgl[msg->dt.kern_sg_entries]; + CTL_RSGL(io) = sgl; + CTL_LSGL(io) = &sgl[msg->dt.kern_sg_entries]; io->scsiio.kern_data_ptr = (uint8_t *)sgl; @@ -1597,7 +1596,7 @@ ctl_isc_event_handler(ctl_ha_channel channel, ctl_ha_e } io->io_hdr.flags |= CTL_FLAG_IO_ACTIVE; io->io_hdr.msg_type = CTL_MSG_R2R; - io->io_hdr.serializing_sc = msg->hdr.serializing_sc; + io->io_hdr.remote_io = msg->hdr.serializing_sc; ctl_enqueue_isc(io); break; @@ -2369,7 +2368,7 @@ ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio) mtx_unlock(&lun->lun_lock); /* send msg back to other side */ - msg_info.hdr.original_sc = ctsio->io_hdr.original_sc; + msg_info.hdr.original_sc = ctsio->io_hdr.remote_io; msg_info.hdr.serializing_sc = (union ctl_io *)ctsio; msg_info.hdr.msg_type = CTL_MSG_R2R; ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, @@ -2395,7 +2394,7 @@ ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio) /*retry_count*/ 0); badjuju: ctl_copy_sense_data_back((union ctl_io *)ctsio, &msg_info); - msg_info.hdr.original_sc = ctsio->io_hdr.original_sc; + msg_info.hdr.original_sc = ctsio->io_hdr.remote_io; msg_info.hdr.serializing_sc = NULL; msg_info.hdr.msg_type = CTL_MSG_BAD_JUJU; ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, @@ -11043,7 +11042,7 @@ ctl_check_blocked(struct ctl_lun *lun) cur_blocked->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE; msg_info.hdr.original_sc = - cur_blocked->io_hdr.original_sc; + cur_blocked->io_hdr.remote_io; msg_info.hdr.serializing_sc = cur_blocked; msg_info.hdr.msg_type = CTL_MSG_R2R; ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, @@ -12480,7 +12479,7 @@ ctl_send_datamove_done(union ctl_io *io, int have_lock memset(&msg, 0, sizeof(msg)); msg.hdr.msg_type = CTL_MSG_DATAMOVE_DONE; msg.hdr.original_sc = io; - msg.hdr.serializing_sc = io->io_hdr.serializing_sc; + msg.hdr.serializing_sc = io->io_hdr.remote_io; msg.hdr.nexus = io->io_hdr.nexus; msg.hdr.status = io->io_hdr.status; msg.scsi.kern_data_resid = io->scsiio.kern_data_resid; @@ -12531,10 +12530,10 @@ ctl_datamove_remote_write_cb(struct ctl_ha_dt_req *rq) ctl_dt_req_free(rq); for (i = 0; i < io->scsiio.kern_sg_entries; i++) - free(io->io_hdr.local_sglist[i].addr, M_CTL); - free(io->io_hdr.remote_sglist, M_CTL); - io->io_hdr.remote_sglist = NULL; - io->io_hdr.local_sglist = NULL; + free(CTL_LSGLT(io)[i].addr, M_CTL); + free(CTL_RSGL(io), M_CTL); + CTL_RSGL(io) = NULL; + CTL_LSGL(io) = NULL; /* * The data is in local and remote memory, so now we need to send @@ -12574,7 +12573,7 @@ ctl_datamove_remote_write(union ctl_io *io) return; /* Switch the pointer over so the FETD knows what to do */ - io->scsiio.kern_data_ptr = (uint8_t *)io->io_hdr.local_sglist; + io->scsiio.kern_data_ptr = (uint8_t *)CTL_LSGL(io); /* * Use a custom move done callback, since we need to send completion @@ -12597,10 +12596,10 @@ ctl_datamove_remote_dm_read_cb(union ctl_io *io) uint32_t i; for (i = 0; i < io->scsiio.kern_sg_entries; i++) - free(io->io_hdr.local_sglist[i].addr, M_CTL); - free(io->io_hdr.remote_sglist, M_CTL); - io->io_hdr.remote_sglist = NULL; - io->io_hdr.local_sglist = NULL; + free(CTL_LSGLT(io)[i].addr, M_CTL); + free(CTL_RSGL(io), M_CTL); + CTL_RSGL(io) = NULL; + CTL_LSGL(io) = NULL; #if 0 scsi_path_string(io, path_str, sizeof(path_str)); @@ -12647,7 +12646,7 @@ ctl_datamove_remote_read_cb(struct ctl_ha_dt_req *rq) ctl_dt_req_free(rq); /* Switch the pointer over so the FETD knows what to do */ - io->scsiio.kern_data_ptr = (uint8_t *)io->io_hdr.local_sglist; + io->scsiio.kern_data_ptr = (uint8_t *)CTL_LSGL(io); /* * Use a custom move done callback, since we need to send completion @@ -12670,7 +12669,7 @@ ctl_datamove_remote_sgl_setup(union ctl_io *io) int i; retval = 0; - local_sglist = io->io_hdr.local_sglist; + local_sglist = CTL_LSGL(io); len_to_go = io->scsiio.kern_data_len; /* @@ -12741,8 +12740,8 @@ ctl_datamove_remote_xfer(union ctl_io *io, unsigned co return (1); } - local_sglist = io->io_hdr.local_sglist; - remote_sglist = io->io_hdr.remote_sglist; + local_sglist = CTL_LSGL(io); + remote_sglist = CTL_RSGL(io); local_used = 0; remote_used = 0; total_used = 0; @@ -12855,10 +12854,10 @@ ctl_datamove_remote_read(union ctl_io *io) * error if there is a problem. */ for (i = 0; i < io->scsiio.kern_sg_entries; i++) - free(io->io_hdr.local_sglist[i].addr, M_CTL); - free(io->io_hdr.remote_sglist, M_CTL); - io->io_hdr.remote_sglist = NULL; - io->io_hdr.local_sglist = NULL; + free(CTL_LSGLT(io)[i].addr, M_CTL); + free(CTL_RSGL(io), M_CTL); + CTL_RSGL(io) = NULL; + CTL_LSGL(io) = NULL; } } @@ -13106,7 +13105,7 @@ bailout: (io->io_hdr.flags & CTL_FLAG_SENT_2OTHER_SC)) { memset(&msg, 0, sizeof(msg)); msg.hdr.msg_type = CTL_MSG_FINISH_IO; - msg.hdr.serializing_sc = io->io_hdr.serializing_sc; + msg.hdr.serializing_sc = io->io_hdr.remote_io; msg.hdr.nexus = io->io_hdr.nexus; ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, sizeof(msg.scsi) - sizeof(msg.scsi.sense_data), Modified: stable/12/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/12/sys/cam/ctl/ctl_io.h Mon Mar 11 01:27:01 2019 (r344990) +++ stable/12/sys/cam/ctl/ctl_io.h Mon Mar 11 01:44:18 2019 (r344991) @@ -167,6 +167,15 @@ union ctl_priv { #define CTL_PORT(io) (((struct ctl_softc *)CTL_SOFTC(io))-> \ ctl_ports[(io)->io_hdr.nexus.targ_port]) +/* + * These are used only on Originating SC in XFER mode, where requests don't + * ever reach backends, so we can reuse backend's private storage. + */ +#define CTL_RSGL(io) ((io)->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptrs[0]) +#define CTL_LSGL(io) ((io)->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptrs[1]) +#define CTL_RSGLT(io) ((struct ctl_sg_entry *)CTL_RSGL(io)) +#define CTL_LSGLT(io) ((struct ctl_sg_entry *)CTL_LSGL(io)) + #define CTL_INVALID_PORTNAME 0xFF #define CTL_UNMAPPED_IID 0xFF @@ -229,12 +238,12 @@ struct ctl_io_hdr { struct bintime dma_bt; /* DMA total ticks */ #endif /* CTL_TIME_IO */ uint32_t num_dmas; /* Number of DMAs */ - union ctl_io *original_sc; - union ctl_io *serializing_sc; + union ctl_io *remote_io; /* I/O counterpart on remote HA side */ + void *pad1; void *pool; /* I/O pool */ union ctl_priv ctl_private[CTL_NUM_PRIV];/* CTL private area */ - struct ctl_sg_entry *remote_sglist; - struct ctl_sg_entry *local_sglist; + void *pad2; + void *pad3; STAILQ_ENTRY(ctl_io_hdr) links; /* linked list pointer */ TAILQ_ENTRY(ctl_io_hdr) ooa_links; TAILQ_ENTRY(ctl_io_hdr) blocked_links; From owner-svn-src-all@freebsd.org Mon Mar 11 01:44:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D13AB15279FC; Mon, 11 Mar 2019 01:44:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D02371FA8; Mon, 11 Mar 2019 01:44:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 57D8A3D8B; Mon, 11 Mar 2019 01:44:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2B1ic3P001752; Mon, 11 Mar 2019 01:44:38 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2B1ib8J001750; Mon, 11 Mar 2019 01:44:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903110144.x2B1ib8J001750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 11 Mar 2019 01:44: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: r344992 - stable/11/sys/cam/ctl X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cam/ctl X-SVN-Commit-Revision: 344992 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6D02371FA8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 01:44:39 -0000 Author: mav Date: Mon Mar 11 01:44:37 2019 New Revision: 344992 URL: https://svnweb.freebsd.org/changeset/base/344992 Log: MFC r344489: Free some space in struct ctl_io_hdr for better use. - Collapse original_sc and serializing_sc fields into one, since they are never used simultanously, we have only one local I/O and one remote. - Move remote_sglist and local_sglist fields into CTL_PRIV_BACKEND, since they are used only on Originating SC in XFER mode, where requests don't ever reach backends, so we can reuse backend's private storage. Modified: stable/11/sys/cam/ctl/ctl.c stable/11/sys/cam/ctl/ctl_io.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ctl/ctl.c ============================================================================== --- stable/11/sys/cam/ctl/ctl.c Mon Mar 11 01:44:18 2019 (r344991) +++ stable/11/sys/cam/ctl/ctl.c Mon Mar 11 01:44:37 2019 (r344992) @@ -645,7 +645,7 @@ ctl_ha_datamove(union ctl_io *io) memset(&msg.dt, 0, sizeof(msg.dt)); msg.hdr.msg_type = CTL_MSG_DATAMOVE; - msg.hdr.original_sc = io->io_hdr.original_sc; + msg.hdr.original_sc = io->io_hdr.remote_io; msg.hdr.serializing_sc = io; msg.hdr.nexus = io->io_hdr.nexus; msg.hdr.status = io->io_hdr.status; @@ -760,7 +760,7 @@ ctl_ha_done(union ctl_io *io) if (io->io_hdr.io_type == CTL_IO_SCSI) { memset(&msg, 0, sizeof(msg)); msg.hdr.msg_type = CTL_MSG_FINISH_IO; - msg.hdr.original_sc = io->io_hdr.original_sc; + msg.hdr.original_sc = io->io_hdr.remote_io; msg.hdr.nexus = io->io_hdr.nexus; msg.hdr.status = io->io_hdr.status; msg.scsi.scsi_status = io->scsiio.scsi_status; @@ -1433,7 +1433,7 @@ ctl_isc_event_handler(ctl_ha_channel channel, ctl_ha_e // populate ctsio from msg io->io_hdr.io_type = CTL_IO_SCSI; io->io_hdr.msg_type = CTL_MSG_SERIALIZE; - io->io_hdr.original_sc = msg->hdr.original_sc; + io->io_hdr.remote_io = msg->hdr.original_sc; io->io_hdr.flags |= CTL_FLAG_FROM_OTHER_SC | CTL_FLAG_IO_ACTIVE; /* @@ -1489,7 +1489,7 @@ ctl_isc_event_handler(ctl_ha_channel channel, ctl_ha_e * Keep track of this, we need to send it back over * when the datamove is complete. */ - io->io_hdr.serializing_sc = msg->hdr.serializing_sc; + io->io_hdr.remote_io = msg->hdr.serializing_sc; if (msg->hdr.status == CTL_SUCCESS) io->io_hdr.status = msg->hdr.status; @@ -1502,9 +1502,8 @@ ctl_isc_event_handler(ctl_ha_channel channel, ctl_ha_e CTL_HA_DATAMOVE_SEGMENT + 1; sgl = malloc(sizeof(*sgl) * i, M_CTL, M_WAITOK | M_ZERO); - io->io_hdr.remote_sglist = sgl; - io->io_hdr.local_sglist = - &sgl[msg->dt.kern_sg_entries]; + CTL_RSGL(io) = sgl; + CTL_LSGL(io) = &sgl[msg->dt.kern_sg_entries]; io->scsiio.kern_data_ptr = (uint8_t *)sgl; @@ -1591,7 +1590,7 @@ ctl_isc_event_handler(ctl_ha_channel channel, ctl_ha_e } io->io_hdr.flags |= CTL_FLAG_IO_ACTIVE; io->io_hdr.msg_type = CTL_MSG_R2R; - io->io_hdr.serializing_sc = msg->hdr.serializing_sc; + io->io_hdr.remote_io = msg->hdr.serializing_sc; ctl_enqueue_isc(io); break; @@ -2362,7 +2361,7 @@ ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio) mtx_unlock(&lun->lun_lock); /* send msg back to other side */ - msg_info.hdr.original_sc = ctsio->io_hdr.original_sc; + msg_info.hdr.original_sc = ctsio->io_hdr.remote_io; msg_info.hdr.serializing_sc = (union ctl_io *)ctsio; msg_info.hdr.msg_type = CTL_MSG_R2R; ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, @@ -2388,7 +2387,7 @@ ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio) /*retry_count*/ 0); badjuju: ctl_copy_sense_data_back((union ctl_io *)ctsio, &msg_info); - msg_info.hdr.original_sc = ctsio->io_hdr.original_sc; + msg_info.hdr.original_sc = ctsio->io_hdr.remote_io; msg_info.hdr.serializing_sc = NULL; msg_info.hdr.msg_type = CTL_MSG_BAD_JUJU; ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, @@ -11075,7 +11074,7 @@ ctl_check_blocked(struct ctl_lun *lun) cur_blocked->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE; msg_info.hdr.original_sc = - cur_blocked->io_hdr.original_sc; + cur_blocked->io_hdr.remote_io; msg_info.hdr.serializing_sc = cur_blocked; msg_info.hdr.msg_type = CTL_MSG_R2R; ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, @@ -12512,7 +12511,7 @@ ctl_send_datamove_done(union ctl_io *io, int have_lock memset(&msg, 0, sizeof(msg)); msg.hdr.msg_type = CTL_MSG_DATAMOVE_DONE; msg.hdr.original_sc = io; - msg.hdr.serializing_sc = io->io_hdr.serializing_sc; + msg.hdr.serializing_sc = io->io_hdr.remote_io; msg.hdr.nexus = io->io_hdr.nexus; msg.hdr.status = io->io_hdr.status; msg.scsi.kern_data_resid = io->scsiio.kern_data_resid; @@ -12563,10 +12562,10 @@ ctl_datamove_remote_write_cb(struct ctl_ha_dt_req *rq) ctl_dt_req_free(rq); for (i = 0; i < io->scsiio.kern_sg_entries; i++) - free(io->io_hdr.local_sglist[i].addr, M_CTL); - free(io->io_hdr.remote_sglist, M_CTL); - io->io_hdr.remote_sglist = NULL; - io->io_hdr.local_sglist = NULL; + free(CTL_LSGLT(io)[i].addr, M_CTL); + free(CTL_RSGL(io), M_CTL); + CTL_RSGL(io) = NULL; + CTL_LSGL(io) = NULL; /* * The data is in local and remote memory, so now we need to send @@ -12606,7 +12605,7 @@ ctl_datamove_remote_write(union ctl_io *io) return; /* Switch the pointer over so the FETD knows what to do */ - io->scsiio.kern_data_ptr = (uint8_t *)io->io_hdr.local_sglist; + io->scsiio.kern_data_ptr = (uint8_t *)CTL_LSGL(io); /* * Use a custom move done callback, since we need to send completion @@ -12629,10 +12628,10 @@ ctl_datamove_remote_dm_read_cb(union ctl_io *io) uint32_t i; for (i = 0; i < io->scsiio.kern_sg_entries; i++) - free(io->io_hdr.local_sglist[i].addr, M_CTL); - free(io->io_hdr.remote_sglist, M_CTL); - io->io_hdr.remote_sglist = NULL; - io->io_hdr.local_sglist = NULL; + free(CTL_LSGLT(io)[i].addr, M_CTL); + free(CTL_RSGL(io), M_CTL); + CTL_RSGL(io) = NULL; + CTL_LSGL(io) = NULL; #if 0 scsi_path_string(io, path_str, sizeof(path_str)); @@ -12679,7 +12678,7 @@ ctl_datamove_remote_read_cb(struct ctl_ha_dt_req *rq) ctl_dt_req_free(rq); /* Switch the pointer over so the FETD knows what to do */ - io->scsiio.kern_data_ptr = (uint8_t *)io->io_hdr.local_sglist; + io->scsiio.kern_data_ptr = (uint8_t *)CTL_LSGL(io); /* * Use a custom move done callback, since we need to send completion @@ -12702,7 +12701,7 @@ ctl_datamove_remote_sgl_setup(union ctl_io *io) int i; retval = 0; - local_sglist = io->io_hdr.local_sglist; + local_sglist = CTL_LSGL(io); len_to_go = io->scsiio.kern_data_len; /* @@ -12773,8 +12772,8 @@ ctl_datamove_remote_xfer(union ctl_io *io, unsigned co return (1); } - local_sglist = io->io_hdr.local_sglist; - remote_sglist = io->io_hdr.remote_sglist; + local_sglist = CTL_LSGL(io); + remote_sglist = CTL_RSGL(io); local_used = 0; remote_used = 0; total_used = 0; @@ -12887,10 +12886,10 @@ ctl_datamove_remote_read(union ctl_io *io) * error if there is a problem. */ for (i = 0; i < io->scsiio.kern_sg_entries; i++) - free(io->io_hdr.local_sglist[i].addr, M_CTL); - free(io->io_hdr.remote_sglist, M_CTL); - io->io_hdr.remote_sglist = NULL; - io->io_hdr.local_sglist = NULL; + free(CTL_LSGLT(io)[i].addr, M_CTL); + free(CTL_RSGL(io), M_CTL); + CTL_RSGL(io) = NULL; + CTL_LSGL(io) = NULL; } } @@ -13153,7 +13152,7 @@ bailout: (io->io_hdr.flags & CTL_FLAG_SENT_2OTHER_SC)) { memset(&msg, 0, sizeof(msg)); msg.hdr.msg_type = CTL_MSG_FINISH_IO; - msg.hdr.serializing_sc = io->io_hdr.serializing_sc; + msg.hdr.serializing_sc = io->io_hdr.remote_io; msg.hdr.nexus = io->io_hdr.nexus; ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, sizeof(msg.scsi) - sizeof(msg.scsi.sense_data), Modified: stable/11/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/11/sys/cam/ctl/ctl_io.h Mon Mar 11 01:44:18 2019 (r344991) +++ stable/11/sys/cam/ctl/ctl_io.h Mon Mar 11 01:44:37 2019 (r344992) @@ -165,6 +165,15 @@ union ctl_priv { #define CTL_PORT(io) (((struct ctl_softc *)CTL_SOFTC(io))-> \ ctl_ports[(io)->io_hdr.nexus.targ_port]) +/* + * These are used only on Originating SC in XFER mode, where requests don't + * ever reach backends, so we can reuse backend's private storage. + */ +#define CTL_RSGL(io) ((io)->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptrs[0]) +#define CTL_LSGL(io) ((io)->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptrs[1]) +#define CTL_RSGLT(io) ((struct ctl_sg_entry *)CTL_RSGL(io)) +#define CTL_LSGLT(io) ((struct ctl_sg_entry *)CTL_LSGL(io)) + #define CTL_INVALID_PORTNAME 0xFF #define CTL_UNMAPPED_IID 0xFF @@ -227,12 +236,12 @@ struct ctl_io_hdr { struct bintime dma_bt; /* DMA total ticks */ #endif /* CTL_TIME_IO */ uint32_t num_dmas; /* Number of DMAs */ - union ctl_io *original_sc; - union ctl_io *serializing_sc; + union ctl_io *remote_io; /* I/O counterpart on remote HA side */ + void *pad1; void *pool; /* I/O pool */ union ctl_priv ctl_private[CTL_NUM_PRIV];/* CTL private area */ - struct ctl_sg_entry *remote_sglist; - struct ctl_sg_entry *local_sglist; + void *pad2; + void *pad3; STAILQ_ENTRY(ctl_io_hdr) links; /* linked list pointer */ TAILQ_ENTRY(ctl_io_hdr) ooa_links; TAILQ_ENTRY(ctl_io_hdr) blocked_links; From owner-svn-src-all@freebsd.org Mon Mar 11 03:02:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4777152A543; Mon, 11 Mar 2019 03:02:02 +0000 (UTC) (envelope-from sef@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DBED75685; Mon, 11 Mar 2019 03:02:02 +0000 (UTC) (envelope-from sef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABCE44B42; Mon, 11 Mar 2019 03:01:58 +0000 (UTC) (envelope-from sef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2B31wVZ041415; Mon, 11 Mar 2019 03:01:58 GMT (envelope-from sef@FreeBSD.org) Received: (from sef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2B31waS041414; Mon, 11 Mar 2019 03:01:58 GMT (envelope-from sef@FreeBSD.org) Message-Id: <201903110301.x2B31waS041414@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sef set sender to sef@FreeBSD.org using -f From: Sean Eric Fagan Date: Mon, 11 Mar 2019 03:01:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344998 - stable/12/lib/libutil X-SVN-Group: stable-12 X-SVN-Commit-Author: sef X-SVN-Commit-Paths: stable/12/lib/libutil X-SVN-Commit-Revision: 344998 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5DBED75685 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.94)[-0.936,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 03:02:03 -0000 Author: sef Date: Mon Mar 11 03:01:58 2019 New Revision: 344998 URL: https://svnweb.freebsd.org/changeset/base/344998 Log: MFC r343882 r343881 had an uninitialized error. This fixes that. PR: 233849 Modified: stable/12/lib/libutil/quotafile.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libutil/quotafile.c ============================================================================== --- stable/12/lib/libutil/quotafile.c Mon Mar 11 03:00:33 2019 (r344997) +++ stable/12/lib/libutil/quotafile.c Mon Mar 11 03:01:58 2019 (r344998) @@ -118,7 +118,7 @@ quota_open(struct fstab *fs, int quotatype, int openfl struct dqhdr64 dqh; struct group *grp; struct stat st; - int qcmd, serrno; + int qcmd, serrno = 0; int ufs; if ((qf = calloc(1, sizeof(*qf))) == NULL) From owner-svn-src-all@freebsd.org Mon Mar 11 03:07:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33AE1152A7A1; Mon, 11 Mar 2019 03:07:06 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CF88A75B11; Mon, 11 Mar 2019 03:07:05 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C2ED24B89; Mon, 11 Mar 2019 03:07:05 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2B375lj044893; Mon, 11 Mar 2019 03:07:05 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2B375LX044892; Mon, 11 Mar 2019 03:07:05 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201903110307.x2B375LX044892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 11 Mar 2019 03:07:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345000 - head/sys/arm/freescale/imx X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/freescale/imx X-SVN-Commit-Revision: 345000 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CF88A75B11 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 03:07:06 -0000 Author: ian Date: Mon Mar 11 03:07:05 2019 New Revision: 345000 URL: https://svnweb.freebsd.org/changeset/base/345000 Log: Mark the imx_spi device busy while transfers are in progress, so that the module can't be unloaded while interrupts are pending. Modified: head/sys/arm/freescale/imx/imx_spi.c Modified: head/sys/arm/freescale/imx/imx_spi.c ============================================================================== --- head/sys/arm/freescale/imx/imx_spi.c Mon Mar 11 03:02:58 2019 (r344999) +++ head/sys/arm/freescale/imx/imx_spi.c Mon Mar 11 03:07:05 2019 (r345000) @@ -424,6 +424,7 @@ spi_transfer(device_t dev, device_t child, struct spi_ } mtx_lock(&sc->mtx); + device_busy(sc->dev); if (sc->debug >= 1) { device_printf(sc->dev, @@ -448,6 +449,7 @@ spi_transfer(device_t dev, device_t child, struct spi_ spi_set_chipsel(sc, cs, false); WR4(sc, ECSPI_CTLREG, 0); + device_unbusy(sc->dev); mtx_unlock(&sc->mtx); return (err); @@ -468,11 +470,11 @@ static int spi_detach(device_t dev) { struct spi_softc *sc = device_get_softc(dev); - int idx; + int error, idx; - mtx_lock(&sc->mtx); + if ((error = bus_generic_detach(sc->dev)) != 0) + return (error); - bus_generic_detach(sc->dev); if (sc->spibus != NULL) device_delete_child(dev, sc->spibus); @@ -488,7 +490,6 @@ spi_detach(device_t dev) if (sc->memres != NULL) bus_release_resource(sc->dev, SYS_RES_MEMORY, 0, sc->memres); - mtx_unlock(&sc->mtx); mtx_destroy(&sc->mtx); return (0); From owner-svn-src-all@freebsd.org Sun Mar 10 21:31:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 169761542955; Sun, 10 Mar 2019 21:31:11 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp.infotel.ru (corp.infotel.ru [195.170.219.3]) by mx1.freebsd.org (Postfix) with ESMTP id 9C71F8F416; Sun, 10 Mar 2019 21:31:10 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp (corp.infotel.ru [195.170.219.3]) by corp.infotel.ru (Postfix) with ESMTP id A4C755B22B; Mon, 11 Mar 2019 00:31:01 +0300 (MSK) X-Virus-Scanned: amavisd-new at corp.infotel.ru Received: from corp.infotel.ru ([195.170.219.3]) by corp (corp.infotel.ru [195.170.219.3]) (amavisd-new, port 10024) with ESMTP id Jmo7czPR77Gx; Mon, 11 Mar 2019 00:30:58 +0300 (MSK) Received: from mail.cicgroup.ru (unknown [195.170.219.74]) by corp.infotel.ru (Postfix) with ESMTP id B92555B223; Mon, 11 Mar 2019 00:30:58 +0300 (MSK) Received: from mail.cicgroup.ru (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTP id AB928422120; Mon, 11 Mar 2019 00:30:50 +0300 (MSK) X-Virus-Scanned: amavisd-new at cicgroup.ru Received: from mail.cicgroup.ru ([127.0.0.1]) by mail.cicgroup.ru (mail.cicgroup.ru [127.0.0.1]) (amavisd-new, port 10024) with SMTP id 9y1sdiQmbLyx; Mon, 11 Mar 2019 00:30:48 +0300 (MSK) Received: from localhost (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTPA id ED05C42211C; Mon, 11 Mar 2019 00:30:47 +0300 (MSK) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 11 Mar 2019 00:30:47 +0300 From: Vladimir Kondratyev To: Konstantin Belousov Cc: Vladimir Kondratyev , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org, owner-src-committers@freebsd.org Subject: Re: svn commit: r344984 - in stable/11: sbin/sysctl sys/dev/evdev In-Reply-To: <20190310212201.GS2492@kib.kiev.ua> References: <201903102058.x2AKwOmF050410@repo.freebsd.org> <20190310212201.GS2492@kib.kiev.ua> Message-ID: <2a79d8b442f1187123a82ec5859a64ba@kondratyev.su> X-Sender: vladimir@kondratyev.su User-Agent: Roundcube Webmail/1.3.5 X-Rspamd-Queue-Id: 9C71F8F416 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.968,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 21:31:11 -0000 On 2019-03-11 00:22, Konstantin Belousov wrote: > On Sun, Mar 10, 2019 at 08:58:24PM +0000, Vladimir Kondratyev wrote: >> Author: wulf >> Date: Sun Mar 10 20:58:24 2019 >> New Revision: 344984 >> URL: https://svnweb.freebsd.org/changeset/base/344984 >> >> Log: >> MFC r344494,r344495: >> >> + ev_sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&evdev->ev_sysctl_ctx, >> + SYSCTL_STATIC_CHILDREN(_kern_evdev_input), OID_AUTO, >> + ev_unit_str, CTLFLAG_RD, NULL, "", "device index"); > This change depends on r310051 which was not merged to stable/11. I will fix it soon. Sorry for breakage. -- WBR Vladimir Kondratyev From owner-svn-src-all@freebsd.org Mon Mar 11 08:30:30 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA91015372ED; Mon, 11 Mar 2019 08:30:30 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DA318A0D8; Mon, 11 Mar 2019 08:30:30 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 52D8B81DC; Mon, 11 Mar 2019 08:30:30 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2B8UUgQ010554; Mon, 11 Mar 2019 08:30:30 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2B8UTLr010550; Mon, 11 Mar 2019 08:30:29 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903110830.x2B8UTLr010550@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 11 Mar 2019 08:30:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345002 - head/sys/dev/iwm X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/dev/iwm X-SVN-Commit-Revision: 345002 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5DA318A0D8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 08:30:31 -0000 Author: avos Date: Mon Mar 11 08:30:29 2019 New Revision: 345002 URL: https://svnweb.freebsd.org/changeset/base/345002 Log: iwm(4): use correct channel list source for Intel 3168 Intel 3168 uses another EEPROM section to store channel flags; port missing bits from iwlwifi to make it work. PR: 230750, 236235 Tested by: Bert JW Regeer MFC after: 3 days Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_7000.c head/sys/dev/iwm/if_iwm_config.h head/sys/dev/iwm/if_iwmreg.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Mar 11 07:18:40 2019 (r345001) +++ head/sys/dev/iwm/if_iwm.c Mon Mar 11 08:30:29 2019 (r345002) @@ -2211,7 +2211,8 @@ iwm_parse_nvm_data(struct iwm_softc *sc, } if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) { - memcpy(data->nvm_ch_flags, &nvm_sw[IWM_NVM_CHANNELS], + memcpy(data->nvm_ch_flags, sc->cfg->nvm_type == IWM_NVM_SDP ? + ®ulatory[0] : &nvm_sw[IWM_NVM_CHANNELS], IWM_NUM_CHANNELS * sizeof(uint16_t)); } else { memcpy(data->nvm_ch_flags, ®ulatory[IWM_NVM_CHANNELS_8000], @@ -2271,8 +2272,9 @@ iwm_parse_nvm_sections(struct iwm_softc *sc, struct iw sw = (const uint16_t *)sections[IWM_NVM_SECTION_TYPE_SW].data; calib = (const uint16_t *) sections[IWM_NVM_SECTION_TYPE_CALIBRATION].data; - regulatory = (const uint16_t *) - sections[IWM_NVM_SECTION_TYPE_REGULATORY].data; + regulatory = sc->cfg->nvm_type == IWM_NVM_SDP ? + (const uint16_t *)sections[IWM_NVM_SECTION_TYPE_REGULATORY_SDP].data : + (const uint16_t *)sections[IWM_NVM_SECTION_TYPE_REGULATORY].data; mac_override = (const uint16_t *) sections[IWM_NVM_SECTION_TYPE_MAC_OVERRIDE].data; phy_sku = (const uint16_t *)sections[IWM_NVM_SECTION_TYPE_PHY_SKU].data; Modified: head/sys/dev/iwm/if_iwm_7000.c ============================================================================== --- head/sys/dev/iwm/if_iwm_7000.c Mon Mar 11 07:18:40 2019 (r345001) +++ head/sys/dev/iwm/if_iwm_7000.c Mon Mar 11 08:30:29 2019 (r345002) @@ -119,6 +119,7 @@ const struct iwm_cfg iwm3168_cfg = { .fw_name = IWM3168_FW, IWM_DEVICE_7000_COMMON, .host_interrupt_operation_mode = 0, + .nvm_type = IWM_NVM_SDP, }; const struct iwm_cfg iwm7265_cfg = { Modified: head/sys/dev/iwm/if_iwm_config.h ============================================================================== --- head/sys/dev/iwm/if_iwm_config.h Mon Mar 11 07:18:40 2019 (r345001) +++ head/sys/dev/iwm/if_iwm_config.h Mon Mar 11 08:30:29 2019 (r345002) @@ -104,7 +104,20 @@ static inline uint8_t num_of_ant(uint8_t mask) #define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000 (32 * 512 * sizeof(uint16_t)) /* 32 KB */ #define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_9000 IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000 + /** + * enum iwl_nvm_type - nvm formats + * @IWM_NVM: the regular format + * @IWM_NVM_EXT: extended NVM format + * @IWM_NVM_SDP: NVM format used by 3168 series + */ +enum iwm_nvm_type { + IWM_NVM, + IWM_NVM_EXT, + IWM_NVM_SDP, +}; + +/** * struct iwm_cfg * @name: Official name of the device * @fw_name: Firmware filename. @@ -113,6 +126,7 @@ static inline uint8_t num_of_ant(uint8_t mask) * @nvm_hw_section_num: the ID of the HW NVM section * @apmg_wake_up_wa: should the MAC access REQ be asserted when a command * is in flight. This is due to a HW bug in 7260, 3160 and 7265. + * @nvm_type: see &enum iwl_nvm_type */ struct iwm_cfg { const char *name; @@ -122,6 +136,7 @@ struct iwm_cfg { int host_interrupt_operation_mode; uint8_t nvm_hw_section_num; int apmg_wake_up_wa; + enum iwm_nvm_type nvm_type; }; /* Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Mon Mar 11 07:18:40 2019 (r345001) +++ head/sys/dev/iwm/if_iwmreg.h Mon Mar 11 08:30:29 2019 (r345002) @@ -2032,6 +2032,7 @@ enum { IWM_NVM_SECTION_TYPE_REGULATORY = 3, IWM_NVM_SECTION_TYPE_CALIBRATION = 4, IWM_NVM_SECTION_TYPE_PRODUCTION = 5, + IWM_NVM_SECTION_TYPE_REGULATORY_SDP = 8, IWM_NVM_SECTION_TYPE_MAC_OVERRIDE = 11, IWM_NVM_SECTION_TYPE_PHY_SKU = 12, IWM_NVM_MAX_NUM_SECTIONS = 13, From owner-svn-src-all@freebsd.org Sun Mar 10 22:16:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B70D1543E35; Sun, 10 Mar 2019 22:16:47 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A55269FCA; Sun, 10 Mar 2019 22:16:46 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-io1-xd29.google.com with SMTP id x7so2387018ioh.4; Sun, 10 Mar 2019 15:16:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IHytSaQ6EJ324Ue0TZ9cEVRU2rOkd8RaevOciEgCR4U=; b=Xvs/yOVMU0zBSdAzS2Bwq2oy5G/3JuLODBaDCMAo6RaO+xaCLqA11QlYzrkn9jCTMg XLNYMr0l8QfKMFHEenpLt3zqQDcoBtcd9qGY6V4DGMRKrrOU1K9wavGfRJ4AJfTr3t/o 16q4IkktoKtAhK8WgqZkfhFh7nWEWL3df7tBprs0LgQ5HtP7C5lnRfa8lq3HmrZhRE/b 7tB+GX8M+e+05GfFHoC56MbBUy7o612jDQHAvEUPdgx9x4AIdeZxrhocey7WiO20o2Ql Ef0L8gR2VNDYs4XfZ3CWO1Z15MaP6qGWxk/67ATuE2EW1Q4L/JXqsVzXM5Wk2Zp+8VDe 409A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IHytSaQ6EJ324Ue0TZ9cEVRU2rOkd8RaevOciEgCR4U=; b=Z9Uty2ru/cMXpKfikvtJEVjoVZvTxETj7BAwiG6NlknC6es6rqXHjSItRirR36sHsT 9U/Ovjs7sNaWLGdEi/L14ESNZZEEUBHONMLBvz8IdQ58wzSr8brvb2+owDtjPVhJLLI3 O9lduTvwfQjIV4YrcjSTnxGVwzrUaI71/J4EnIlLS8HjY+UI8Y5DyoAHPEQRM6yn8AMS FLKlUoPh4h9ex99ShQ+F/AAC4DDHZ+HFBnTHoaA5BLEg8iRKr/bUJ643Icwwmnat/QIl hrOWRQEGdMHxZBmBDfo5F83QnpM6CP8VlYQdsOGBMSYpKcRivKll4txTt7KmMzpqhmkg BUzw== X-Gm-Message-State: APjAAAUUlNwGdl6G7pGGoBCb/MAUjQ+lN7EHW9s15mx1QkIVbNkjb5QY fe60mL52Cmw1ZHI1lPLnmqzU6nay X-Google-Smtp-Source: APXvYqwsbV2CD8tmGJ2QzCZv81OWyuiF0+f0HrFtqixhi538D8rDZ+9EKzno+ba5nprD7p9EXMJ4Pg== X-Received: by 2002:a6b:cd03:: with SMTP id d3mr16677829iog.38.1552256205145; Sun, 10 Mar 2019 15:16:45 -0700 (PDT) Received: from titan.knownspace (173-25-245-129.client.mchsi.com. [173.25.245.129]) by smtp.gmail.com with ESMTPSA id u196sm8743241itu.34.2019.03.10.15.16.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 10 Mar 2019 15:16:44 -0700 (PDT) Date: Sun, 10 Mar 2019 17:16:40 -0500 From: Justin Hibbits To: Alexey Dokuchaev Cc: Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r344960 - head/sys/powerpc/powerpc Message-ID: <20190310171640.31bb9c54@titan.knownspace> In-Reply-To: <20190309085058.GA60945@FreeBSD.org> References: <201903090318.x293IcLc023548@repo.freebsd.org> <20190309085058.GA60945@FreeBSD.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; powerpc64-portbld-freebsd13.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 8A55269FCA X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=Xvs/yOVM; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of chmeeedalf@gmail.com designates 2607:f8b0:4864:20::d29 as permitted sender) smtp.mailfrom=chmeeedalf@gmail.com X-Spamd-Result: default: False [-6.69 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-2.72)[ip: (-8.74), ipnet: 2607:f8b0::/32(-2.74), asn: 15169(-2.07), country: US(-0.07)]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[9.2.d.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_LAST(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2019 22:16:47 -0000 On Sat, 9 Mar 2019 08:50:58 +0000 Alexey Dokuchaev wrote: > On Sat, Mar 09, 2019 at 03:18:38AM +0000, Justin Hibbits wrote: > > New Revision: 344960 > > URL: https://svnweb.freebsd.org/changeset/base/344960 > > > > Log: > > powerpc: Print trap frame address for fatal traps > > > > MFC after: 1 week > > > > Modified: > > head/sys/powerpc/powerpc/trap.c > > > > Modified: head/sys/powerpc/powerpc/trap.c > > ============================================================================== > > --- head/sys/powerpc/powerpc/trap.c Sat Mar 9 03:15:09 > > 2019 (r344959) +++ head/sys/powerpc/powerpc/trap.c > > Sat Mar 9 03:18:37 2019 (r344960) @@ -546,6 +546,7 @@ > > printtrap(u_int vector, struct trapframe *frame, int i printf(" > > current msr = 0x%" PRIxPTR "\n", mfmsr()); printf(" > > lr = 0x%" PRIxPTR " (0x%" PRIxPTR ")\n", frame->lr, > > frame->lr - (register_t)(__startkernel - KERNBASE)); > > + printf(" frame = %p\n", frame); > > printf(" curthread = %p\n", curthread); > > Some of those are printed with %PRIxPTR, some with %p. Perhaps this > inconsistency can be avoided? > > ./danfe PRIxPTR is for printing a pointer-like value that's not a pointer. The other values printed are of type register_t, not void *. - Justin From owner-svn-src-all@freebsd.org Mon Mar 11 10:33:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB698153BA90; Mon, 11 Mar 2019 10:33:32 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F0638F7A5; Mon, 11 Mar 2019 10:33:32 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 71CD49875; Mon, 11 Mar 2019 10:33:32 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BAXWvG079059; Mon, 11 Mar 2019 10:33:32 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BAXW5q079058; Mon, 11 Mar 2019 10:33:32 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201903111033.x2BAXW5q079058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 11 Mar 2019 10:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345003 - head/sys/netpfil/ipfw/nat64 X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netpfil/ipfw/nat64 X-SVN-Commit-Revision: 345003 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7F0638F7A5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 10:33:33 -0000 Author: ae Date: Mon Mar 11 10:33:32 2019 New Revision: 345003 URL: https://svnweb.freebsd.org/changeset/base/345003 Log: Add NULL pointer check to nat64_output(). It is possible, that a processed packet was originated by local host, in this case m->m_pkthdr.rcvif is NULL. Check and set it to V_loif to avoid NULL pointer dereference in IP input code, since it is expected that packet has valid receiving interface when netisr processes it. Obtained from: Yandex LLC MFC after: 1 week Sponsored by: Yandex LLC Modified: head/sys/netpfil/ipfw/nat64/nat64_translate.c Modified: head/sys/netpfil/ipfw/nat64/nat64_translate.c ============================================================================== --- head/sys/netpfil/ipfw/nat64/nat64_translate.c Mon Mar 11 08:30:29 2019 (r345002) +++ head/sys/netpfil/ipfw/nat64/nat64_translate.c Mon Mar 11 10:33:32 2019 (r345003) @@ -219,6 +219,8 @@ nat64_output(struct ifnet *ifp, struct mbuf *m, struct } if (logdata != NULL) nat64_log(logdata, m, af); + if (m->m_pkthdr.rcvif == NULL) + m->m_pkthdr.rcvif = V_loif; ret = netisr_queue(ret, m); if (ret != 0) NAT64STAT_INC(stats, oerrors); From owner-svn-src-all@freebsd.org Mon Mar 11 02:12:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5658215283E5; Mon, 11 Mar 2019 02:12:44 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 9AA9072C83; Mon, 11 Mar 2019 02:12:43 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2B2Cfqb007606; Sun, 10 Mar 2019 19:12:41 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2B2CftU007605; Sun, 10 Mar 2019 19:12:41 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903110212.x2B2CftU007605@ gndrsh.dnsmgr.net> Subject: Re: svn commit: r344990 - in head: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn sys/... In-Reply-To: <201903110127.x2B1R2as090886@repo.freebsd.org> To: Andriy Voskoboinyk Date: Sun, 10 Mar 2019 19:12:41 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 9AA9072C83 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.90 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.91)[-0.906,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 02:12:44 -0000 > Author: avos > Date: Mon Mar 11 01:27:01 2019 > New Revision: 344990 > URL: https://svnweb.freebsd.org/changeset/base/344990 > > Log: > Fix ieee80211_radiotap(9) usage in wireless drivers: > > - Alignment issues: > * Add missing __packed attributes + padding across all drivers; in > most places there was an assumption that padding will be always > minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) - > padding was just missing. > * Add __aligned(8) attribute for all Rx radiotap headers since they can > contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, so > just drop the attribute here. Refresh ieee80211_radiotap(9) man page > accordingly. > > - Since net80211 automatically updates channel frequency / flags in > ieee80211_radiotap_chan_change() drop duplicate setup for these fields > in drivers. > > Tested with Netgear WG111 v3 (urtw(4)), STA mode. > > MFC after: 2 weeks Isnt this going to seriously break module load compatibility due to struct size and alignment changes if you merge this to stable/12? > Modified: > head/share/man/man9/ieee80211_radiotap.9 > head/sys/dev/ath/if_athioctl.h > head/sys/dev/bwi/if_bwi.c > head/sys/dev/bwi/if_bwivar.h > head/sys/dev/bwn/if_bwn.c > head/sys/dev/bwn/if_bwnvar.h ... -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Mar 11 09:18:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60C651538F10; Mon, 11 Mar 2019 09:18:13 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id A7EC08C425; Mon, 11 Mar 2019 09:18:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id C851A439225; Mon, 11 Mar 2019 20:18:02 +1100 (AEDT) Date: Mon, 11 Mar 2019 20:18:01 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Justin Hibbits cc: Alexey Dokuchaev , Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r344960 - head/sys/powerpc/powerpc In-Reply-To: <20190310171640.31bb9c54@titan.knownspace> Message-ID: <20190311191740.J2090@besplex.bde.org> References: <201903090318.x293IcLc023548@repo.freebsd.org> <20190309085058.GA60945@FreeBSD.org> <20190310171640.31bb9c54@titan.knownspace> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=UJetJGXy c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=JGUapKmP4T1tokrbwaUA:9 a=JNDmUP7PZXdV0YNV:21 a=JfYhJGOWAlVr0w_c:21 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-Rspamd-Queue-Id: A7EC08C425 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.86 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.86)[-0.859,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 09:18:13 -0000 On Sun, 10 Mar 2019, Justin Hibbits wrote: > On Sat, 9 Mar 2019 08:50:58 +0000 > Alexey Dokuchaev wrote: > >> On Sat, Mar 09, 2019 at 03:18:38AM +0000, Justin Hibbits wrote: >>> ... >>> Log: >>> powerpc: Print trap frame address for fatal traps >>> ... >>> Modified: head/sys/powerpc/powerpc/trap.c >>> ============================================================================== >>> --- head/sys/powerpc/powerpc/trap.c Sat Mar 9 03:15:09 >>> 2019 (r344959) +++ head/sys/powerpc/powerpc/trap.c >>> Sat Mar 9 03:18:37 2019 (r344960) @@ -546,6 +546,7 @@ >>> printtrap(u_int vector, struct trapframe *frame, int i printf(" >>> current msr = 0x%" PRIxPTR "\n", mfmsr()); printf(" >>> lr = 0x%" PRIxPTR " (0x%" PRIxPTR ")\n", frame->lr, >>> frame->lr - (register_t)(__startkernel - KERNBASE)); No one wrote that as stated above. Some mail program mangled it. >>> + printf(" frame = %p\n", frame); >>> printf(" curthread = %p\n", curthread); >> >> Some of those are printed with %PRIxPTR, some with %p. Perhaps this >> inconsistency can be avoided? >> ... > > PRIxPTR is for printing a pointer-like value that's not a pointer. The > other values printed are of type register_t, not void *. PRI*any is for writing style bugs in the source and sometimes in the output. Sometimes also type errors. It should never be used. The above (not the 1 line in this commit, but nearby) demonstrates common errors in using it: - the format given by PRIany is not fully specified. It may contain a lebgth modifier. Thus it is unusable in carefully formatted output where you would want to add your own length modifier. It also requires knowing too much about this feature to know that adding an 0x prefix or perhaps a '#', '0' or ' ' modifier doesn't mess up the format. This is not much of a problem here. The lengths are only accidentally the same. Maybe they are even the same as for %p format. - first type error: PRIxPTR only has defined behaviour for printing variables of type uintptr_t, but mfmsr() has type register_t. The type mismatch is not only logical, but physical (register_t is signed). Correctness depends on register_t having the same size as uintptr_t and the treatment of signed values as unsigned not being too magic (I think it is implementation-defined but not undefined; however, printing uintptr_t using PRTdPTR gives undefined behaviour on values not representable as intptr_t. It requires knowing too much to know that the above use of PRIxPTR is correct enough. As usual, it is easier to not use PRIany. Just cast to uintmax_t and use %jx. This is much shorter and clearer after correcting the above by adding a cast to uintptr_t. Using uintmax_t has the minor problem that it is wasteful for 32-bit args and will become wasteful for 64-bit args and more wasteful for 32-bit args when uintmax_t becomes 128, 256, ... bits. - second type error: %p only has defined behaviour for printing variables of type void *, but curthread has type struct thread *. This can be fixed by casting to void *, or fixed better by casting to uintmax_t and using %jx. More details below. - poor formatting from %p. %p is guaranteed to bad for formatted output. It is specified to give an (any) implementation-defined sequence of printing characters. To use it except for low quality debugging output, not quite as above (the above attempts medium quality, with some alignment of fields but no attention to field widths for number values), you first have to know what the implementation defines, then don't use it when it is unsuitable. It is easiest to never use it. In FreeBSD, printf(3) documents its format as being as if it is %#x or %#lx. This gives no control over the field width. Its format is different and undocumented for printf(9), but not as bad -- field widths and maybe other things now work for %p. The 0x prefix usually given by '#' is still unavoidable. Conversion of pointers to uintmax_t or intmax_t gives full control over the format, just like for converted integer types. This is not quite easier and clearer for pointers. 3 casts are needed to go from an arbitrary pointer to a uintmax_t. First to const volatile void * (not to plain void *, since that gives cast-qual warnings if the pointer is const or volatile). Then to uintptr_t. Then to uintmax_t. In theory, conversion of a pointer to an integer using these casts may change its representation, and we should use a different method to see the original bits. %p is no good for this of course -- it might convert to an integer using casts too, and its its format is poorly documented. To see the original bits, memcpy() the pointer to an array of bytes and print the bytes. In practice, conversion using casts preserves all the bits, and the only difference between printing the integer and printing the bytes is that printf() has better support for the former and the output may be more difficult to understand even if it is in hex, due to endianness differences. ps (in both the kernel and userland IIRC) has some support for printing kernel addresses in a compressed format with a fixed number of leading 0 and/or f nybbles suppressed. This is most needed and also most broken for 64-bit addresses. On some arches, all kernel addresses are in the top half of the address space, so plain %[lx] format gives the same field width for all kernel addresses, but on 64-bit arches this is 16 bytes wide and tends to break formatting in other ways. Bruce From owner-svn-src-all@freebsd.org Mon Mar 11 09:26:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0304E153967A; Mon, 11 Mar 2019 09:26:43 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B1D08CC44; Mon, 11 Mar 2019 09:26:42 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: by mail-lj1-f176.google.com with SMTP id g80so3351690ljg.6; Mon, 11 Mar 2019 02:26:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:subject:references:date:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=VFFhGcVt0+sWbJ40MExcq5AqzR4gUsxfdATRy+hcGA0=; b=T99MLnBnijlCApGugHwokAo+Xl3ecjVC1lYoU/UZpbCEcaRqmr1i35QFBcUWD2tp08 /RiTb0OCon9Zy69K3vyYmGZGf88Hk9ksvgp2hdCTk76BBWS6n7q2Ia4/fnaYe6C2C6uS NNFn62rpUibIhENrWv5yYJc2QKc8vS2UDErM6M/u9UOpnVjpcgmAphwKCODA7Xg8W2x1 pCdHq7R04u8PtWLGOEgeoS3ftv/XZmAlhl3toyYy0swF7XuIDWmOPtYH46w2fu58BE+o VE5OtLRIPlHHQyeoKeYqtMjjTShI/YFdZA1c+wyXajnwkeKkue/y2f8gAFPuDq1c5uxY f5Vg== X-Gm-Message-State: APjAAAXqvkh/hyXZecLJrqochCcP99564A/ScWPdWoycAHaQ7i/60t4d N0y+oh0DuK07gCcfsUfKdx4liDEVjDk= X-Google-Smtp-Source: APXvYqx+PSemDqJoT/GzwzLfvgUerTqpVSgL5QbkY1aH2C4RSysbete5dDvD3rUaEN4QgZSW0RvYEQ== X-Received: by 2002:a2e:968c:: with SMTP id q12mr153343lji.95.1552296395143; Mon, 11 Mar 2019 02:26:35 -0700 (PDT) Received: from localhost (46-133-145-217.dialup.umc.net.ua. [46.133.145.217]) by smtp.gmail.com with ESMTPSA id w17sm1124066lfk.18.2019.03.11.02.26.33 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 11 Mar 2019 02:26:34 -0700 (PDT) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Rodney W. Grimes" Cc: src-committers , svn-src-all , svn-src-head , "Warner Losh" Subject: Re: svn commit: r344990 - in head: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn sys/... References: <201903110127.x2B1R2as090886@repo.freebsd.org> <5c85c429.1c69fb81.1869f.e87bSMTPIN_ADDED_BROKEN@mx.google.com> Date: Mon, 11 Mar 2019 11:25:41 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Andriy Voskoboinyk" Message-ID: In-Reply-To: User-Agent: Opera Mail/12.15 (FreeBSD) X-Rspamd-Queue-Id: 5B1D08CC44 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.92 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.92)[-0.922,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 09:26:43 -0000 > > On Sun, Mar 10, 2019 at 8:12 PM Rodney W. Grimes > wrote: >>> Author: avos >> >>> Date: Mon Mar 11 01:27:01 2019 >> >>> New Revision: 344990 >> >>> URL: https://svnweb.freebsd.org/changeset/base/344990 >> >>> >> >>> Log: >> >>> Fix ieee80211_radiotap(9) usage in wireless drivers: >> >>> >> >>> - Alignment issues: >> >>> * Add missing __packed attributes + padding across all drivers; in >> >>> most places there was an assumption that padding will be always >> >>> minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) - >> >>> padding was just missing. >> >>> * Add __aligned(8) attribute for all Rx radiotap headers since they >>> can >> >>> contain 64-bit TSF timestamp; it cannot appear in Tx radiotap >>> headers, so >> >>> just drop the attribute here. Refresh ieee80211_radiotap(9) man page >> >>> accordingly. >> >>> >> >>> - Since net80211 automatically updates channel frequency / flags in >> >>> ieee80211_radiotap_chan_change() drop duplicate setup for these >>> fields >> >>> in drivers. >> >>> >> >>> Tested with Netgear WG111 v3 (urtw(4)), STA mode. >> >>> >> >>> MFC after: 2 weeks >> >> >> >> Isnt this going to seriously break module load compatibility >> >> due to struct size and alignment changes if you merge this to stable/12? > > It looks like all these changes are within the modules, not in the > KBI... It looks like this will make things work >better on architectures > that don't like unaligned accesses. It seems like modules that aren't > updated don't work today >on those architectures... Yes, only drivers are touched - updated structures and driver's softc (where they are stored) are not exposed to other modules, so there is no need to keep size / offsets for structure members + the commit removes unaligned access, so urtw(4) (for example) will not work without this change on architectures, where unaligned access is prohibited. > > > Warner > >> >>> Modified: >> >>> head/share/man/man9/ieee80211_radiotap.9 >> >>> head/sys/dev/ath/if_athioctl.h >> >>> head/sys/dev/bwi/if_bwi.c >> >>> head/sys/dev/bwi/if_bwivar.h >> >>> head/sys/dev/bwn/if_bwn.c >> >>> head/sys/dev/bwn/if_bwnvar.h >> >> ... >> >> >> >> >> >> -- >> Rod Grimes >> rgrimes@freebsd.org >> >> >> From owner-svn-src-all@freebsd.org Mon Mar 11 10:41:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD1ED153C2B7; Mon, 11 Mar 2019 10:41:38 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 711798FF71; Mon, 11 Mar 2019 10:41:38 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 57DA5C99A; Mon, 11 Mar 2019 10:41:38 +0000 (UTC) Date: Mon, 11 Mar 2019 10:41:38 +0000 From: Alexey Dokuchaev To: Bruce Evans Cc: Justin Hibbits , Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r344960 - head/sys/powerpc/powerpc Message-ID: <20190311104138.GA60526@FreeBSD.org> References: <201903090318.x293IcLc023548@repo.freebsd.org> <20190309085058.GA60945@FreeBSD.org> <20190310171640.31bb9c54@titan.knownspace> <20190311191740.J2090@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190311191740.J2090@besplex.bde.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 711798FF71 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.991,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 10:41:39 -0000 On Mon, Mar 11, 2019 at 08:18:01PM +1100, Bruce Evans wrote: > ... > - poor formatting from %p. %p is guaranteed to bad for formatted output. > It is specified to give an (any) implementation-defined sequence of > printing characters. To use it except for low quality debugging > output, not quite as above (the above attempts medium quality, with > some alignment of fields but no attention to field widths for number > values), you first have to know what the implementation defines, > then don't use it when it is unsuitable. It is easiest to never use > it. In FreeBSD, printf(3) documents its format as being as if it > is %#x or %#lx. This gives no control over the field width. Yeah, this had annoyed me before, I recall some utilities suffer from broken formatting because of %p. > Conversion of pointers to uintmax_t or intmax_t gives full control > over the format, just like for converted integer types. This is not > quite easier and clearer for pointers. 3 casts are needed to go from > an arbitrary pointer to a uintmax_t. First to const volatile void * > (not to plain void *, since that gives cast-qual warnings if the > pointer is const or volatile). Then to uintptr_t. Then to uintmax_t. Thanks for the insight Bruce. ./danfe From owner-svn-src-all@freebsd.org Mon Mar 11 10:42:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4EDF153C3B6; Mon, 11 Mar 2019 10:42:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6915A90147; Mon, 11 Mar 2019 10:42:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5F38199FE; Mon, 11 Mar 2019 10:42:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BAgAhK081711; Mon, 11 Mar 2019 10:42:10 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BAgABw081709; Mon, 11 Mar 2019 10:42:10 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201903111042.x2BAgABw081709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 11 Mar 2019 10:42:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345004 - head/sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netpfil/ipfw X-SVN-Commit-Revision: 345004 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6915A90147 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 10:42:11 -0000 Author: ae Date: Mon Mar 11 10:42:09 2019 New Revision: 345004 URL: https://svnweb.freebsd.org/changeset/base/345004 Log: Add IP_FW_NAT64 to codes that ipfw_chk() can return. It will be used by upcoming NAT64 changes. We use separate code to avoid propogating EACCES error code to user level applications when NAT64 consumes a packet. Obtained from: Yandex LLC MFC after: 1 week Sponsored by: Yandex LLC Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c head/sys/netpfil/ipfw/ip_fw_private.h Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_pfil.c Mon Mar 11 10:33:32 2019 (r345003) +++ head/sys/netpfil/ipfw/ip_fw_pfil.c Mon Mar 11 10:42:09 2019 (r345004) @@ -313,6 +313,10 @@ again: case IP_FW_REASS: goto again; /* continue with packet */ + case IP_FW_NAT64: + ret = PFIL_CONSUMED; + break; + default: KASSERT(0, ("%s: unknown retval", __func__)); } Modified: head/sys/netpfil/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_private.h Mon Mar 11 10:33:32 2019 (r345003) +++ head/sys/netpfil/ipfw/ip_fw_private.h Mon Mar 11 10:42:09 2019 (r345004) @@ -61,6 +61,7 @@ enum { IP_FW_NGTEE, IP_FW_NAT, IP_FW_REASS, + IP_FW_NAT64, }; /* From owner-svn-src-all@freebsd.org Mon Mar 11 13:33:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FC9C1543525; Mon, 11 Mar 2019 13:33:04 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 151CC9628A; Mon, 11 Mar 2019 13:33:04 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 04A40B716; Mon, 11 Mar 2019 13:33:04 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BDX3Yj077125; Mon, 11 Mar 2019 13:33:03 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BDX3j2077124; Mon, 11 Mar 2019 13:33:03 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201903111333.x2BDX3j2077124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Mon, 11 Mar 2019 13:33:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345005 - head/libexec/rc/rc.d X-SVN-Group: head X-SVN-Commit-Author: lidl X-SVN-Commit-Paths: head/libexec/rc/rc.d X-SVN-Commit-Revision: 345005 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 151CC9628A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 13:33:04 -0000 Author: lidl Date: Mon Mar 11 13:33:03 2019 New Revision: 345005 URL: https://svnweb.freebsd.org/changeset/base/345005 Log: Remove an unneeded 'tail -n 1' from a pipeline When piping to awk, it's almost always an anti-pattern to use 'grep' first. When not in a pipeline, sometimes it is faster to use tail, as awk must process all the lines in the input stream, and won't 'seek'. In a pipeline, both grep and awk must process all lines, so we might as well skip the extra process creation for tail and just use awk for all the processing. Reviewed by: jilles MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D19441 Modified: head/libexec/rc/rc.d/growfs Modified: head/libexec/rc/rc.d/growfs ============================================================================== --- head/libexec/rc/rc.d/growfs Mon Mar 11 10:42:09 2019 (r345004) +++ head/libexec/rc/rc.d/growfs Mon Mar 11 13:33:03 2019 (r345005) @@ -57,7 +57,7 @@ growfs_start () ;; zfs) pool=${FSDEV%%/*} - rootdev=$(zpool list -v $pool | tail -n 1 | awk '{ print $1 }') + rootdev=$(zpool list -v $pool | awk 'END { print $1 }') ;; *) echo "Don't know how to grow root filesystem type: $FSTYPE" From owner-svn-src-all@freebsd.org Mon Mar 11 13:55:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D809D1543E7C; Mon, 11 Mar 2019 13:55:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E5B99700A; Mon, 11 Mar 2019 13:55:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6FB95BA7A; Mon, 11 Mar 2019 13:55:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BDtmWK088018; Mon, 11 Mar 2019 13:55:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BDtl7x088015; Mon, 11 Mar 2019 13:55:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903111355.x2BDtl7x088015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 11 Mar 2019 13:55:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345006 - stable/12/sys/cam/ctl X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cam/ctl X-SVN-Commit-Revision: 345006 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7E5B99700A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 13:55:49 -0000 Author: mav Date: Mon Mar 11 13:55:47 2019 New Revision: 345006 URL: https://svnweb.freebsd.org/changeset/base/345006 Log: MFC r344743: Reduce CTL threads priority to about PUSER. Since in most configurations CTL serves as network service, we found that this change improves local system interactivity under heavy load. Priority of main threads is set slightly higher then worker taskqueues to make them quickly sort incoming requests not creating bottlenecks, while plenty of worker taskqueues should be less sensitive to latency. Modified: stable/12/sys/cam/ctl/ctl.c stable/12/sys/cam/ctl/ctl_backend_block.c stable/12/sys/cam/ctl/ctl_backend_ramdisk.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/ctl/ctl.c ============================================================================== --- stable/12/sys/cam/ctl/ctl.c Mon Mar 11 13:33:03 2019 (r345005) +++ stable/12/sys/cam/ctl/ctl.c Mon Mar 11 13:55:47 2019 (r345006) @@ -66,6 +66,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include @@ -13296,6 +13298,9 @@ ctl_work_thread(void *arg) int retval; CTL_DEBUG_PRINT(("ctl_work_thread starting\n")); + thread_lock(curthread); + sched_prio(curthread, PUSER - 1); + thread_unlock(curthread); while (!softc->shutdown) { /* @@ -13345,7 +13350,7 @@ ctl_work_thread(void *arg) } /* Sleep until we have something to do. */ - mtx_sleep(thr, &thr->queue_lock, PDROP | PRIBIO, "-", 0); + mtx_sleep(thr, &thr->queue_lock, PDROP, "-", 0); } thr->thread = NULL; kthread_exit(); @@ -13358,6 +13363,9 @@ ctl_lun_thread(void *arg) struct ctl_be_lun *be_lun; CTL_DEBUG_PRINT(("ctl_lun_thread starting\n")); + thread_lock(curthread); + sched_prio(curthread, PUSER - 1); + thread_unlock(curthread); while (!softc->shutdown) { mtx_lock(&softc->ctl_lock); @@ -13371,7 +13379,7 @@ ctl_lun_thread(void *arg) /* Sleep until we have something to do. */ mtx_sleep(&softc->pending_lun_queue, &softc->ctl_lock, - PDROP | PRIBIO, "-", 0); + PDROP, "-", 0); } softc->lun_thread = NULL; kthread_exit(); @@ -13389,6 +13397,9 @@ ctl_thresh_thread(void *arg) int i, e, set; CTL_DEBUG_PRINT(("ctl_thresh_thread starting\n")); + thread_lock(curthread); + sched_prio(curthread, PUSER - 1); + thread_unlock(curthread); while (!softc->shutdown) { mtx_lock(&softc->ctl_lock); @@ -13476,7 +13487,7 @@ ctl_thresh_thread(void *arg) } } mtx_sleep(&softc->thresh_thread, &softc->ctl_lock, - PDROP | PRIBIO, "-", CTL_LBP_PERIOD * hz); + PDROP, "-", CTL_LBP_PERIOD * hz); } softc->thresh_thread = NULL; kthread_exit(); Modified: stable/12/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/12/sys/cam/ctl/ctl_backend_block.c Mon Mar 11 13:33:03 2019 (r345005) +++ stable/12/sys/cam/ctl/ctl_backend_block.c Mon Mar 11 13:55:47 2019 (r345006) @@ -2381,7 +2381,7 @@ ctl_be_block_create(struct ctl_be_block_softc *softc, */ retval = taskqueue_start_threads(&be_lun->io_taskqueue, /*num threads*/num_threads, - /*priority*/PWAIT, + /*priority*/PUSER, /*thread name*/ "%s taskq", be_lun->lunname); Modified: stable/12/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/12/sys/cam/ctl/ctl_backend_ramdisk.c Mon Mar 11 13:33:03 2019 (r345005) +++ stable/12/sys/cam/ctl/ctl_backend_ramdisk.c Mon Mar 11 13:55:47 2019 (r345006) @@ -1149,7 +1149,7 @@ ctl_backend_ramdisk_create(struct ctl_be_ramdisk_softc retval = taskqueue_start_threads(&be_lun->io_taskqueue, /*num threads*/1, - /*priority*/PWAIT, + /*priority*/PUSER, /*thread name*/ "%s taskq", be_lun->lunname); if (retval != 0) From owner-svn-src-all@freebsd.org Mon Mar 11 13:56:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADE351543F4E; Mon, 11 Mar 2019 13:56:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 52E52971C4; Mon, 11 Mar 2019 13:56:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43F47BA7B; Mon, 11 Mar 2019 13:56:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BDuq5S088119; Mon, 11 Mar 2019 13:56:52 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BDupJh088116; Mon, 11 Mar 2019 13:56:51 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903111356.x2BDupJh088116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 11 Mar 2019 13:56: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: r345007 - stable/11/sys/cam/ctl X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cam/ctl X-SVN-Commit-Revision: 345007 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 52E52971C4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 13:56:52 -0000 Author: mav Date: Mon Mar 11 13:56:51 2019 New Revision: 345007 URL: https://svnweb.freebsd.org/changeset/base/345007 Log: MFC r344743: Reduce CTL threads priority to about PUSER. Since in most configurations CTL serves as network service, we found that this change improves local system interactivity under heavy load. Priority of main threads is set slightly higher then worker taskqueues to make them quickly sort incoming requests not creating bottlenecks, while plenty of worker taskqueues should be less sensitive to latency. Modified: stable/11/sys/cam/ctl/ctl.c stable/11/sys/cam/ctl/ctl_backend_block.c stable/11/sys/cam/ctl/ctl_backend_ramdisk.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ctl/ctl.c ============================================================================== --- stable/11/sys/cam/ctl/ctl.c Mon Mar 11 13:55:47 2019 (r345006) +++ stable/11/sys/cam/ctl/ctl.c Mon Mar 11 13:56:51 2019 (r345007) @@ -62,6 +62,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -13343,6 +13345,9 @@ ctl_work_thread(void *arg) int retval; CTL_DEBUG_PRINT(("ctl_work_thread starting\n")); + thread_lock(curthread); + sched_prio(curthread, PUSER - 1); + thread_unlock(curthread); while (!softc->shutdown) { /* @@ -13392,7 +13397,7 @@ ctl_work_thread(void *arg) } /* Sleep until we have something to do. */ - mtx_sleep(thr, &thr->queue_lock, PDROP | PRIBIO, "-", 0); + mtx_sleep(thr, &thr->queue_lock, PDROP, "-", 0); } thr->thread = NULL; kthread_exit(); @@ -13405,6 +13410,9 @@ ctl_lun_thread(void *arg) struct ctl_be_lun *be_lun; CTL_DEBUG_PRINT(("ctl_lun_thread starting\n")); + thread_lock(curthread); + sched_prio(curthread, PUSER - 1); + thread_unlock(curthread); while (!softc->shutdown) { mtx_lock(&softc->ctl_lock); @@ -13418,7 +13426,7 @@ ctl_lun_thread(void *arg) /* Sleep until we have something to do. */ mtx_sleep(&softc->pending_lun_queue, &softc->ctl_lock, - PDROP | PRIBIO, "-", 0); + PDROP, "-", 0); } softc->lun_thread = NULL; kthread_exit(); @@ -13436,6 +13444,9 @@ ctl_thresh_thread(void *arg) int i, e, set; CTL_DEBUG_PRINT(("ctl_thresh_thread starting\n")); + thread_lock(curthread); + sched_prio(curthread, PUSER - 1); + thread_unlock(curthread); while (!softc->shutdown) { mtx_lock(&softc->ctl_lock); @@ -13523,7 +13534,7 @@ ctl_thresh_thread(void *arg) } } mtx_sleep(&softc->thresh_thread, &softc->ctl_lock, - PDROP | PRIBIO, "-", CTL_LBP_PERIOD * hz); + PDROP, "-", CTL_LBP_PERIOD * hz); } softc->thresh_thread = NULL; kthread_exit(); Modified: stable/11/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_backend_block.c Mon Mar 11 13:55:47 2019 (r345006) +++ stable/11/sys/cam/ctl/ctl_backend_block.c Mon Mar 11 13:56:51 2019 (r345007) @@ -2378,7 +2378,7 @@ ctl_be_block_create(struct ctl_be_block_softc *softc, */ retval = taskqueue_start_threads(&be_lun->io_taskqueue, /*num threads*/num_threads, - /*priority*/PWAIT, + /*priority*/PUSER, /*thread name*/ "%s taskq", be_lun->lunname); Modified: stable/11/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_backend_ramdisk.c Mon Mar 11 13:55:47 2019 (r345006) +++ stable/11/sys/cam/ctl/ctl_backend_ramdisk.c Mon Mar 11 13:56:51 2019 (r345007) @@ -1145,7 +1145,7 @@ ctl_backend_ramdisk_create(struct ctl_be_ramdisk_softc retval = taskqueue_start_threads(&be_lun->io_taskqueue, /*num threads*/1, - /*priority*/PWAIT, + /*priority*/PUSER, /*thread name*/ "%s taskq", be_lun->lunname); if (retval != 0) From owner-svn-src-all@freebsd.org Mon Mar 11 14:21:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 991051544986; Mon, 11 Mar 2019 14:21:16 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 38D0F6811E; Mon, 11 Mar 2019 14:21:16 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B81ABFC1; Mon, 11 Mar 2019 14:21:16 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BELG2T002225; Mon, 11 Mar 2019 14:21:16 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BELFZ2002220; Mon, 11 Mar 2019 14:21:15 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201903111421.x2BELFZ2002220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 11 Mar 2019 14:21:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345008 - head/sys/dev/isp X-SVN-Group: head X-SVN-Commit-Author: ken X-SVN-Commit-Paths: head/sys/dev/isp X-SVN-Commit-Revision: 345008 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 38D0F6811E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 14:21:16 -0000 Author: ken Date: Mon Mar 11 14:21:14 2019 New Revision: 345008 URL: https://svnweb.freebsd.org/changeset/base/345008 Log: Fix CRN resets in the isp(4) driver in certain situations. The Command Reference Number (CRN) is part of the FC-Tape features that we enable when talking to tape drives. It starts at 1, and goes to 255 and wraps around to 1. There are a number of reset type conditions that result in the CRN getting reset to 1. These are detailed in section 4.10 (table 8) of the FCP-4r02b specification. One of the conditions is when a PRLI (Process Login) is sent by the initiator, and the Establish Image Pair bit is set in Word 0 of the PRLI. Previously, the isp(4) driver core sent a notification via isp_async() that the target had changed or stayed in place, but there was no indication of whether a PRLI was sent and whether the Establish Image Pair bit was set. The result of this was that in some situations, notably switching back and forth between a direct connection and a switch connection to a tape drive, the isp(4) driver would fail to reset the CRN in situations that require it according to the spec. When the CRN isn't reset in a situation that requires it, the tape drive then rejects every subsequent command that is sent to the drive. It is assuming that the commands are being sent out of order. So, modify the isp(4) driver to include Word 0 of the PRLI command when it sends isp_async() notifications of target changes. Look at the Establish Image Pair bit, and reset the CRN if that bit is set. With this change, I am able to switch a tape drive back and forth between a direct connection and a switch connection, and the isp(4) driver resets the CRN when it should. sys/dev/isp_stds.h: Add bit definitions for PRLI Word 0. sys/dev/ispmbox.h: Add PRLI Word 0 to the port database type, isp_pdb_t. sys/dev/ispvar.h Add PRLI Word 0 to fcportdb_t. sys/dev/isp.c: Populate the new prli_word0 parameter in the port database. In isp_pdb_add_update(), add a check to see if the Establish Image Pair bit is set in PRLI Word 0. If it is, then that is an additional reason to create a change notification. sys/dev/isp_freebsd.c: In isp_async(), if the device changed or stayed, look at PRLI Word 0 to see if the Establish Image Pair bit is set. If it is, reset the CRN if we haven't already. MFC after: 1 week Sponsored by: Spectra Logic Differential Revision: https://reviews.freebsd.org/D19472 Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_stds.h head/sys/dev/isp/ispmbox.h head/sys/dev/isp/ispvar.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Mon Mar 11 13:56:51 2019 (r345007) +++ head/sys/dev/isp/isp.c Mon Mar 11 14:21:14 2019 (r345008) @@ -2791,6 +2791,7 @@ isp_getpdb(ispsoftc_t *isp, int chan, uint16_t id, isp if (IS_24XX(isp)) { isp_get_pdb_24xx(isp, isp->isp_iocb, &un.bill); pdb->handle = un.bill.pdb_handle; + pdb->prli_word0 = un.bill.pdb_prli_svc0; pdb->prli_word3 = un.bill.pdb_prli_svc3; pdb->portid = BITS2WORD_24XX(un.bill.pdb_portid_bits); ISP_MEMCPY(pdb->portname, un.bill.pdb_portname, 8); @@ -2807,6 +2808,7 @@ isp_getpdb(ispsoftc_t *isp, int chan, uint16_t id, isp } else { isp_get_pdb_21xx(isp, isp->isp_iocb, &un.fred); pdb->handle = un.fred.pdb_loopid; + pdb->prli_word0 = un.fred.pdb_prli_svc0; pdb->prli_word3 = un.fred.pdb_prli_svc3; pdb->portid = BITS2WORD(un.fred.pdb_portid_bits); ISP_MEMCPY(pdb->portname, un.fred.pdb_portname, 8); @@ -3196,6 +3198,7 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) lp->state = FC_PORTDB_STATE_VALID; isp_async(isp, ISPASYNC_DEV_CHANGED, chan, lp); lp->portid = lp->new_portid; + lp->prli_word0 = lp->new_prli_word0; lp->prli_word3 = lp->new_prli_word3; break; case FC_PORTDB_STATE_VALID: @@ -3247,7 +3250,8 @@ isp_pdb_add_update(ispsoftc_t *isp, int chan, isp_pdb_ /* Old device, nothing new. */ if (lp->portid == pdb->portid && lp->handle == pdb->handle && - lp->prli_word3 == pdb->prli_word3) { + lp->prli_word3 == pdb->prli_word3 && + ((pdb->prli_word0 & PRLI_WD0_EST_IMAGE_PAIR) == 0)) { if (lp->state != FC_PORTDB_STATE_NEW) lp->state = FC_PORTDB_STATE_VALID; isp_prt(isp, ISP_LOG_SANCFG, @@ -3260,6 +3264,7 @@ isp_pdb_add_update(ispsoftc_t *isp, int chan, isp_pdb_ lp->state = FC_PORTDB_STATE_CHANGED; lp->handle = pdb->handle; lp->new_portid = pdb->portid; + lp->new_prli_word0 = pdb->prli_word0; lp->new_prli_word3 = pdb->prli_word3; isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Port 0x%06x@0x%04x is changed", Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Mon Mar 11 13:56:51 2019 (r345007) +++ head/sys/dev/isp/isp_freebsd.c Mon Mar 11 14:21:14 2019 (r345008) @@ -3742,6 +3742,10 @@ isp_async(ispsoftc_t *isp, ispasync_t cmd, ...) break; case ISPASYNC_DEV_CHANGED: case ISPASYNC_DEV_STAYED: + { + int crn_reset_done; + + crn_reset_done = 0; va_start(ap, cmd); bus = va_arg(ap, int); lp = va_arg(ap, fcportdb_t *); @@ -3759,13 +3763,17 @@ isp_async(ispsoftc_t *isp, ispasync_t cmd, ...) (lp->new_prli_word3 & PRLI_WD3_TARGET_FUNCTION))) { lp->is_target = !lp->is_target; if (lp->is_target) { - if (cmd == ISPASYNC_DEV_CHANGED) + if (cmd == ISPASYNC_DEV_CHANGED) { isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1); + crn_reset_done = 1; + } isp_make_here(isp, lp, bus, tgt); } else { isp_make_gone(isp, lp, bus, tgt); - if (cmd == ISPASYNC_DEV_CHANGED) + if (cmd == ISPASYNC_DEV_CHANGED) { isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1); + crn_reset_done = 1; + } } } if (lp->is_initiator != @@ -3780,7 +3788,13 @@ isp_async(ispsoftc_t *isp, ispasync_t cmd, ...) adc->arrived = lp->is_initiator; xpt_async(AC_CONTRACT, fc->path, &ac); } + + if ((lp->new_prli_word0 & PRLI_WD0_EST_IMAGE_PAIR) && + (crn_reset_done == 0)) + isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1); + break; + } case ISPASYNC_DEV_GONE: va_start(ap, cmd); bus = va_arg(ap, int); Modified: head/sys/dev/isp/isp_stds.h ============================================================================== --- head/sys/dev/isp/isp_stds.h Mon Mar 11 13:56:51 2019 (r345007) +++ head/sys/dev/isp/isp_stds.h Mon Mar 11 14:21:14 2019 (r345008) @@ -284,6 +284,14 @@ typedef struct { #define RNC 0x53 /* + * PRLI Word 0 definitions + * FPC4-r02b January, 2011 + */ +#define PRLI_WD0_TYPE_MASK 0xff000000 +#define PRLI_WD0_TC_EXT_MASK 0x00ff0000 +#define PRLI_WD0_EST_IMAGE_PAIR (1 << 13) + +/* * PRLI Word 3 definitions * FPC4-r02b January, 2011 */ Modified: head/sys/dev/isp/ispmbox.h ============================================================================== --- head/sys/dev/isp/ispmbox.h Mon Mar 11 13:56:51 2019 (r345007) +++ head/sys/dev/isp/ispmbox.h Mon Mar 11 14:21:14 2019 (r345008) @@ -1384,6 +1384,7 @@ typedef struct { */ typedef struct { uint16_t handle; + uint16_t prli_word0; uint16_t prli_word3; uint32_t : 8, portid : 24; Modified: head/sys/dev/isp/ispvar.h ============================================================================== --- head/sys/dev/isp/ispvar.h Mon Mar 11 13:56:51 2019 (r345007) +++ head/sys/dev/isp/ispvar.h Mon Mar 11 14:21:14 2019 (r345008) @@ -381,6 +381,9 @@ typedef struct { uint16_t handle; /* + * PRLI word 0 contains the Establish Image Pair bit, which is + * important for knowing when to reset the CRN. + * * PRLI word 3 parameters contains role as well as other things. * * The state is the current state of this entry. @@ -392,7 +395,9 @@ typedef struct { * Portid is obvious, as are node && port WWNs. The new_role and * new_portid is for when we are pending a change. */ + uint16_t prli_word0; /* PRLI parameters */ uint16_t prli_word3; /* PRLI parameters */ + uint16_t new_prli_word0; /* Incoming new PRLI parameters */ uint16_t new_prli_word3; /* Incoming new PRLI parameters */ uint16_t : 12, probational : 1, From owner-svn-src-all@freebsd.org Mon Mar 11 14:26:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A1B71544C27; Mon, 11 Mar 2019 14:26:46 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F0E76850D; Mon, 11 Mar 2019 14:26:46 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 205E3C12F; Mon, 11 Mar 2019 14:26:46 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BEQkXG004385; Mon, 11 Mar 2019 14:26:46 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BEQkgQ004384; Mon, 11 Mar 2019 14:26:46 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201903111426.x2BEQkgQ004384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Mon, 11 Mar 2019 14:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345009 - head/sys/dev/pms/RefTisa/tisa/sassata/sas/ini X-SVN-Group: head X-SVN-Commit-Author: dab X-SVN-Commit-Paths: head/sys/dev/pms/RefTisa/tisa/sassata/sas/ini X-SVN-Commit-Revision: 345009 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2F0E76850D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 14:26:46 -0000 Author: dab Date: Mon Mar 11 14:26:45 2019 New Revision: 345009 URL: https://svnweb.freebsd.org/changeset/base/345009 Log: Fix a scribbler in the PMS driver. The ESGL bit was left uninitialized when executing the REPORT LUNS ioctl. This could allow a zeroed data buffer to be treated as a scatter/gather list. The firmware would eventually walk past the end of the data buffer, potentially find what looked like a valid address/length pair, and write the result to semi-random memory. Obtained from: Dell EMC Isilon MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D19398 Modified: head/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Modified: head/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c ============================================================================== --- head/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Mon Mar 11 14:21:14 2019 (r345008) +++ head/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Mon Mar 11 14:26:45 2019 (r345009) @@ -1874,7 +1874,9 @@ tiNumOfLunIOCTLreq( agSSPFrame->dataLength = REPORT_LUN_LEN; agSSPFrame->agSgl.len = sizeof(agsaSSPCmdInfoUnit_t); - + agSSPFrame->agSgl.extReserved = 0; + CLEAR_ESGL_EXTEND(agSSPFrame->agSgl.extReserved); + status = saSSPStart(agRoot, agIORequest, 0, agDevHandle, agRequestType,agSASRequestBody,agNULL, &ossaSSPIoctlCompleted); if(status != AGSA_RC_SUCCESS) From owner-svn-src-all@freebsd.org Mon Mar 11 14:28:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 931061544CED; Mon, 11 Mar 2019 14:28:51 +0000 (UTC) (envelope-from dab0816@gmail.com) Received: from mail-it1-x142.google.com (mail-it1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2102469A62; Mon, 11 Mar 2019 14:28:51 +0000 (UTC) (envelope-from dab0816@gmail.com) Received: by mail-it1-x142.google.com with SMTP id 188so7569566itb.0; Mon, 11 Mar 2019 07:28:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=dKtal6AWTOtXfKqEbgey8zmgjrZN/GWsGMMHrZwLQSE=; b=lINKwqlJxZ4d94m9cB3bEDXZm27MBsc8n2uxlVmYmYsqOjGgyF9LzRHq0u9xucUvFh hEP943G54TkhTxELZElZFLqaDgAqIGQQEphv9pNSA9Vg2ZlG+kJZZ6zFb4IXSIn7okAX q/gMi735OiYlLmrdwxpnXccAWETMJ78BiuJC3aTc1vWFjSSY7DwrHx5G0nTuP2B9+M5/ TvRylN7bes1Uyl6zKOC1fMLQpRcmdvSbf0pVw0x9fDBizdCBnXQrtq9aMOUvuLSeup4V f6HDyBORePicFIPVEKx4PjKzQYbTwJNCdNPWi+vjdh56+GXks2D+QlbxoRiso58xTAlq A6yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=dKtal6AWTOtXfKqEbgey8zmgjrZN/GWsGMMHrZwLQSE=; b=CJiq/xSDHu1uqSW50HIFdnmlBVybdW7Et1+A6LgAWiqt0uNLdCudRQ4OnpmqgXr5OQ N/2IsFr0aBPiP8rwEI0ZMaaEA/K01SSrJ6COScsBHY5SB3ktg4E28FhxbF7hjkcps9yB h7kXqki8P+1cRgv0sJLNNevoHcLnffVz/pxuUrCiFs+LpUT7L51aI6wY9GLC5DofLtfq g9IdOrjN4VOZJCgugUjTfBJLqWUfRCSi7YMy0oTfJbSDqSHJBPLzwtHKqM1a4K09pgVB n/p3XX9Km4CZ7t859OeH4qfC8aA+0LM/qKljG6UwEjvWQFe5q300qfVaMEaB7ee9ZIzt llPQ== X-Gm-Message-State: APjAAAXV+DdPiQJmOr+qFvwQcmwT8hfGIVrlH0Kx/E+oeXDAvGvuC+p3 0QTvk31nOsYA3KGHFBkGYHSSJqKM X-Google-Smtp-Source: APXvYqzxY6ygyzlLOxd5FQoIZ8dxDioHk5NZ1OD6TYm5hs3KZhiNHMG2018nfet2R+ytnSk2m1S1IA== X-Received: by 2002:a02:8349:: with SMTP id w9mr2643170jag.12.1552314529892; Mon, 11 Mar 2019 07:28:49 -0700 (PDT) Received: from ?IPv6:2601:442:4580:3ee3:49ae:8faf:b58c:3edc? ([2601:442:4580:3ee3:49ae:8faf:b58c:3edc]) by smtp.gmail.com with ESMTPSA id b202sm8223807itb.36.2019.03.11.07.28.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Mar 2019 07:28:49 -0700 (PDT) Sender: David Bright From: David Bright X-Google-Original-From: David Bright Message-Id: Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: svn commit: r345009 - head/sys/dev/pms/RefTisa/tisa/sassata/sas/ini Date: Mon, 11 Mar 2019 09:28:48 -0500 In-Reply-To: <201903111426.x2BEQkgQ004384@repo.freebsd.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: David A Bright References: <201903111426.x2BEQkgQ004384@repo.freebsd.org> X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: 2102469A62 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.978,0] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 14:28:51 -0000 On Mar 11, 2019, at 9:26 AM, David Bright wrote: > > Author: dab > Date: Mon Mar 11 14:26:45 2019 > New Revision: 345009 > URL: https://svnweb.freebsd.org/changeset/base/345009 > > Log: > Fix a scribbler in the PMS driver. Oops. Reviewed by: Anton Rang >, imp@ -- David Bright dab@FreeBSD.org From owner-svn-src-all@freebsd.org Mon Mar 11 14:29:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 723A91544D55; Mon, 11 Mar 2019 14:29:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CB10169B98; Mon, 11 Mar 2019 14:29:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BAE11C136; Mon, 11 Mar 2019 14:29:50 +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 x2BETooD004546; Mon, 11 Mar 2019 14:29:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BEToX6004545; Mon, 11 Mar 2019 14:29:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903111429.x2BEToX6004545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 11 Mar 2019 14:29:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345010 - head/sys/dev/mlx4/mlx4_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx4/mlx4_core X-SVN-Commit-Revision: 345010 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CB10169B98 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 14:29:51 -0000 Author: hselasky Date: Mon Mar 11 14:29:50 2019 New Revision: 345010 URL: https://svnweb.freebsd.org/changeset/base/345010 Log: Improve support for switching to and from command polling mode in mlx4core. Make sure the enter and leave polling routines can be called multiple times with same setting. Ignore setting polling or event mode twice. This fixes a deadlock during shutdown if polling mode was already selected. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/mlx4_core/mlx4_cmd.c Modified: head/sys/dev/mlx4/mlx4_core/mlx4_cmd.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_cmd.c Mon Mar 11 14:26:45 2019 (r345009) +++ head/sys/dev/mlx4/mlx4_core/mlx4_cmd.c Mon Mar 11 14:29:50 2019 (r345010) @@ -2490,6 +2490,7 @@ int mlx4_cmd_init(struct mlx4_dev *dev) init_rwsem(&priv->cmd.switch_sem); mutex_init(&priv->cmd.slave_cmd_mutex); sema_init(&priv->cmd.poll_sem, 1); + sema_init(&priv->cmd.event_sem, 0); priv->cmd.use_events = 0; priv->cmd.toggle = 1; priv->cmd.initialized = 1; @@ -2617,8 +2618,10 @@ int mlx4_cmd_use_events(struct mlx4_dev *dev) { struct mlx4_priv *priv = mlx4_priv(dev); int i; - int err = 0; + if (priv->cmd.use_events != 0) + return 0; + priv->cmd.context = kmalloc(priv->cmd.max_cmds * sizeof (struct mlx4_cmd_context), GFP_KERNEL); @@ -2639,7 +2642,8 @@ int mlx4_cmd_use_events(struct mlx4_dev *dev) priv->cmd.context[priv->cmd.max_cmds - 1].next = -1; priv->cmd.free_head = 0; - sema_init(&priv->cmd.event_sem, priv->cmd.max_cmds); + for (i = 0; i != priv->cmd.max_cmds; i++) + up(&priv->cmd.event_sem); for (priv->cmd.token_mask = 1; priv->cmd.token_mask < priv->cmd.max_cmds; @@ -2651,7 +2655,7 @@ int mlx4_cmd_use_events(struct mlx4_dev *dev) priv->cmd.use_events = 1; up_write(&priv->cmd.switch_sem); - return err; + return 0; } /* @@ -2662,6 +2666,9 @@ void mlx4_cmd_use_polling(struct mlx4_dev *dev) struct mlx4_priv *priv = mlx4_priv(dev); int i; + if (priv->cmd.use_events == 0) + return; + down_write(&priv->cmd.switch_sem); priv->cmd.use_events = 0; @@ -2669,6 +2676,7 @@ void mlx4_cmd_use_polling(struct mlx4_dev *dev) down(&priv->cmd.event_sem); kfree(priv->cmd.context); + priv->cmd.context = NULL; up(&priv->cmd.poll_sem); up_write(&priv->cmd.switch_sem); @@ -2740,11 +2748,11 @@ void mlx4_cmd_wake_completions(struct mlx4_dev *dev) int i; spin_lock(&priv->cmd.context_lock); - if (priv->cmd.context) { + if (priv->cmd.context != NULL) { for (i = 0; i < priv->cmd.max_cmds; ++i) { context = &priv->cmd.context[i]; context->fw_status = CMD_STAT_INTERNAL_ERR; - context->result = + context->result = mlx4_status_to_errno(CMD_STAT_INTERNAL_ERR); complete(&context->done); } From owner-svn-src-all@freebsd.org Mon Mar 11 14:34:26 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D93A815450AC; Mon, 11 Mar 2019 14:34:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 74B056A1E7; Mon, 11 Mar 2019 14:34:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 626CCC2DA; Mon, 11 Mar 2019 14:34:26 +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 x2BEYQPP009295; Mon, 11 Mar 2019 14:34:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BEYQeq009294; Mon, 11 Mar 2019 14:34:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903111434.x2BEYQeq009294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 11 Mar 2019 14:34:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345011 - head/sys/dev/mlx4/mlx4_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx4/mlx4_core X-SVN-Commit-Revision: 345011 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 74B056A1E7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 14:34:27 -0000 Author: hselasky Date: Mon Mar 11 14:34:25 2019 New Revision: 345011 URL: https://svnweb.freebsd.org/changeset/base/345011 Log: Eliminate useless warning message when reading sysctl node in mlx4core. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/mlx4_core/mlx4_main.c Modified: head/sys/dev/mlx4/mlx4_core/mlx4_main.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_main.c Mon Mar 11 14:29:50 2019 (r345010) +++ head/sys/dev/mlx4/mlx4_core/mlx4_main.c Mon Mar 11 14:34:25 2019 (r345011) @@ -1236,9 +1236,6 @@ static ssize_t show_port_ib_mtu(struct device *dev, port_mtu_attr); struct mlx4_dev *mdev = info->dev; - if (mdev->caps.port_type[info->port] == MLX4_PORT_TYPE_ETH) - mlx4_warn(mdev, "port level mtu is only used for IB ports\n"); - sprintf(buf, "%d\n", ibta_mtu_to_int(mdev->caps.port_ib_mtu[info->port])); return strlen(buf); From owner-svn-src-all@freebsd.org Mon Mar 11 15:06:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B0DA1545AB6; Mon, 11 Mar 2019 15:06:40 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DAF556B232; Mon, 11 Mar 2019 15:06:39 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id C965C103A4; Mon, 11 Mar 2019 15:06:39 +0000 (UTC) Date: Mon, 11 Mar 2019 15:06:39 +0000 From: Alexey Dokuchaev To: Peter Jeremy Cc: Warner Losh , src-committers , svn-src-all , "Rodney W. Grimes" , svn-src-head , Warner Losh Subject: Re: svn commit: r344970 - head Message-ID: <20190311150639.GA1242@FreeBSD.org> References: <201903091717.x29HHjcc069618@repo.freebsd.org> <201903092000.x29K0Rf6002120@gndrsh.dnsmgr.net> <20190310150728.GA97029@FreeBSD.org> <20190311081644.GA87064@server.rulingia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190311081644.GA87064@server.rulingia.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: DAF556B232 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.985,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 15:06:40 -0000 On Mon, Mar 11, 2019 at 07:16:44PM +1100, Peter Jeremy wrote: > ... > I think the changed wording implies that we no longer provide compatibity > with unsupported branches. I agree that we might in future decide to > remove COMPAT_FREEBSDx for unsupported x but until then, I'd prefer > wording along the lines of: > > "A GENERIC kernel will include suitable compatibility options to run > binaries from older branches. Note that the ability to run binaries > from unsupported branches is not guaranteed." I agree, this sounds much better: it acknowledges that some users might want to run 4.x binaries, and while we cannot guarantee it, we'd still try to provide/preserve this feature if we can. ./danfe From owner-svn-src-all@freebsd.org Mon Mar 11 15:36:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71BF01517B5A; Mon, 11 Mar 2019 15:36:25 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 111A86C496; Mon, 11 Mar 2019 15:36:25 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 01D9CCCF6; Mon, 11 Mar 2019 15:36:25 +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 x2BFaOCS040840; Mon, 11 Mar 2019 15:36:24 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BFaOq1040839; Mon, 11 Mar 2019 15:36:24 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201903111536.x2BFaOq1040839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 11 Mar 2019 15:36:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345012 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 345012 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 111A86C496 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 15:36:25 -0000 Author: gjb Date: Mon Mar 11 15:36:24 2019 New Revision: 345012 URL: https://svnweb.freebsd.org/changeset/base/345012 Log: Update the re@ member list. Sponsored by: The FreeBSD Foundation Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Mon Mar 11 14:34:25 2019 (r345011) +++ head/share/misc/organization.dot Mon Mar 11 15:36:24 2019 (r345012) @@ -32,7 +32,7 @@ doceng [label="Documentation Engineering Team\ndoceng@ portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] portmgr [label="Port Management Team\nportmgr@FreeBSD.org\nadamw, antoine, bapt, bdrewery\nfeld, mat, rene, swills"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\nrene"] -re [label="Primary Release Engineering Team\nre@FreeBSD.org\ngjb, kib,\nbdrewery, blackend,\nrgrimes, delphij,\nhrs, glebius,\nmarius, rwatson"] +re [label="Primary Release Engineering Team\nre@FreeBSD.org\ngjb, kib,\nbdrewery, blackend,\nrgrimes, delphij,\nhrs, glebius,\nmarius"] secteam [label="Security Team\nsecteam@FreeBSD.org\nbenno, delphij,\ndes, emaste,\ngjb, gordon,\nremko"] portssecteam [label="Ports Security Team\nports-secteam@FreeBSD.org\ndelphij, amdmi3, eadler, feld, jgh, rea, riggs, sbz, simon, swills, zi"] secteamsecretary [label="Security Team Secretary\nsecteam-secretary@FreeBSD.org\nremko"] From owner-svn-src-all@freebsd.org Mon Mar 11 15:45:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E060D1517FEA; Mon, 11 Mar 2019 15:45:52 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 0CB536CB8E; Mon, 11 Mar 2019 15:45:51 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2BFjkNf010152; Mon, 11 Mar 2019 08:45:46 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2BFjk5s010151; Mon, 11 Mar 2019 08:45:46 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903111545.x2BFjk5s010151@ gndrsh.dnsmgr.net> Subject: Re: svn commit: r344990 - in head: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn sys/... In-Reply-To: To: Warner Losh Date: Mon, 11 Mar 2019 08:45:46 -0700 (PDT) CC: "Rodney W. Grimes" , Andriy Voskoboinyk , src-committers , svn-src-all , svn-src-head 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-Rspamd-Queue-Id: 0CB536CB8E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.989,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 15:45:53 -0000 > On Sun, Mar 10, 2019 at 8:12 PM Rodney W. Grimes > wrote: > > > > Author: avos > > > Date: Mon Mar 11 01:27:01 2019 > > > New Revision: 344990 > > > URL: https://svnweb.freebsd.org/changeset/base/344990 > > > > > > Log: > > > Fix ieee80211_radiotap(9) usage in wireless drivers: > > > > > > - Alignment issues: > > > * Add missing __packed attributes + padding across all drivers; in > > > most places there was an assumption that padding will be always > > > minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) - > > > padding was just missing. > > > * Add __aligned(8) attribute for all Rx radiotap headers since they > > can > > > contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, > > so > > > just drop the attribute here. Refresh ieee80211_radiotap(9) man page > > > accordingly. > > > > > > - Since net80211 automatically updates channel frequency / flags in > > > ieee80211_radiotap_chan_change() drop duplicate setup for these fields > > > in drivers. > > > > > > Tested with Netgear WG111 v3 (urtw(4)), STA mode. > > > > > > MFC after: 2 weeks > > > > Isnt this going to seriously break module load compatibility > > due to struct size and alignment changes if you merge this to stable/12? > > > > It looks like all these changes are within the modules, not in the KBI... > It looks like this will make things work better on architectures that don't > like unaligned accesses. It seems like modules that aren't updated don't > work today on those architectures... Thank you for clarifying that; > Warner > > > Modified: > > > head/share/man/man9/ieee80211_radiotap.9 > > > head/sys/dev/ath/if_athioctl.h > > > head/sys/dev/bwi/if_bwi.c > > > head/sys/dev/bwi/if_bwivar.h > > > head/sys/dev/bwn/if_bwn.c > > > head/sys/dev/bwn/if_bwnvar.h > > ... > > -- > > Rod Grimes > > rgrimes@freebsd.org -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Mar 11 15:47:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC62D152417E; Mon, 11 Mar 2019 15:47:27 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6E3916CD8A; Mon, 11 Mar 2019 15:47:27 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BCF6ECEAB; Mon, 11 Mar 2019 15:47:26 +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 x2BFlQtG046025; Mon, 11 Mar 2019 15:47:26 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BFlQNb046024; Mon, 11 Mar 2019 15:47:26 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201903111547.x2BFlQNb046024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 11 Mar 2019 15:47:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345013 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 345013 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6E3916CD8A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 15:47:28 -0000 Author: gjb Date: Mon Mar 11 15:47:26 2019 New Revision: 345013 URL: https://svnweb.freebsd.org/changeset/base/345013 Log: Update entries for accounts@, backups@, dnsadm@, mirror-admin@, and remove refadm@. Sponsored by: The FreeBSD Foundation Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Mon Mar 11 15:36:24 2019 (r345012) +++ head/share/misc/organization.dot Mon Mar 11 15:47:26 2019 (r345013) @@ -41,15 +41,14 @@ srccommitters [label="Src Committers\nsrc-committers@F # Admin teams go here alphabetically sorted -accounts [label="Accounts Team\naccounts@FreeBSD.org\nmarkm, simon, kensmith,\ndhw"] -backups [label="Backup Administrators\nbackups@FreeBSD.org\nsimon, kensmith,\ndhw"] +accounts [label="Accounts Team\naccounts@FreeBSD.org\nclusteradm"] +backups [label="Backup Administrators\nbackups@FreeBSD.org\nclusteradm"] bugmeister [label="Bugmeister Team\nbugmeister@FreeBSD.org\neadler, gavin, gonzo"] clusteradm [label="Cluster Administrators\nclusteradm@FreeBSD.org\nallanjude, brd,\ndhw, gavin,\ngjb, peter,\nsbruno, simon,\nzi"] -dnsadm [label="DNS Administrators\ndnsadm@FreeBSD.org\nbillf, dg, ps,\nkensmith, peter"] -mirroradmin [label="FTP/WWW Mirror Site Coordinators\nmirror-admin@FreeBSD.org\nkuriyama, kensmith"] +dnsadm [label="DNS Administrators\ndnsadm@FreeBSD.org\nclusteradm"] +mirroradmin [label="FTP/WWW Mirror Site Coordinators\nmirror-admin@FreeBSD.org\nclusteradm,\nkuriyama"] perforceadmin [label="Perforce Repository Administrators\nperforce-admin@FreeBSD.org\nscottl, kensmith, gordon,\nrwatson, peter, dhw"] postmaster [label="Postmaster Team\npostmaster@FreeBSD.org\ndhw, krion, ler, philip, pi, rea, remko, zi"] -refadm [label="Reference Systems Administrators\nrefadm@FreeBSD.org\njake, billf, markm, simon,\nobrien, ps, kensmith,\npeter, dhw"] webmaster [label="Webmaster Team\nwebmaster@FreeBSD.org\ngjb, wblock, blackend,\ngabor, hrs, wosch"] # Misc hats go here alphabetically sorted @@ -69,7 +68,6 @@ _admin -> clusteradm _admin -> dnsadm _admin -> mirroradmin _admin -> perforceadmin -_admin -> refadm _admin -> postmaster _admin -> webmaster From owner-svn-src-all@freebsd.org Mon Mar 11 16:18:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F9E1152505A; Mon, 11 Mar 2019 16:18:10 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 6E6ED6E15F; Mon, 11 Mar 2019 16:18:09 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2BGI5fh010297; Mon, 11 Mar 2019 09:18:05 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2BGI5vm010296; Mon, 11 Mar 2019 09:18:05 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903111618.x2BGI5vm010296@ gndrsh.dnsmgr.net> Subject: Re: svn commit: r344990 - in head: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn sys/... In-Reply-To: To: Andriy Voskoboinyk Date: Mon, 11 Mar 2019 09:18:05 -0700 (PDT) CC: "Rodney W. Grimes" , src-committers , svn-src-all , svn-src-head , Warner Losh 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-Rspamd-Queue-Id: 6E6ED6E15F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.963,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 16:18:10 -0000 > > On Sun, Mar 10, 2019 at 8:12 PM Rodney W. Grimes > > wrote: > >>> Author: avos > >> > >>> Date: Mon Mar 11 01:27:01 2019 > >> > >>> New Revision: 344990 > >> > >>> URL: https://svnweb.freebsd.org/changeset/base/344990 > >> > >>> > >> > >>> Log: > >> > >>> Fix ieee80211_radiotap(9) usage in wireless drivers: > >> > >>> > >> > >>> - Alignment issues: > >> > >>> * Add missing __packed attributes + padding across all drivers; in > >>> most places there was an assumption that padding will be always > >>> minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) - > >>> padding was just missing. > >>> * Add __aligned(8) attribute for all Rx radiotap headers since they > >>> can > >>> contain 64-bit TSF timestamp; it cannot appear in Tx radiotap > >>> headers, so > >>> just drop the attribute here. Refresh ieee80211_radiotap(9) man page > >>> accordingly. > >>> > >>> - Since net80211 automatically updates channel frequency / flags in > >>> ieee80211_radiotap_chan_change() drop duplicate setup for these > >>> fields > >>> in drivers. > >>> > >>> Tested with Netgear WG111 v3 (urtw(4)), STA mode. > >>> > >>> MFC after: 2 weeks > >> > >> Isnt this going to seriously break module load compatibility > >> due to struct size and alignment changes if you merge this to stable/12? > > > > It looks like all these changes are within the modules, not in the > > KBI... It looks like this will make things work >better on architectures > > that don't like unaligned accesses. It seems like modules that aren't > > updated don't work today >on those architectures... > > Yes, only drivers are touched - updated structures and > driver's softc (where they are stored) are not exposed > to other modules, so there is no need to keep size / > offsets for structure members + the commit removes > unaligned access, so urtw(4) (for example) will not work > without this change on architectures, where unaligned > access is prohibited. Thanks for the comfirmation. > > Warner > >>> Modified: > >>> head/share/man/man9/ieee80211_radiotap.9 > >>> head/sys/dev/ath/if_athioctl.h > >>> head/sys/dev/bwi/if_bwi.c > >>> head/sys/dev/bwi/if_bwivar.h > >>> head/sys/dev/bwn/if_bwn.c > >>> head/sys/dev/bwn/if_bwnvar.h > >> ... > >> -- > >> Rod Grimes > >> rgrimes@freebsd.org -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Mar 11 16:38:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7CF315259D0; Mon, 11 Mar 2019 16:38:14 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8734D6EEA9; Mon, 11 Mar 2019 16:38:14 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.15] (c-71-198-162-232.hsd1.ca.comcast.net [71.198.162.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id D16B115EB1; Mon, 11 Mar 2019 16:38:13 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/10.16.1.190220 Date: Mon, 11 Mar 2019 09:38:11 -0700 Subject: Re: svn commit: r344982 - head/sys/x86/isa From: Ravi Pokala To: Vladimir Kondratyev , , , Message-ID: <00F61A40-C128-4F75-A45F-A6CECBB791C2@panasas.com> Thread-Topic: svn commit: r344982 - head/sys/x86/isa References: <201903102019.x2AKJiJY029807@repo.freebsd.org> In-Reply-To: <201903102019.x2AKJiJY029807@repo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-Rspamd-Queue-Id: 8734D6EEA9 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.983,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 16:38:15 -0000 -----Original Message----- From: on behalf of Vladimir Kondratyev Date: 2019-03-10, Sunday at 13:19 To: , , Subject: svn commit: r344982 - head/sys/x86/isa > Author: wulf > Date: Sun Mar 10 20:19:43 2019 > New Revision: 344982 > URL: https://svnweb.freebsd.org/changeset/base/344982 > > Log: > atrtc(4): install ACPI RTC/CMOS operation region handler Hi Vladimir, This appears to have broken all the various LINT kernels for amd64 and i386: ================================================================ /usr/home/rpokala/freebsd/clean/base/head/sys/x86/isa/atrtc.c:321:2: error: use of undeclared identifier '_AcpiModuleName' ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ^ /usr/home/rpokala/freebsd/clean/base/head/sys/contrib/dev/acpica/include/acoutput.h:480:18: note: expanded from macro 'ACPI_FUNCTION_TRACE' AcpiUtTrace (ACPI_DEBUG_PARAMETERS) ^ /usr/home/rpokala/freebsd/clean/base/head/sys/contrib/dev/acpica/include/acoutput.h:402:39: note: expanded from macro 'ACPI_DEBUG_PARAMETERS' __LINE__, ACPI_GET_FUNCTION_NAME, _AcpiModuleName, _COMPONENT ^ /usr/home/rpokala/freebsd/clean/base/head/sys/x86/isa/atrtc.c:321:2: error: use of undeclared identifier '_COMPONENT' /usr/home/rpokala/freebsd/clean/base/head/sys/contrib/dev/acpica/include/acoutput.h:480:18: note: expanded from macro 'ACPI_FUNCTION_TRACE' AcpiUtTrace (ACPI_DEBUG_PARAMETERS) ^ /usr/home/rpokala/freebsd/clean/base/head/sys/contrib/dev/acpica/include/acoutput.h:402:56: note: expanded from macro 'ACPI_DEBUG_PARAMETERS' __LINE__, ACPI_GET_FUNCTION_NAME, _AcpiModuleName, _COMPONENT ^ ================================================================ That same pattern of errors is noted for lines 321, 362, and 386. Please take a look at your earliest convenience. Thanks, Ravi (rpokala@) From owner-svn-src-all@freebsd.org Mon Mar 11 17:02:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70B3F15264FC; Mon, 11 Mar 2019 17:02:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 10B7170251; Mon, 11 Mar 2019 17:02:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 0D6CB161F6; Mon, 11 Mar 2019 17:02:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r344960 - head/sys/powerpc/powerpc To: Justin Hibbits , Alexey Dokuchaev Cc: Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201903090318.x293IcLc023548@repo.freebsd.org> <20190309085058.GA60945@FreeBSD.org> <20190310171640.31bb9c54@titan.knownspace> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <7e2e2cca-ae57-4ab4-6144-54cd196dce70@FreeBSD.org> Date: Mon, 11 Mar 2019 10:02:00 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: <20190310171640.31bb9c54@titan.knownspace> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 10B7170251 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.983,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 17:02:04 -0000 On 3/10/19 3:16 PM, Justin Hibbits wrote: > On Sat, 9 Mar 2019 08:50:58 +0000 > Alexey Dokuchaev wrote: > >> On Sat, Mar 09, 2019 at 03:18:38AM +0000, Justin Hibbits wrote: >>> New Revision: 344960 >>> URL: https://svnweb.freebsd.org/changeset/base/344960 >>> >>> Log: >>> powerpc: Print trap frame address for fatal traps >>> >>> MFC after: 1 week >>> >>> Modified: >>> head/sys/powerpc/powerpc/trap.c >>> >>> Modified: head/sys/powerpc/powerpc/trap.c >>> ============================================================================== >>> --- head/sys/powerpc/powerpc/trap.c Sat Mar 9 03:15:09 >>> 2019 (r344959) +++ head/sys/powerpc/powerpc/trap.c >>> Sat Mar 9 03:18:37 2019 (r344960) @@ -546,6 +546,7 @@ >>> printtrap(u_int vector, struct trapframe *frame, int i printf(" >>> current msr = 0x%" PRIxPTR "\n", mfmsr()); printf(" >>> lr = 0x%" PRIxPTR " (0x%" PRIxPTR ")\n", frame->lr, >>> frame->lr - (register_t)(__startkernel - KERNBASE)); >>> + printf(" frame = %p\n", frame); >>> printf(" curthread = %p\n", curthread); >> >> Some of those are printed with %PRIxPTR, some with %p. Perhaps this >> inconsistency can be avoided? >> >> ./danfe > > PRIxPTR is for printing a pointer-like value that's not a pointer. The > other values printed are of type register_t, not void *. Normally in FreeBSD sources we cast it to void * and use %p rather than the PRI* macros FWIW. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Mar 11 17:04:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A3A9152664B; Mon, 11 Mar 2019 17:04:12 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-it1-x12c.google.com (mail-it1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 16B927053A; Mon, 11 Mar 2019 17:04:12 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-it1-x12c.google.com with SMTP id m137so8459949ita.0; Mon, 11 Mar 2019 10:04:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mFhZKJiJXEZYaXfvlCgpXeRcjZZrkb7EBj1Qe7kuur4=; b=ZlxLn8zwvolREQimCIRUIfbUstyJxObJ2TCu2LFzISipaLh5iFiC98hS3V8afIbP8X KGGWqW1o3iLEYQfZ7ipKd3S38RggLXm2KZhdMz/vKbhppBY6TfvGA7wFLrWo9Qgr5iVq EPdPhePcwWHCpIRwU8CYOsqRspTtuAhnnYm1YZS47FPGRhMA4OzheIZO5ST0r4IOrTXy Kt/yMmnn7YY7AgJ1kFHHNET5GeZx6Bw+GIzgVSlNLNzJEGaEeG6rGMrhisDqpa1kHPmg QyG6e5uvPD9PHiLbEOt8ecPINHfSnWD5Lo2IpBoU/tcmDVbYrSc6f/YAt7PJ4lxQmweM +VhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mFhZKJiJXEZYaXfvlCgpXeRcjZZrkb7EBj1Qe7kuur4=; b=ke45jGijmOrfsodWrCNDmZGvLx081MhOhty/0O2SVDF29bhlk+PThJHJoDxPv58a+X 56A0f7C7zWOkWWnceaFMsRvU+nS4cPCoFNz+foka+G3eKxAGjLeHz0vIZgUIXD8u+y/d N4Lt0g8V3FS3xDlWn7a/vcKjhn0OqreWPTrhz8dCCDKtikhP/ksKnN6nrHVnUmk3COM0 q/UEbLwrgnJXMQfut7lFOVQCfboy1qwRg3sngHrVxV9UzSNV7pxNfw/gz4WaAAz/BJ13 eO9Djs189a6L/SoeK4zWay4YOWaoHGaqh0p18QeS/jpQ2HuB16f3g0CquTJmDZ2q7Vl+ QebQ== X-Gm-Message-State: APjAAAX8g7Kqh4gKBgThEPEoR/aqCG8Y4vLOyFmYOFCfN3TQo2v09xt1 O3iNlV6mueWUuo8uoOLWMx4Lq4GIQIU= X-Google-Smtp-Source: APXvYqxgk9MmWem3EgSV3rxPrhjCsOvjfco3tvkzCjnTEbOzr5qsWsIbht/InwFyeHsNfuCEFVcudg== X-Received: by 2002:a02:4f1c:: with SMTP id c28mr18301894jab.112.1552323850790; Mon, 11 Mar 2019 10:04:10 -0700 (PDT) Received: from titan.knownspace (173-25-245-129.client.mchsi.com. [173.25.245.129]) by smtp.gmail.com with ESMTPSA id k9sm2472296iob.2.2019.03.11.10.04.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Mar 2019 10:04:10 -0700 (PDT) Date: Mon, 11 Mar 2019 12:04:06 -0500 From: Justin Hibbits To: John Baldwin Cc: Alexey Dokuchaev , Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r344960 - head/sys/powerpc/powerpc Message-ID: <20190311120406.58a21e1e@titan.knownspace> In-Reply-To: <7e2e2cca-ae57-4ab4-6144-54cd196dce70@FreeBSD.org> References: <201903090318.x293IcLc023548@repo.freebsd.org> <20190309085058.GA60945@FreeBSD.org> <20190310171640.31bb9c54@titan.knownspace> <7e2e2cca-ae57-4ab4-6144-54cd196dce70@FreeBSD.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; powerpc64-portbld-freebsd13.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 16B927053A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.987,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 17:04:12 -0000 On Mon, 11 Mar 2019 10:02:00 -0700 John Baldwin wrote: > On 3/10/19 3:16 PM, Justin Hibbits wrote: > > On Sat, 9 Mar 2019 08:50:58 +0000 > > Alexey Dokuchaev wrote: > > > >> On Sat, Mar 09, 2019 at 03:18:38AM +0000, Justin Hibbits wrote: > >>> New Revision: 344960 > >>> URL: https://svnweb.freebsd.org/changeset/base/344960 > >>> > >>> Log: > >>> powerpc: Print trap frame address for fatal traps > >>> > >>> MFC after: 1 week > >>> > >>> Modified: > >>> head/sys/powerpc/powerpc/trap.c > >>> > >>> Modified: head/sys/powerpc/powerpc/trap.c > >>> ============================================================================== > >>> --- head/sys/powerpc/powerpc/trap.c Sat Mar 9 03:15:09 > >>> 2019 (r344959) +++ head/sys/powerpc/powerpc/trap.c > >>> Sat Mar 9 03:18:37 2019 (r344960) @@ -546,6 +546,7 @@ > >>> printtrap(u_int vector, struct trapframe *frame, int i printf(" > >>> current msr = 0x%" PRIxPTR "\n", mfmsr()); printf(" > >>> lr = 0x%" PRIxPTR " (0x%" PRIxPTR ")\n", frame->lr, > >>> frame->lr - (register_t)(__startkernel - KERNBASE)); > >>> + printf(" frame = %p\n", frame); > >>> printf(" curthread = %p\n", curthread); > >> > >> Some of those are printed with %PRIxPTR, some with %p. Perhaps > >> this inconsistency can be avoided? > >> > >> ./danfe > > > > PRIxPTR is for printing a pointer-like value that's not a pointer. > > The other values printed are of type register_t, not void *. > > Normally in FreeBSD sources we cast it to void * and use %p rather > than the PRI* macros FWIW. > Fair enough. I can add that to my TODO list. I have to fix the msr printing anyway, since the msr itself is not a pointer, but it's printed as such. May as well clean them all up. - Justin From owner-svn-src-all@freebsd.org Mon Mar 11 17:39:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90F741527564; Mon, 11 Mar 2019 17:39:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3105B71924; Mon, 11 Mar 2019 17:39:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 12E98E14D; Mon, 11 Mar 2019 17:39:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BHd90P004690; Mon, 11 Mar 2019 17:39:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BHd9so004689; Mon, 11 Mar 2019 17:39:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903111739.x2BHd9so004689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 11 Mar 2019 17:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345014 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 345014 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3105B71924 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 17:39:10 -0000 Author: mav Date: Mon Mar 11 17:39:09 2019 New Revision: 345014 URL: https://svnweb.freebsd.org/changeset/base/345014 Log: Revert minor part of r344934. I tried to save some CPU time on hopeless aggregation attempts, but it seems the condition I added is overly strict, blocking also aggregation of optional I/Os in cases which previously were possible. Revert just to be safe. MFC after: 1 month Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Mon Mar 11 15:47:26 2019 (r345013) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Mon Mar 11 17:39:09 2019 (r345014) @@ -692,7 +692,7 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) limit = zfs_vdev_aggregation_limit; limit = MAX(MIN(limit, maxblocksize), 0); - if (zio->io_flags & ZIO_FLAG_DONT_AGGREGATE || zio->io_size >= limit) + if (zio->io_flags & ZIO_FLAG_DONT_AGGREGATE || limit == 0) return (NULL); first = last = zio; From owner-svn-src-all@freebsd.org Mon Mar 11 18:17:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A04C1528A0D; Mon, 11 Mar 2019 18:17:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1BF2A74266; Mon, 11 Mar 2019 18:17:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 08BD6E81F; Mon, 11 Mar 2019 18:17:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BIHCdq027186; Mon, 11 Mar 2019 18:17:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BIHCVm027185; Mon, 11 Mar 2019 18:17:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201903111817.x2BIHCVm027185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Mon, 11 Mar 2019 18:17: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: r345015 - stable/11/usr.bin/getconf X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/usr.bin/getconf X-SVN-Commit-Revision: 345015 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1BF2A74266 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 18:17:13 -0000 Author: ngie Date: Mon Mar 11 18:17:12 2019 New Revision: 345015 URL: https://svnweb.freebsd.org/changeset/base/345015 Log: MFC r342952: Add Linux compatibility support for `SC_NPROCESSORS_{CONF,ONLN}` as `_SC_NPROCESSORS_{CONF,ONLN}` The goal of this change is to make it easier to use getconf to query the number of available processors. Sadly it's unclear per POSIX, which form (with a preceding _ or lacking it) is correct. I will bring this up on the Austin Group list so this point is clarified for implementors that might rely on this getconf variable in future POSIX spec versions. This is something I noticed when trying to import GoogleTest to FreeBSD as one of the CI scripts uses this variable on Linux. Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D19527 Modified: stable/11/usr.bin/getconf/sysconf.gperf Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/getconf/sysconf.gperf ============================================================================== --- stable/11/usr.bin/getconf/sysconf.gperf Mon Mar 11 17:39:09 2019 (r345014) +++ stable/11/usr.bin/getconf/sysconf.gperf Mon Mar 11 18:17:12 2019 (r345015) @@ -63,6 +63,8 @@ SYMLOOP_MAX, _SC_SYMLOOP_MAX TIMER_MAX, _SC_TIMER_MAX TTY_NAME_MAX, _SC_TTY_NAME_MAX TZNAME_MAX, _SC_TZNAME_MAX +_NPROCESSORS_CONF, _SC_NPROCESSORS_CONF +_NPROCESSORS_ONLN, _SC_NPROCESSORS_ONLN _POSIX2_CHAR_TERM, _SC_2_CHAR_TERM _POSIX2_C_BIND, _SC_2_C_BIND _POSIX2_C_DEV, _SC_2_C_DEV From owner-svn-src-all@freebsd.org Mon Mar 11 18:17:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F55A1528A40; Mon, 11 Mar 2019 18:17:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BAB847434E; Mon, 11 Mar 2019 18:17:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90F8CE820; Mon, 11 Mar 2019 18:17:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BIHQS4027244; Mon, 11 Mar 2019 18:17:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BIHQEI027243; Mon, 11 Mar 2019 18:17:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201903111817.x2BIHQEI027243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Mon, 11 Mar 2019 18:17:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345016 - stable/12/usr.bin/getconf X-SVN-Group: stable-12 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/12/usr.bin/getconf X-SVN-Commit-Revision: 345016 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BAB847434E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 18:17:27 -0000 Author: ngie Date: Mon Mar 11 18:17:26 2019 New Revision: 345016 URL: https://svnweb.freebsd.org/changeset/base/345016 Log: MFC r342952: Add Linux compatibility support for `SC_NPROCESSORS_{CONF,ONLN}` as `_SC_NPROCESSORS_{CONF,ONLN}` The goal of this change is to make it easier to use getconf to query the number of available processors. Sadly it's unclear per POSIX, which form (with a preceding _ or lacking it) is correct. I will bring this up on the Austin Group list so this point is clarified for implementors that might rely on this getconf variable in future POSIX spec versions. This is something I noticed when trying to import GoogleTest to FreeBSD as one of the CI scripts uses this variable on Linux. Approved by: emaste (mentor; implicit: https://reviews.freebsd.org/D19527) Differential Revision: https://reviews.freebsd.org/D19528 Modified: stable/12/usr.bin/getconf/sysconf.gperf Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/getconf/sysconf.gperf ============================================================================== --- stable/12/usr.bin/getconf/sysconf.gperf Mon Mar 11 18:17:12 2019 (r345015) +++ stable/12/usr.bin/getconf/sysconf.gperf Mon Mar 11 18:17:26 2019 (r345016) @@ -63,6 +63,8 @@ SYMLOOP_MAX, _SC_SYMLOOP_MAX TIMER_MAX, _SC_TIMER_MAX TTY_NAME_MAX, _SC_TTY_NAME_MAX TZNAME_MAX, _SC_TZNAME_MAX +_NPROCESSORS_CONF, _SC_NPROCESSORS_CONF +_NPROCESSORS_ONLN, _SC_NPROCESSORS_ONLN _POSIX2_CHAR_TERM, _SC_2_CHAR_TERM _POSIX2_C_BIND, _SC_2_C_BIND _POSIX2_C_DEV, _SC_2_C_DEV From owner-svn-src-all@freebsd.org Mon Mar 11 18:17:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 364971528A94; Mon, 11 Mar 2019 18:17:57 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C6CAB74496; Mon, 11 Mar 2019 18:17:56 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 8876C1699D; Mon, 11 Mar 2019 18:17:56 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r344982 - head/sys/x86/isa To: Ravi Pokala , Vladimir Kondratyev , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201903102019.x2AKJiJY029807@repo.freebsd.org> <00F61A40-C128-4F75-A45F-A6CECBB791C2@panasas.com> From: Jung-uk Kim Openpgp: preference=signencrypt Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: Date: Mon, 11 Mar 2019 14:17:48 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.5.2 MIME-Version: 1.0 In-Reply-To: <00F61A40-C128-4F75-A45F-A6CECBB791C2@panasas.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8hW1Bii9Yy2oRgPkvBN6DR9CYkMVJ9WVe" X-Rspamd-Queue-Id: C6CAB74496 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 18:17:57 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8hW1Bii9Yy2oRgPkvBN6DR9CYkMVJ9WVe Content-Type: multipart/mixed; boundary="ZzUiJPbxQg2h1sVl3OTdwnTXTx7lB2G6m"; protected-headers="v1" From: Jung-uk Kim To: Ravi Pokala , Vladimir Kondratyev , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r344982 - head/sys/x86/isa References: <201903102019.x2AKJiJY029807@repo.freebsd.org> <00F61A40-C128-4F75-A45F-A6CECBB791C2@panasas.com> In-Reply-To: <00F61A40-C128-4F75-A45F-A6CECBB791C2@panasas.com> --ZzUiJPbxQg2h1sVl3OTdwnTXTx7lB2G6m Content-Type: multipart/mixed; boundary="------------24835374B76989557A313568" Content-Language: en-US This is a multi-part message in MIME format. --------------24835374B76989557A313568 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 19. 3. 11., Ravi Pokala wrote: > -----Original Message----- > From: on behalf of Vladimir Kondraty= ev > Date: 2019-03-10, Sunday at 13:19 > To: , , > Subject: svn commit: r344982 - head/sys/x86/isa >=20 >> Author: wulf >> Date: Sun Mar 10 20:19:43 2019 >> New Revision: 344982 >> URL: https://svnweb.freebsd.org/changeset/base/344982 >> >> Log: >> atrtc(4): install ACPI RTC/CMOS operation region handler >=20 > Hi Vladimir, >=20 > This appears to have broken all the various LINT kernels for amd64 and = i386: >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > /usr/home/rpokala/freebsd/clean/base/head/sys/x86/isa/atrtc.c:321:2: er= ror: use of undeclared identifier '_AcpiModuleName' > ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); > ^ > /usr/home/rpokala/freebsd/clean/base/head/sys/contrib/dev/acpica/includ= e/acoutput.h:480:18: note: expanded from macro 'ACPI_FUNCTION_TRACE' > AcpiUtTrace (ACPI_DEBUG_PARAMETERS) > ^ > /usr/home/rpokala/freebsd/clean/base/head/sys/contrib/dev/acpica/includ= e/acoutput.h:402:39: note: expanded from macro 'ACPI_DEBUG_PARAMETERS' > __LINE__, ACPI_GET_FUNCTION_NAME, _AcpiModuleName, _COMPONENT > ^ > /usr/home/rpokala/freebsd/clean/base/head/sys/x86/isa/atrtc.c:321:2: er= ror: use of undeclared identifier '_COMPONENT' > /usr/home/rpokala/freebsd/clean/base/head/sys/contrib/dev/acpica/includ= e/acoutput.h:480:18: note: expanded from macro 'ACPI_FUNCTION_TRACE' > AcpiUtTrace (ACPI_DEBUG_PARAMETERS) > ^ > /usr/home/rpokala/freebsd/clean/base/head/sys/contrib/dev/acpica/includ= e/acoutput.h:402:56: note: expanded from macro 'ACPI_DEBUG_PARAMETERS' > __LINE__, ACPI_GET_FUNCTION_NAME, _AcpiModuleName, _COMPONENT > ^ > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > That same pattern of errors is noted for lines 321, 362, and 386. >=20 > Please take a look at your earliest convenience. Please try the attached patch. Jung-uk Kim --------------24835374B76989557A313568 Content-Type: text/x-patch; name="atrtc.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="atrtc.diff" Index: sys/x86/isa/atrtc.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/x86/isa/atrtc.c (revision 345013) +++ sys/x86/isa/atrtc.c (working copy) @@ -83,6 +83,11 @@ static int rtc_reg =3D -1; static u_char rtc_statusa =3D RTCSA_DIVIDER | RTCSA_NOPROF; static u_char rtc_statusb =3D RTCSB_24HR; =20 +#ifdef DEV_ACPI +#define _COMPONENT ACPI_TIMER +ACPI_MODULE_NAME("ATRTC") +#endif + /* * RTC support routines */ --------------24835374B76989557A313568-- --ZzUiJPbxQg2h1sVl3OTdwnTXTx7lB2G6m-- --8hW1Bii9Yy2oRgPkvBN6DR9CYkMVJ9WVe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAlyGplMACgkQfJ+WJvzb 8UZiHwf+KnHjbmgKU62C0QR0b31gWjXKHvvVcuo0gCSwdMGN6f/gn4GHyumJkoWa lExeZFQ8Sqj+Cqz21S63h/0jAwpLuZ+YF5rClaAhvue/kmcP829R9apS45yovESN cRuQ/JLj+b4PFsd611bNU0XMsU7eFKyUFAioxO0YRmFsOKzQh13gdR8oneSECXUQ logKKIhq3GfZWk34cYHaLoj4/prjLIh2f/LyKk6YiyC8dZtoy3U6rYnjAxygbaFB APVWxdJiwkuepbAZOn6prgWvB3w0JqyYOT6h39WdHmEBsiZA4tpnLXlLCkzlMp79 IBfsfaWQc0cRNptRLJzFWsprA44hig== =cFVs -----END PGP SIGNATURE----- --8hW1Bii9Yy2oRgPkvBN6DR9CYkMVJ9WVe-- From owner-svn-src-all@freebsd.org Mon Mar 11 18:45:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E318E15298FC; Mon, 11 Mar 2019 18:45:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 91FAF755AC; Mon, 11 Mar 2019 18:45:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27BEDED59; Mon, 11 Mar 2019 18:45:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BIjcn8042780; Mon, 11 Mar 2019 18:45:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BIjbml042773; Mon, 11 Mar 2019 18:45:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903111845.x2BIjbml042773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 11 Mar 2019 18:45:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345018 - in head/contrib/llvm/projects/libunwind: . include include/mach-o src X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head/contrib/llvm/projects/libunwind: . include include/mach-o src X-SVN-Commit-Revision: 345018 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 91FAF755AC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 18:45:39 -0000 Author: dim Date: Mon Mar 11 18:45:36 2019 New Revision: 345018 URL: https://svnweb.freebsd.org/changeset/base/345018 Log: Merge LLVM libunwind trunk r351319, from just before upstream's release_80 branch point. Afterwards, we will merge the rest of the changes in the actual release_80 branch. PR: 236062 MFC after: 1 month X-MFC-With: r344779 Added: - copied unchanged from r344967, vendor/llvm-libunwind/dist/LICENSE.TXT - copied unchanged from r344967, vendor/llvm-libunwind/dist/src/RWMutex.hpp - copied unchanged from r344967, vendor/llvm-libunwind/dist/src/Unwind-seh.cpp Directory Properties: head/contrib/llvm/projects/libunwind/LICENSE.TXT (props changed) head/contrib/llvm/projects/libunwind/src/RWMutex.hpp (props changed) head/contrib/llvm/projects/libunwind/src/Unwind-seh.cpp (props changed) Deleted: head/contrib/llvm/projects/libunwind/src/unwind_ext.h Modified: head/contrib/llvm/projects/libunwind/include/__libunwind_config.h head/contrib/llvm/projects/libunwind/include/libunwind.h head/contrib/llvm/projects/libunwind/include/mach-o/compact_unwind_encoding.h head/contrib/llvm/projects/libunwind/include/unwind.h head/contrib/llvm/projects/libunwind/src/AddressSpace.hpp head/contrib/llvm/projects/libunwind/src/CompactUnwinder.hpp head/contrib/llvm/projects/libunwind/src/DwarfInstructions.hpp head/contrib/llvm/projects/libunwind/src/DwarfParser.hpp head/contrib/llvm/projects/libunwind/src/EHHeaderParser.hpp head/contrib/llvm/projects/libunwind/src/Registers.hpp head/contrib/llvm/projects/libunwind/src/Unwind-EHABI.cpp head/contrib/llvm/projects/libunwind/src/Unwind-EHABI.h head/contrib/llvm/projects/libunwind/src/Unwind-sjlj.c head/contrib/llvm/projects/libunwind/src/UnwindCursor.hpp head/contrib/llvm/projects/libunwind/src/UnwindLevel1-gcc-ext.c head/contrib/llvm/projects/libunwind/src/UnwindLevel1.c head/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S head/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S head/contrib/llvm/projects/libunwind/src/Unwind_AppleExtras.cpp head/contrib/llvm/projects/libunwind/src/assembly.h head/contrib/llvm/projects/libunwind/src/config.h head/contrib/llvm/projects/libunwind/src/dwarf2.h head/contrib/llvm/projects/libunwind/src/libunwind.cpp head/contrib/llvm/projects/libunwind/src/libunwind_ext.h Directory Properties: head/contrib/llvm/projects/libunwind/ (props changed) Copied: head/contrib/llvm/projects/libunwind/LICENSE.TXT (from r344967, vendor/llvm-libunwind/dist/LICENSE.TXT) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/projects/libunwind/LICENSE.TXT Mon Mar 11 18:45:36 2019 (r345018, copy of r344967, vendor/llvm-libunwind/dist/LICENSE.TXT) @@ -0,0 +1,76 @@ +============================================================================== +libunwind License +============================================================================== + +The libunwind library is dual licensed under both the University of Illinois +"BSD-Like" license and the MIT license. As a user of this code you may choose +to use it under either license. As a contributor, you agree to allow your code +to be used under both. + +Full text of the relevant licenses is included below. + +============================================================================== + +University of Illinois/NCSA +Open Source License + +Copyright (c) 2009-2019 by the contributors listed in CREDITS.TXT + +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +============================================================================== + +Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. Modified: head/contrib/llvm/projects/libunwind/include/__libunwind_config.h ============================================================================== --- head/contrib/llvm/projects/libunwind/include/__libunwind_config.h Mon Mar 11 18:28:20 2019 (r345017) +++ head/contrib/llvm/projects/libunwind/include/__libunwind_config.h Mon Mar 11 18:45:36 2019 (r345018) @@ -12,65 +12,101 @@ #if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \ !defined(__ARM_DWARF_EH__) -#define _LIBUNWIND_ARM_EHABI 1 -#else -#define _LIBUNWIND_ARM_EHABI 0 +#define _LIBUNWIND_ARM_EHABI #endif +#define _LIBUNWIND_HIGHEST_DWARF_REGISTER_X86 8 +#define _LIBUNWIND_HIGHEST_DWARF_REGISTER_X86_64 32 +#define _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC 112 +#define _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC64 116 +#define _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM64 95 +#define _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM 287 +#define _LIBUNWIND_HIGHEST_DWARF_REGISTER_OR1K 32 +#define _LIBUNWIND_HIGHEST_DWARF_REGISTER_RISCV 95 +#define _LIBUNWIND_HIGHEST_DWARF_REGISTER_MIPS 65 +#define _LIBUNWIND_HIGHEST_DWARF_REGISTER_SPARC 31 + #if defined(_LIBUNWIND_IS_NATIVE_ONLY) # if defined(__i386__) -# define _LIBUNWIND_TARGET_I386 1 +# define _LIBUNWIND_TARGET_I386 # define _LIBUNWIND_CONTEXT_SIZE 8 -# define _LIBUNWIND_CURSOR_SIZE 19 -# define _LIBUNWIND_MAX_REGISTER 9 +# define _LIBUNWIND_CURSOR_SIZE 15 +# define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_X86 # elif defined(__x86_64__) # define _LIBUNWIND_TARGET_X86_64 1 -# define _LIBUNWIND_CONTEXT_SIZE 21 -# define _LIBUNWIND_CURSOR_SIZE 33 -# define _LIBUNWIND_MAX_REGISTER 17 +# if defined(_WIN64) +# define _LIBUNWIND_CONTEXT_SIZE 54 +# ifdef __SEH__ +# define _LIBUNWIND_CURSOR_SIZE 204 +# else +# define _LIBUNWIND_CURSOR_SIZE 66 +# endif +# else +# define _LIBUNWIND_CONTEXT_SIZE 21 +# define _LIBUNWIND_CURSOR_SIZE 33 +# endif +# define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_X86_64 +# elif defined(__powerpc64__) +# define _LIBUNWIND_TARGET_PPC64 1 +# define _LIBUNWIND_CONTEXT_SIZE 167 +# define _LIBUNWIND_CURSOR_SIZE 179 +# define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC64 # elif defined(__ppc__) # define _LIBUNWIND_TARGET_PPC 1 # define _LIBUNWIND_CONTEXT_SIZE 117 -# define _LIBUNWIND_CURSOR_SIZE 128 -# define _LIBUNWIND_MAX_REGISTER 113 +# define _LIBUNWIND_CURSOR_SIZE 124 +# define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC # elif defined(__aarch64__) # define _LIBUNWIND_TARGET_AARCH64 1 # define _LIBUNWIND_CONTEXT_SIZE 66 -# define _LIBUNWIND_CURSOR_SIZE 78 -# define _LIBUNWIND_MAX_REGISTER 96 +# if defined(__SEH__) +# define _LIBUNWIND_CURSOR_SIZE 164 +# else +# define _LIBUNWIND_CURSOR_SIZE 78 +# endif +# define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM64 # elif defined(__arm__) # define _LIBUNWIND_TARGET_ARM 1 -# define _LIBUNWIND_CONTEXT_SIZE 60 -# define _LIBUNWIND_CURSOR_SIZE 67 -# define _LIBUNWIND_MAX_REGISTER 96 +# if defined(__SEH__) +# define _LIBUNWIND_CONTEXT_SIZE 42 +# define _LIBUNWIND_CURSOR_SIZE 80 +# elif defined(__ARM_WMMX) +# define _LIBUNWIND_CONTEXT_SIZE 61 +# define _LIBUNWIND_CURSOR_SIZE 68 +# else +# define _LIBUNWIND_CONTEXT_SIZE 42 +# define _LIBUNWIND_CURSOR_SIZE 49 +# endif +# define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM # elif defined(__or1k__) # define _LIBUNWIND_TARGET_OR1K 1 # define _LIBUNWIND_CONTEXT_SIZE 16 -# define _LIBUNWIND_CURSOR_SIZE 28 -# define _LIBUNWIND_MAX_REGISTER 32 +# define _LIBUNWIND_CURSOR_SIZE 24 +# define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_OR1K # elif defined(__riscv) # define _LIBUNWIND_TARGET_RISCV 1 # define _LIBUNWIND_CONTEXT_SIZE 64 # define _LIBUNWIND_CURSOR_SIZE 76 +# define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_RISCV # define _LIBUNWIND_MAX_REGISTER 96 # elif defined(__mips__) # if defined(_ABIO32) && _MIPS_SIM == _ABIO32 # define _LIBUNWIND_TARGET_MIPS_O32 1 # if defined(__mips_hard_float) # define _LIBUNWIND_CONTEXT_SIZE 50 -# define _LIBUNWIND_CURSOR_SIZE 61 +# define _LIBUNWIND_CURSOR_SIZE 57 # else # define _LIBUNWIND_CONTEXT_SIZE 18 -# define _LIBUNWIND_CURSOR_SIZE 29 +# define _LIBUNWIND_CURSOR_SIZE 24 # endif # elif defined(_ABIN32) && _MIPS_SIM == _ABIN32 # define _LIBUNWIND_TARGET_MIPS_NEWABI 1 # if defined(__mips_hard_float) # define _LIBUNWIND_CONTEXT_SIZE 67 -# define _LIBUNWIND_CURSOR_SIZE 78 +# define _LIBUNWIND_CURSOR_SIZE 74 # else # define _LIBUNWIND_CONTEXT_SIZE 35 -# define _LIBUNWIND_CURSOR_SIZE 46 +# define _LIBUNWIND_CURSOR_SIZE 42 # endif # elif defined(_ABI64) && _MIPS_SIM == _ABI64 # define _LIBUNWIND_TARGET_MIPS_NEWABI 1 @@ -84,22 +120,29 @@ # else # error "Unsupported MIPS ABI and/or environment" # endif -# define _LIBUNWIND_MAX_REGISTER 66 +# define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_MIPS +# elif defined(__sparc__) + #define _LIBUNWIND_TARGET_SPARC 1 + #define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_SPARC + #define _LIBUNWIND_CONTEXT_SIZE 16 + #define _LIBUNWIND_CURSOR_SIZE 23 # else # error "Unsupported architecture." # endif #else // !_LIBUNWIND_IS_NATIVE_ONLY -# define _LIBUNWIND_TARGET_I386 1 +# define _LIBUNWIND_TARGET_I386 # define _LIBUNWIND_TARGET_X86_64 1 # define _LIBUNWIND_TARGET_PPC 1 +# define _LIBUNWIND_TARGET_PPC64 1 # define _LIBUNWIND_TARGET_AARCH64 1 # define _LIBUNWIND_TARGET_ARM 1 # define _LIBUNWIND_TARGET_OR1K 1 # define _LIBUNWIND_TARGET_MIPS_O32 1 # define _LIBUNWIND_TARGET_MIPS_NEWABI 1 -# define _LIBUNWIND_CONTEXT_SIZE 128 -# define _LIBUNWIND_CURSOR_SIZE 140 -# define _LIBUNWIND_MAX_REGISTER 120 +# define _LIBUNWIND_TARGET_SPARC 1 +# define _LIBUNWIND_CONTEXT_SIZE 167 +# define _LIBUNWIND_CURSOR_SIZE 179 +# define _LIBUNWIND_HIGHEST_DWARF_REGISTER 287 #endif // _LIBUNWIND_IS_NATIVE_ONLY #endif // ____LIBUNWIND_CONFIG_H__ Modified: head/contrib/llvm/projects/libunwind/include/libunwind.h ============================================================================== --- head/contrib/llvm/projects/libunwind/include/libunwind.h Mon Mar 11 18:28:20 2019 (r345017) +++ head/contrib/llvm/projects/libunwind/include/libunwind.h Mon Mar 11 18:45:36 2019 (r345018) @@ -20,12 +20,26 @@ #include #ifdef __APPLE__ - #include - #ifdef __arm__ - #define LIBUNWIND_AVAIL __attribute__((unavailable)) + #if __clang__ + #if __has_include() + #include + #endif + #elif __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 + #include + #endif + + #ifdef __arm__ + #define LIBUNWIND_AVAIL __attribute__((unavailable)) + #elif defined(__OSX_AVAILABLE_STARTING) + #define LIBUNWIND_AVAIL __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_5_0) + #else + #include + #ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER + #define LIBUNWIND_AVAIL AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER #else - #define LIBUNWIND_AVAIL __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_5_0) + #define LIBUNWIND_AVAIL __attribute__((unavailable)) #endif + #endif #else #define LIBUNWIND_AVAIL #endif @@ -43,6 +57,9 @@ enum { UNW_EINVAL = -6547, /* unsupported operation or bad value */ UNW_EBADVERSION = -6548, /* unwind info has unsupported version */ UNW_ENOINFO = -6549 /* no unwind info found */ +#if defined(_LIBUNWIND_TARGET_AARCH64) && !defined(_LIBUNWIND_IS_NATIVE_ONLY) + , UNW_ECROSSRASIGNING = -6550 /* cross unwind with return address signing */ +#endif }; struct unw_context_t { @@ -58,11 +75,10 @@ typedef struct unw_cursor_t unw_cursor_t; typedef struct unw_addr_space *unw_addr_space_t; typedef int unw_regnum_t; -#if _LIBUNWIND_ARM_EHABI -typedef uint32_t unw_word_t; +typedef uintptr_t unw_word_t; +#if defined(__arm__) typedef uint64_t unw_fpreg_t; #else -typedef uint64_t unw_word_t; typedef double unw_fpreg_t; #endif @@ -75,8 +91,8 @@ struct unw_proc_info_t { unw_word_t gp; /* not used */ unw_word_t flags; /* not used */ uint32_t format; /* compact unwind encoding, or zero if none */ - uint32_t unwind_info_size; /* size of dwarf unwind info, or zero if none */ - unw_word_t unwind_info; /* address of dwarf unwind info, or zero */ + uint32_t unwind_info_size; /* size of DWARF unwind info, or zero if none */ + unw_word_t unwind_info; /* address of DWARF unwind info, or zero */ unw_word_t extra; /* mach_header of mach-o image containing func */ }; typedef struct unw_proc_info_t unw_proc_info_t; @@ -151,8 +167,8 @@ enum { UNW_X86_ECX = 1, UNW_X86_EDX = 2, UNW_X86_EBX = 3, - UNW_X86_ESP = 4, - UNW_X86_EBP = 5, + UNW_X86_EBP = 4, + UNW_X86_ESP = 5, UNW_X86_ESI = 6, UNW_X86_EDI = 7 }; @@ -174,7 +190,24 @@ enum { UNW_X86_64_R12 = 12, UNW_X86_64_R13 = 13, UNW_X86_64_R14 = 14, - UNW_X86_64_R15 = 15 + UNW_X86_64_R15 = 15, + UNW_X86_64_RIP = 16, + UNW_X86_64_XMM0 = 17, + UNW_X86_64_XMM1 = 18, + UNW_X86_64_XMM2 = 19, + UNW_X86_64_XMM3 = 20, + UNW_X86_64_XMM4 = 21, + UNW_X86_64_XMM5 = 22, + UNW_X86_64_XMM6 = 23, + UNW_X86_64_XMM7 = 24, + UNW_X86_64_XMM8 = 25, + UNW_X86_64_XMM9 = 26, + UNW_X86_64_XMM10 = 27, + UNW_X86_64_XMM11 = 28, + UNW_X86_64_XMM12 = 29, + UNW_X86_64_XMM13 = 30, + UNW_X86_64_XMM14 = 31, + UNW_X86_64_XMM15 = 32, }; @@ -295,6 +328,190 @@ enum { UNW_PPC_SPEFSCR = 112 }; +// 64-bit ppc register numbers +enum { + UNW_PPC64_R0 = 0, + UNW_PPC64_R1 = 1, + UNW_PPC64_R2 = 2, + UNW_PPC64_R3 = 3, + UNW_PPC64_R4 = 4, + UNW_PPC64_R5 = 5, + UNW_PPC64_R6 = 6, + UNW_PPC64_R7 = 7, + UNW_PPC64_R8 = 8, + UNW_PPC64_R9 = 9, + UNW_PPC64_R10 = 10, + UNW_PPC64_R11 = 11, + UNW_PPC64_R12 = 12, + UNW_PPC64_R13 = 13, + UNW_PPC64_R14 = 14, + UNW_PPC64_R15 = 15, + UNW_PPC64_R16 = 16, + UNW_PPC64_R17 = 17, + UNW_PPC64_R18 = 18, + UNW_PPC64_R19 = 19, + UNW_PPC64_R20 = 20, + UNW_PPC64_R21 = 21, + UNW_PPC64_R22 = 22, + UNW_PPC64_R23 = 23, + UNW_PPC64_R24 = 24, + UNW_PPC64_R25 = 25, + UNW_PPC64_R26 = 26, + UNW_PPC64_R27 = 27, + UNW_PPC64_R28 = 28, + UNW_PPC64_R29 = 29, + UNW_PPC64_R30 = 30, + UNW_PPC64_R31 = 31, + UNW_PPC64_F0 = 32, + UNW_PPC64_F1 = 33, + UNW_PPC64_F2 = 34, + UNW_PPC64_F3 = 35, + UNW_PPC64_F4 = 36, + UNW_PPC64_F5 = 37, + UNW_PPC64_F6 = 38, + UNW_PPC64_F7 = 39, + UNW_PPC64_F8 = 40, + UNW_PPC64_F9 = 41, + UNW_PPC64_F10 = 42, + UNW_PPC64_F11 = 43, + UNW_PPC64_F12 = 44, + UNW_PPC64_F13 = 45, + UNW_PPC64_F14 = 46, + UNW_PPC64_F15 = 47, + UNW_PPC64_F16 = 48, + UNW_PPC64_F17 = 49, + UNW_PPC64_F18 = 50, + UNW_PPC64_F19 = 51, + UNW_PPC64_F20 = 52, + UNW_PPC64_F21 = 53, + UNW_PPC64_F22 = 54, + UNW_PPC64_F23 = 55, + UNW_PPC64_F24 = 56, + UNW_PPC64_F25 = 57, + UNW_PPC64_F26 = 58, + UNW_PPC64_F27 = 59, + UNW_PPC64_F28 = 60, + UNW_PPC64_F29 = 61, + UNW_PPC64_F30 = 62, + UNW_PPC64_F31 = 63, + // 64: reserved + UNW_PPC64_LR = 65, + UNW_PPC64_CTR = 66, + // 67: reserved + UNW_PPC64_CR0 = 68, + UNW_PPC64_CR1 = 69, + UNW_PPC64_CR2 = 70, + UNW_PPC64_CR3 = 71, + UNW_PPC64_CR4 = 72, + UNW_PPC64_CR5 = 73, + UNW_PPC64_CR6 = 74, + UNW_PPC64_CR7 = 75, + UNW_PPC64_XER = 76, + UNW_PPC64_V0 = 77, + UNW_PPC64_V1 = 78, + UNW_PPC64_V2 = 79, + UNW_PPC64_V3 = 80, + UNW_PPC64_V4 = 81, + UNW_PPC64_V5 = 82, + UNW_PPC64_V6 = 83, + UNW_PPC64_V7 = 84, + UNW_PPC64_V8 = 85, + UNW_PPC64_V9 = 86, + UNW_PPC64_V10 = 87, + UNW_PPC64_V11 = 88, + UNW_PPC64_V12 = 89, + UNW_PPC64_V13 = 90, + UNW_PPC64_V14 = 91, + UNW_PPC64_V15 = 92, + UNW_PPC64_V16 = 93, + UNW_PPC64_V17 = 94, + UNW_PPC64_V18 = 95, + UNW_PPC64_V19 = 96, + UNW_PPC64_V20 = 97, + UNW_PPC64_V21 = 98, + UNW_PPC64_V22 = 99, + UNW_PPC64_V23 = 100, + UNW_PPC64_V24 = 101, + UNW_PPC64_V25 = 102, + UNW_PPC64_V26 = 103, + UNW_PPC64_V27 = 104, + UNW_PPC64_V28 = 105, + UNW_PPC64_V29 = 106, + UNW_PPC64_V30 = 107, + UNW_PPC64_V31 = 108, + // 109, 111-113: OpenPOWER ELF V2 ABI: reserved + // Borrowing VRSAVE number from PPC32. + UNW_PPC64_VRSAVE = 109, + UNW_PPC64_VSCR = 110, + UNW_PPC64_TFHAR = 114, + UNW_PPC64_TFIAR = 115, + UNW_PPC64_TEXASR = 116, + UNW_PPC64_VS0 = UNW_PPC64_F0, + UNW_PPC64_VS1 = UNW_PPC64_F1, + UNW_PPC64_VS2 = UNW_PPC64_F2, + UNW_PPC64_VS3 = UNW_PPC64_F3, + UNW_PPC64_VS4 = UNW_PPC64_F4, + UNW_PPC64_VS5 = UNW_PPC64_F5, + UNW_PPC64_VS6 = UNW_PPC64_F6, + UNW_PPC64_VS7 = UNW_PPC64_F7, + UNW_PPC64_VS8 = UNW_PPC64_F8, + UNW_PPC64_VS9 = UNW_PPC64_F9, + UNW_PPC64_VS10 = UNW_PPC64_F10, + UNW_PPC64_VS11 = UNW_PPC64_F11, + UNW_PPC64_VS12 = UNW_PPC64_F12, + UNW_PPC64_VS13 = UNW_PPC64_F13, + UNW_PPC64_VS14 = UNW_PPC64_F14, + UNW_PPC64_VS15 = UNW_PPC64_F15, + UNW_PPC64_VS16 = UNW_PPC64_F16, + UNW_PPC64_VS17 = UNW_PPC64_F17, + UNW_PPC64_VS18 = UNW_PPC64_F18, + UNW_PPC64_VS19 = UNW_PPC64_F19, + UNW_PPC64_VS20 = UNW_PPC64_F20, + UNW_PPC64_VS21 = UNW_PPC64_F21, + UNW_PPC64_VS22 = UNW_PPC64_F22, + UNW_PPC64_VS23 = UNW_PPC64_F23, + UNW_PPC64_VS24 = UNW_PPC64_F24, + UNW_PPC64_VS25 = UNW_PPC64_F25, + UNW_PPC64_VS26 = UNW_PPC64_F26, + UNW_PPC64_VS27 = UNW_PPC64_F27, + UNW_PPC64_VS28 = UNW_PPC64_F28, + UNW_PPC64_VS29 = UNW_PPC64_F29, + UNW_PPC64_VS30 = UNW_PPC64_F30, + UNW_PPC64_VS31 = UNW_PPC64_F31, + UNW_PPC64_VS32 = UNW_PPC64_V0, + UNW_PPC64_VS33 = UNW_PPC64_V1, + UNW_PPC64_VS34 = UNW_PPC64_V2, + UNW_PPC64_VS35 = UNW_PPC64_V3, + UNW_PPC64_VS36 = UNW_PPC64_V4, + UNW_PPC64_VS37 = UNW_PPC64_V5, + UNW_PPC64_VS38 = UNW_PPC64_V6, + UNW_PPC64_VS39 = UNW_PPC64_V7, + UNW_PPC64_VS40 = UNW_PPC64_V8, + UNW_PPC64_VS41 = UNW_PPC64_V9, + UNW_PPC64_VS42 = UNW_PPC64_V10, + UNW_PPC64_VS43 = UNW_PPC64_V11, + UNW_PPC64_VS44 = UNW_PPC64_V12, + UNW_PPC64_VS45 = UNW_PPC64_V13, + UNW_PPC64_VS46 = UNW_PPC64_V14, + UNW_PPC64_VS47 = UNW_PPC64_V15, + UNW_PPC64_VS48 = UNW_PPC64_V16, + UNW_PPC64_VS49 = UNW_PPC64_V17, + UNW_PPC64_VS50 = UNW_PPC64_V18, + UNW_PPC64_VS51 = UNW_PPC64_V19, + UNW_PPC64_VS52 = UNW_PPC64_V20, + UNW_PPC64_VS53 = UNW_PPC64_V21, + UNW_PPC64_VS54 = UNW_PPC64_V22, + UNW_PPC64_VS55 = UNW_PPC64_V23, + UNW_PPC64_VS56 = UNW_PPC64_V24, + UNW_PPC64_VS57 = UNW_PPC64_V25, + UNW_PPC64_VS58 = UNW_PPC64_V26, + UNW_PPC64_VS59 = UNW_PPC64_V27, + UNW_PPC64_VS60 = UNW_PPC64_V28, + UNW_PPC64_VS61 = UNW_PPC64_V29, + UNW_PPC64_VS62 = UNW_PPC64_V30, + UNW_PPC64_VS63 = UNW_PPC64_V31 +}; + // 64-bit ARM64 registers enum { UNW_ARM64_X0 = 0, @@ -333,6 +550,8 @@ enum { UNW_ARM64_X31 = 31, UNW_ARM64_SP = 31, // reserved block + UNW_ARM64_RA_SIGN_STATE = 34, + // reserved block UNW_ARM64_D0 = 64, UNW_ARM64_D1 = 65, UNW_ARM64_D2 = 66, @@ -531,6 +750,7 @@ enum { UNW_OR1K_R29 = 29, UNW_OR1K_R30 = 30, UNW_OR1K_R31 = 31, + UNW_OR1K_EPCR = 32, }; // 64-bit RISC-V registers @@ -672,6 +892,42 @@ enum { UNW_MIPS_F31 = 63, UNW_MIPS_HI = 64, UNW_MIPS_LO = 65, +}; + +// SPARC registers +enum { + UNW_SPARC_G0 = 0, + UNW_SPARC_G1 = 1, + UNW_SPARC_G2 = 2, + UNW_SPARC_G3 = 3, + UNW_SPARC_G4 = 4, + UNW_SPARC_G5 = 5, + UNW_SPARC_G6 = 6, + UNW_SPARC_G7 = 7, + UNW_SPARC_O0 = 8, + UNW_SPARC_O1 = 9, + UNW_SPARC_O2 = 10, + UNW_SPARC_O3 = 11, + UNW_SPARC_O4 = 12, + UNW_SPARC_O5 = 13, + UNW_SPARC_O6 = 14, + UNW_SPARC_O7 = 15, + UNW_SPARC_L0 = 16, + UNW_SPARC_L1 = 17, + UNW_SPARC_L2 = 18, + UNW_SPARC_L3 = 19, + UNW_SPARC_L4 = 20, + UNW_SPARC_L5 = 21, + UNW_SPARC_L6 = 22, + UNW_SPARC_L7 = 23, + UNW_SPARC_I0 = 24, + UNW_SPARC_I1 = 25, + UNW_SPARC_I2 = 26, + UNW_SPARC_I3 = 27, + UNW_SPARC_I4 = 28, + UNW_SPARC_I5 = 29, + UNW_SPARC_I6 = 30, + UNW_SPARC_I7 = 31, }; #endif Modified: head/contrib/llvm/projects/libunwind/include/mach-o/compact_unwind_encoding.h ============================================================================== --- head/contrib/llvm/projects/libunwind/include/mach-o/compact_unwind_encoding.h Mon Mar 11 18:28:20 2019 (r345017) +++ head/contrib/llvm/projects/libunwind/include/mach-o/compact_unwind_encoding.h Mon Mar 11 18:45:36 2019 (r345018) @@ -6,7 +6,7 @@ // Source Licenses. See LICENSE.TXT for details. // // -// Darwin's alternative to dwarf based unwind encodings. +// Darwin's alternative to DWARF based unwind encodings. // //===----------------------------------------------------------------------===// @@ -17,7 +17,7 @@ #include // -// Compilers can emit standard Dwarf FDEs in the __TEXT,__eh_frame section +// Compilers can emit standard DWARF FDEs in the __TEXT,__eh_frame section // of object files. Or compilers can emit compact unwind information in // the __LD,__compact_unwind section. // @@ -26,10 +26,10 @@ // runtime to access unwind info for any given function. If the compiler // emitted compact unwind info for the function, that compact unwind info will // be encoded in the __TEXT,__unwind_info section. If the compiler emitted -// dwarf unwind info, the __TEXT,__unwind_info section will contain the offset +// DWARF unwind info, the __TEXT,__unwind_info section will contain the offset // of the FDE in the __TEXT,__eh_frame section in the final linked image. // -// Note: Previously, the linker would transform some dwarf unwind infos into +// Note: Previously, the linker would transform some DWARF unwind infos into // compact unwind info. But that is fragile and no longer done. @@ -58,7 +58,7 @@ enum { // 1-bit: has lsda // 2-bit: personality index // -// 4-bits: 0=old, 1=ebp based, 2=stack-imm, 3=stack-ind, 4=dwarf +// 4-bits: 0=old, 1=ebp based, 2=stack-imm, 3=stack-ind, 4=DWARF // ebp based: // 15-bits (5*3-bits per reg) register permutation // 8-bits for stack offset @@ -128,9 +128,9 @@ enum { // UNWIND_X86_FRAMELESS_STACK_SIZE. // UNWIND_X86_MODE_DWARF: // No compact unwind encoding is available. Instead the low 24-bits of the -// compact encoding is the offset of the dwarf FDE in the __eh_frame section. +// compact encoding is the offset of the DWARF FDE in the __eh_frame section. // This mode is never used in object files. It is only generated by the -// linker in final linked images which have only dwarf unwind info for a +// linker in final linked images which have only DWARF unwind info for a // function. // // The permutation encoding is a Lehmer code sequence encoded into a @@ -193,7 +193,7 @@ enum { // 1-bit: has lsda // 2-bit: personality index // -// 4-bits: 0=old, 1=rbp based, 2=stack-imm, 3=stack-ind, 4=dwarf +// 4-bits: 0=old, 1=rbp based, 2=stack-imm, 3=stack-ind, 4=DWARF // rbp based: // 15-bits (5*3-bits per reg) register permutation // 8-bits for stack offset @@ -262,9 +262,9 @@ enum { // UNWIND_X86_64_FRAMELESS_STACK_SIZE. // UNWIND_X86_64_MODE_DWARF: // No compact unwind encoding is available. Instead the low 24-bits of the -// compact encoding is the offset of the dwarf FDE in the __eh_frame section. +// compact encoding is the offset of the DWARF FDE in the __eh_frame section. // This mode is never used in object files. It is only generated by the -// linker in final linked images which have only dwarf unwind info for a +// linker in final linked images which have only DWARF unwind info for a // function. // @@ -275,14 +275,14 @@ enum { // 1-bit: has lsda // 2-bit: personality index // -// 4-bits: 4=frame-based, 3=dwarf, 2=frameless +// 4-bits: 4=frame-based, 3=DWARF, 2=frameless // frameless: // 12-bits of stack size // frame-based: // 4-bits D reg pairs saved // 5-bits X reg pairs saved -// dwarf: -// 24-bits offset of dwarf FDE in __eh_frame section +// DWARF: +// 24-bits offset of DWARF FDE in __eh_frame section // enum { UNWIND_ARM64_MODE_MASK = 0x0F000000, @@ -320,9 +320,9 @@ enum { // UNWIND_ARM64_FRAMELESS_STACK_SIZE_MASK. // UNWIND_ARM64_MODE_DWARF: // No compact unwind encoding is available. Instead the low 24-bits of the -// compact encoding is the offset of the dwarf FDE in the __eh_frame section. +// compact encoding is the offset of the DWARF FDE in the __eh_frame section. // This mode is never used in object files. It is only generated by the -// linker in final linked images which have only dwarf unwind info for a +// linker in final linked images which have only DWARF unwind info for a // function. // @@ -385,7 +385,7 @@ enum { // saved at that range of the function. // // If a particular function is so wacky that there is no compact unwind way -// to encode it, then the compiler can emit traditional dwarf unwind info. +// to encode it, then the compiler can emit traditional DWARF unwind info. // The runtime will use which ever is available. // // Runtime support for compact unwind encodings are only available on 10.6 Modified: head/contrib/llvm/projects/libunwind/include/unwind.h ============================================================================== --- head/contrib/llvm/projects/libunwind/include/unwind.h Mon Mar 11 18:28:20 2019 (r345017) +++ head/contrib/llvm/projects/libunwind/include/unwind.h Mon Mar 11 18:45:36 2019 (r345018) @@ -19,6 +19,11 @@ #include #include +#if defined(__SEH__) && !defined(__USING_SJLJ_EXCEPTIONS__) && defined(_WIN32) +#include +#include +#endif + #if defined(__APPLE__) #define LIBUNWIND_UNAVAIL __attribute__ (( unavailable )) #else @@ -36,7 +41,7 @@ typedef enum { _URC_HANDLER_FOUND = 6, _URC_INSTALL_CONTEXT = 7, _URC_CONTINUE_UNWIND = 8, -#if _LIBUNWIND_ARM_EHABI +#if defined(_LIBUNWIND_ARM_EHABI) _URC_FAILURE = 9 #endif } _Unwind_Reason_Code; @@ -51,12 +56,13 @@ typedef enum { typedef struct _Unwind_Context _Unwind_Context; // opaque -#if _LIBUNWIND_ARM_EHABI +#if defined(_LIBUNWIND_ARM_EHABI) typedef uint32_t _Unwind_State; static const _Unwind_State _US_VIRTUAL_UNWIND_FRAME = 0; static const _Unwind_State _US_UNWIND_FRAME_STARTING = 1; static const _Unwind_State _US_UNWIND_FRAME_RESUME = 2; +static const _Unwind_State _US_ACTION_MASK = 3; /* Undocumented flag for force unwinding. */ static const _Unwind_State _US_FORCE_UNWIND = 8; @@ -99,7 +105,7 @@ struct _Unwind_Control_Block { } pr_cache; long long int :0; /* Enforce the 8-byte alignment */ -}; +} __attribute__((__aligned__(8))); typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) (_Unwind_State state, @@ -119,15 +125,22 @@ struct _Unwind_Exception { uint64_t exception_class; void (*exception_cleanup)(_Unwind_Reason_Code reason, _Unwind_Exception *exc); +#if defined(__SEH__) && !defined(__USING_SJLJ_EXCEPTIONS__) + uintptr_t private_[6]; +#else uintptr_t private_1; // non-zero means forced unwind uintptr_t private_2; // holds sp that phase1 found for phase2 to use -#ifndef __LP64__ - // The gcc implementation of _Unwind_Exception used attribute mode on the - // above fields which had the side effect of causing this whole struct to - // round up to 32 bytes in size. To be more explicit, we add pad fields - // added for binary compatibility. +#endif +#if __SIZEOF_POINTER__ == 4 + // The implementation of _Unwind_Exception uses an attribute mode on the + // above fields which has the side effect of causing this whole struct to + // round up to 32 bytes in size (48 with SEH). To be more explicit, we add + // pad fields added for binary compatibility. uint32_t reserved[3]; #endif + // The Itanium ABI requires that _Unwind_Exception objects are "double-word + // aligned". GCC has interpreted this to mean "use the maximum useful + // alignment for the target"; so do we. } __attribute__((__aligned__)); typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) @@ -164,7 +177,7 @@ extern void _Unwind_Resume(_Unwind_Exception *exceptio #endif extern void _Unwind_DeleteException(_Unwind_Exception *exception_object); -#if _LIBUNWIND_ARM_EHABI +#if defined(_LIBUNWIND_ARM_EHABI) typedef enum { _UVRSC_CORE = 0, /* integer register */ _UVRSC_VFP = 1, /* vfp */ @@ -204,7 +217,7 @@ _Unwind_VRS_Pop(_Unwind_Context *context, _Unwind_VRS_ _Unwind_VRS_DataRepresentation representation); #endif -#if !_LIBUNWIND_ARM_EHABI +#if !defined(_LIBUNWIND_ARM_EHABI) extern uintptr_t _Unwind_GetGR(struct _Unwind_Context *context, int index); extern void _Unwind_SetGR(struct _Unwind_Context *context, int index, @@ -212,7 +225,7 @@ extern void _Unwind_SetGR(struct _Unwind_Context *cont extern uintptr_t _Unwind_GetIP(struct _Unwind_Context *context); extern void _Unwind_SetIP(struct _Unwind_Context *, uintptr_t new_value); -#else // _LIBUNWIND_ARM_EHABI +#else // defined(_LIBUNWIND_ARM_EHABI) #if defined(_LIBUNWIND_UNWIND_LEVEL1_EXTERNAL_LINKAGE) #define _LIBUNWIND_EXPORT_UNWIND_LEVEL1 extern @@ -251,7 +264,7 @@ void _Unwind_SetIP(struct _Unwind_Context *context, ui uintptr_t thumb_bit = _Unwind_GetGR(context, 15) & ((uintptr_t)0x1); _Unwind_SetGR(context, 15, value | thumb_bit); } -#endif // _LIBUNWIND_ARM_EHABI +#endif // defined(_LIBUNWIND_ARM_EHABI) extern uintptr_t _Unwind_GetRegionStart(struct _Unwind_Context *context); extern uintptr_t @@ -321,7 +334,7 @@ extern void __deregister_frame(const void *fde); // _Unwind_Find_FDE() will locate the FDE if the pc is in some function that has // an associated FDE. Note, Mac OS X 10.6 and later, introduces "compact unwind -// info" which the runtime uses in preference to dwarf unwind info. This +// info" which the runtime uses in preference to DWARF unwind info. This // function will only work if the target function has an FDE but no compact // unwind info. struct dwarf_eh_bases { @@ -334,7 +347,7 @@ extern const void *_Unwind_Find_FDE(const void *pc, st // This function attempts to find the start (address of first instruction) of // a function given an address inside the function. It only works if the -// function has an FDE (dwarf unwind info). +// function has an FDE (DWARF unwind info). // This function is unimplemented on Mac OS X 10.6 and later. Instead, use // _Unwind_Find_FDE() and look at the dwarf_eh_bases.func result. extern void *_Unwind_FindEnclosingFunction(void *pc); @@ -364,6 +377,22 @@ extern void *__deregister_frame_info(const void *fde) LIBUNWIND_UNAVAIL; extern void *__deregister_frame_info_bases(const void *fde) LIBUNWIND_UNAVAIL; + +#if defined(__SEH__) && !defined(__USING_SJLJ_EXCEPTIONS__) +#ifndef _WIN32 +typedef struct _EXCEPTION_RECORD EXCEPTION_RECORD; +typedef struct _CONTEXT CONTEXT; +typedef struct _DISPATCHER_CONTEXT DISPATCHER_CONTEXT; +#elif !defined(__MINGW32__) && VER_PRODUCTBUILD < 8000 +typedef struct _DISPATCHER_CONTEXT DISPATCHER_CONTEXT; +#endif +// This is the common wrapper for GCC-style personality functions with SEH. +extern EXCEPTION_DISPOSITION _GCC_specific_handler(EXCEPTION_RECORD *exc, + void *frame, + CONTEXT *ctx, + DISPATCHER_CONTEXT *disp, + __personality_routine pers); +#endif #ifdef __cplusplus } Modified: head/contrib/llvm/projects/libunwind/src/AddressSpace.hpp ============================================================================== --- head/contrib/llvm/projects/libunwind/src/AddressSpace.hpp Mon Mar 11 18:28:20 2019 (r345017) +++ head/contrib/llvm/projects/libunwind/src/AddressSpace.hpp Mon Mar 11 18:45:36 2019 (r345018) @@ -18,7 +18,15 @@ #include #include -#ifndef _LIBUNWIND_IS_BAREMETAL +#ifndef _LIBUNWIND_USE_DLADDR + #if !defined(_LIBUNWIND_IS_BAREMETAL) && !defined(_WIN32) + #define _LIBUNWIND_USE_DLADDR 1 + #else + #define _LIBUNWIND_USE_DLADDR 0 + #endif +#endif + +#if _LIBUNWIND_USE_DLADDR #include #endif @@ -32,73 +40,137 @@ namespace libunwind { #include "libunwind.h" #include "config.h" #include "dwarf2.h" +#include "EHHeaderParser.hpp" #include "Registers.hpp" -#if _LIBUNWIND_ARM_EHABI -#if defined(__FreeBSD__) || defined(__NetBSD__) +#ifdef __APPLE__ -#include -typedef void *_Unwind_Ptr; + struct dyld_unwind_sections + { + const struct mach_header* mh; + const void* dwarf_section; + uintptr_t dwarf_section_length; + const void* compact_unwind_section; + uintptr_t compact_unwind_section_length; + }; + #if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) \ + && (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)) \ + || defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + // In 10.7.0 or later, libSystem.dylib implements this function. + extern "C" bool _dyld_find_unwind_sections(void *, dyld_unwind_sections *); + #else + // In 10.6.x and earlier, we need to implement this functionality. Note + // that this requires a newer version of libmacho (from cctools) than is + // present in libSystem on 10.6.x (for getsectiondata). + static inline bool _dyld_find_unwind_sections(void* addr, + dyld_unwind_sections* info) { + // Find mach-o image containing address. + Dl_info dlinfo; + if (!dladdr(addr, &dlinfo)) + return false; +#if __LP64__ + const struct mach_header_64 *mh = (const struct mach_header_64 *)dlinfo.dli_fbase; +#else + const struct mach_header *mh = (const struct mach_header *)dlinfo.dli_fbase; +#endif -#elif defined(__linux__) + // Initialize the return struct + info->mh = (const struct mach_header *)mh; + info->dwarf_section = getsectiondata(mh, "__TEXT", "__eh_frame", &info->dwarf_section_length); + info->compact_unwind_section = getsectiondata(mh, "__TEXT", "__unwind_info", &info->compact_unwind_section_length); -typedef long unsigned int *_Unwind_Ptr; -extern "C" _Unwind_Ptr __gnu_Unwind_Find_exidx(_Unwind_Ptr addr, int *len); + if (!info->dwarf_section) { + info->dwarf_section_length = 0; + } -// Emulate the BSD dl_unwind_find_exidx API when on a GNU libdl system. -#define dl_unwind_find_exidx __gnu_Unwind_Find_exidx + if (!info->compact_unwind_section) { + info->compact_unwind_section_length = 0; + } -#elif !defined(_LIBUNWIND_IS_BAREMETAL) -#include -#else // !defined(_LIBUNWIND_IS_BAREMETAL) + return true; + } + #endif + +#elif defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) && defined(_LIBUNWIND_IS_BAREMETAL) + // When statically linked on bare-metal, the symbols for the EH table are looked // up without going through the dynamic loader. -struct EHTEntry { - uint32_t functionOffset; - uint32_t unwindOpcodes; -}; -extern EHTEntry __exidx_start; -extern EHTEntry __exidx_end; -#endif // !defined(_LIBUNWIND_IS_BAREMETAL) -#endif // _LIBUNWIND_ARM_EHABI -#if defined(__CloudABI__) || defined(__FreeBSD__) || defined(__linux__) || \ - defined(__NetBSD__) -#if _LIBUNWIND_SUPPORT_DWARF_UNWIND && _LIBUNWIND_SUPPORT_DWARF_INDEX +// The following linker script may be used to produce the necessary sections and symbols. +// Unless the --eh-frame-hdr linker option is provided, the section is not generated +// and does not take space in the output file. +// +// .eh_frame : +// { +// __eh_frame_start = .; +// KEEP(*(.eh_frame)) +// __eh_frame_end = .; +// } +// +// .eh_frame_hdr : +// { +// KEEP(*(.eh_frame_hdr)) +// } +// +// __eh_frame_hdr_start = SIZEOF(.eh_frame_hdr) > 0 ? ADDR(.eh_frame_hdr) : 0; +// __eh_frame_hdr_end = SIZEOF(.eh_frame_hdr) > 0 ? . : 0; + +extern char __eh_frame_start; +extern char __eh_frame_end; + +#if defined(_LIBUNWIND_SUPPORT_DWARF_INDEX) +extern char __eh_frame_hdr_start; +extern char __eh_frame_hdr_end; +#endif + +#elif defined(_LIBUNWIND_ARM_EHABI) && defined(_LIBUNWIND_IS_BAREMETAL) + +// When statically linked on bare-metal, the symbols for the EH table are looked +// up without going through the dynamic loader. +extern char __exidx_start; +extern char __exidx_end; + +#elif defined(_LIBUNWIND_ARM_EHABI) || defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Mar 11 18:56:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 193B2152A189; Mon, 11 Mar 2019 18:56:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE56975FAD; Mon, 11 Mar 2019 18:56:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9BEB8EF1D; Mon, 11 Mar 2019 18:56:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BIu5Uf048012; Mon, 11 Mar 2019 18:56:05 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BIu5X3048010; Mon, 11 Mar 2019 18:56:05 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903111856.x2BIu5X3048010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 11 Mar 2019 18:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345019 - head/contrib/llvm/projects/libunwind/src X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/llvm/projects/libunwind/src X-SVN-Commit-Revision: 345019 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AE56975FAD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 18:56:06 -0000 Author: dim Date: Mon Mar 11 18:56:04 2019 New Revision: 345019 URL: https://svnweb.freebsd.org/changeset/base/345019 Log: Merge LLVM libunwind release_80 branch r355677 (effectively, 8.0.0 rc4). PR: 236062 MFC after: 1 month X-MFC-With: r344779 Modified: head/contrib/llvm/projects/libunwind/src/AddressSpace.hpp head/contrib/llvm/projects/libunwind/src/EHHeaderParser.hpp Directory Properties: head/contrib/llvm/projects/libunwind/ (props changed) Modified: head/contrib/llvm/projects/libunwind/src/AddressSpace.hpp ============================================================================== --- head/contrib/llvm/projects/libunwind/src/AddressSpace.hpp Mon Mar 11 18:45:36 2019 (r345018) +++ head/contrib/llvm/projects/libunwind/src/AddressSpace.hpp Mon Mar 11 18:56:04 2019 (r345019) @@ -534,11 +534,11 @@ inline bool LocalAddressSpace::findUnwindSections(pint #endif cbdata->sects->dwarf_index_section = eh_frame_hdr_start; cbdata->sects->dwarf_index_section_length = phdr->p_memsz; - EHHeaderParser::decodeEHHdr( + found_hdr = EHHeaderParser::decodeEHHdr( *cbdata->addressSpace, eh_frame_hdr_start, phdr->p_memsz, hdrInfo); - cbdata->sects->dwarf_section = hdrInfo.eh_frame_ptr; - found_hdr = true; + if (found_hdr) + cbdata->sects->dwarf_section = hdrInfo.eh_frame_ptr; } } Modified: head/contrib/llvm/projects/libunwind/src/EHHeaderParser.hpp ============================================================================== --- head/contrib/llvm/projects/libunwind/src/EHHeaderParser.hpp Mon Mar 11 18:45:36 2019 (r345018) +++ head/contrib/llvm/projects/libunwind/src/EHHeaderParser.hpp Mon Mar 11 18:56:04 2019 (r345019) @@ -36,7 +36,7 @@ template class EHHeaderParser { (public) uint8_t table_enc; }; - static void decodeEHHdr(A &addressSpace, pint_t ehHdrStart, pint_t ehHdrEnd, + static bool decodeEHHdr(A &addressSpace, pint_t ehHdrStart, pint_t ehHdrEnd, EHHeaderInfo &ehHdrInfo); static bool findFDE(A &addressSpace, pint_t pc, pint_t ehHdrStart, uint32_t sectionLength, @@ -53,12 +53,14 @@ template class EHHeaderParser { (public) }; template -void EHHeaderParser::decodeEHHdr(A &addressSpace, pint_t ehHdrStart, +bool EHHeaderParser::decodeEHHdr(A &addressSpace, pint_t ehHdrStart, pint_t ehHdrEnd, EHHeaderInfo &ehHdrInfo) { pint_t p = ehHdrStart; uint8_t version = addressSpace.get8(p++); - if (version != 1) - _LIBUNWIND_ABORT("Unsupported .eh_frame_hdr version"); + if (version != 1) { + _LIBUNWIND_LOG0("Unsupported .eh_frame_hdr version"); + return false; + } uint8_t eh_frame_ptr_enc = addressSpace.get8(p++); uint8_t fde_count_enc = addressSpace.get8(p++); @@ -71,6 +73,8 @@ void EHHeaderParser::decodeEHHdr(A &addressSpace, p ? 0 : addressSpace.getEncodedP(p, ehHdrEnd, fde_count_enc, ehHdrStart); ehHdrInfo.table = p; + + return true; } template @@ -102,7 +106,9 @@ bool EHHeaderParser::findFDE(A &addressSpace, pint_ pint_t ehHdrEnd = ehHdrStart + sectionLength; EHHeaderParser::EHHeaderInfo hdrInfo; - EHHeaderParser::decodeEHHdr(addressSpace, ehHdrStart, ehHdrEnd, hdrInfo); + if (!EHHeaderParser::decodeEHHdr(addressSpace, ehHdrStart, ehHdrEnd, + hdrInfo)) + return false; size_t tableEntrySize = getTableEntrySize(hdrInfo.table_enc); pint_t tableEntry; From owner-svn-src-all@freebsd.org Mon Mar 11 19:15:58 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03AA1152A888; Mon, 11 Mar 2019 19:15:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9563D76B63; Mon, 11 Mar 2019 19:15:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 860E8F2A5; Mon, 11 Mar 2019 19:15:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BJFve9059024; Mon, 11 Mar 2019 19:15:57 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BJFvFR059023; Mon, 11 Mar 2019 19:15:57 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903111915.x2BJFvFR059023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 11 Mar 2019 19:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345021 - head/contrib/llvm/lib/CodeGen X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/llvm/lib/CodeGen X-SVN-Commit-Revision: 345021 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9563D76B63 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 19:15:58 -0000 Author: dim Date: Mon Mar 11 19:15:57 2019 New Revision: 345021 URL: https://svnweb.freebsd.org/changeset/base/345021 Log: Pull in r355854 from upstream llvm trunk (by Jonas Paulsson): [RegAlloc] Avoid compile time regression with multiple copy hints. As a fix for https://bugs.llvm.org/show_bug.cgi?id=40986 ("excessive compile time building opencollada"), this patch makes sure that no phys reg is hinted more than once from getRegAllocationHints(). This handles the case were many virtual registers are assigned to the same physreg. The previous compile time fix (r343686) in weightCalcHelper() only made sure that physical/virtual registers are passed no more than once to addRegAllocationHint(). Review: Dimitry Andric, Quentin Colombet https://reviews.llvm.org/D59201 This should fix a hang when compiling certain generated .cpp files in the graphics/opencollada port. PR: 236313 MFC after: 1 month X-MFC-With: r344779 Modified: head/contrib/llvm/lib/CodeGen/TargetRegisterInfo.cpp Modified: head/contrib/llvm/lib/CodeGen/TargetRegisterInfo.cpp ============================================================================== --- head/contrib/llvm/lib/CodeGen/TargetRegisterInfo.cpp Mon Mar 11 19:10:48 2019 (r345020) +++ head/contrib/llvm/lib/CodeGen/TargetRegisterInfo.cpp Mon Mar 11 19:15:57 2019 (r345021) @@ -14,6 +14,7 @@ #include "llvm/CodeGen/TargetRegisterInfo.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/BitVector.h" +#include "llvm/ADT/SmallSet.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringExtras.h" #include "llvm/CodeGen/MachineFrameInfo.h" @@ -398,6 +399,7 @@ TargetRegisterInfo::getRegAllocationHints(unsigned Vir const std::pair> &Hints_MRI = MRI.getRegAllocationHints(VirtReg); + SmallSet HintedRegs; // First hint may be a target hint. bool Skip = (Hints_MRI.first != 0); for (auto Reg : Hints_MRI.second) { @@ -411,6 +413,10 @@ TargetRegisterInfo::getRegAllocationHints(unsigned Vir if (VRM && isVirtualRegister(Phys)) Phys = VRM->getPhys(Phys); + // Don't add the same reg twice (Hints_MRI may contain multiple virtual + // registers allocated to the same physreg). + if (!HintedRegs.insert(Phys).second) + continue; // Check that Phys is a valid hint in VirtReg's register class. if (!isPhysicalRegister(Phys)) continue; From owner-svn-src-all@freebsd.org Mon Mar 11 19:46:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7E3A152C3ED; Mon, 11 Mar 2019 19:46:16 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A96977D3A; Mon, 11 Mar 2019 19:46:16 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E358F7B1; Mon, 11 Mar 2019 19:46:16 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BJkG2R074713; Mon, 11 Mar 2019 19:46:16 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BJkGdn074712; Mon, 11 Mar 2019 19:46:16 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201903111946.x2BJkGdn074712@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Mon, 11 Mar 2019 19:46:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345022 - head/sys/x86/isa X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/sys/x86/isa X-SVN-Commit-Revision: 345022 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5A96977D3A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 19:46:16 -0000 Author: wulf Date: Mon Mar 11 19:46:15 2019 New Revision: 345022 URL: https://svnweb.freebsd.org/changeset/base/345022 Log: Fix amd64/i386 LINT build after r344982 Submitted by: jkim Reported by: rpokala MFC with: r344982 Modified: head/sys/x86/isa/atrtc.c Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Mon Mar 11 19:15:57 2019 (r345021) +++ head/sys/x86/isa/atrtc.c Mon Mar 11 19:46:15 2019 (r345022) @@ -83,6 +83,11 @@ static int rtc_reg = -1; static u_char rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF; static u_char rtc_statusb = RTCSB_24HR; +#ifdef DEV_ACPI +#define _COMPONENT ACPI_TIMER +ACPI_MODULE_NAME("ATRTC") +#endif + /* * RTC support routines */ From owner-svn-src-all@freebsd.org Mon Mar 11 19:52:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3B54152C71F; Mon, 11 Mar 2019 19:52:54 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp.infotel.ru (corp.infotel.ru [195.170.219.3]) by mx1.freebsd.org (Postfix) with ESMTP id 352C9803F8; Mon, 11 Mar 2019 19:52:53 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp (corp.infotel.ru [195.170.219.3]) by corp.infotel.ru (Postfix) with ESMTP id 991545B63C; Mon, 11 Mar 2019 22:52:48 +0300 (MSK) X-Virus-Scanned: amavisd-new at corp.infotel.ru Received: from corp.infotel.ru ([195.170.219.3]) by corp (corp.infotel.ru [195.170.219.3]) (amavisd-new, port 10024) with ESMTP id EgThp4iB6jQA; Mon, 11 Mar 2019 22:52:38 +0300 (MSK) Received: from mail.cicgroup.ru (unknown [195.170.219.74]) by corp.infotel.ru (Postfix) with ESMTP id 9FBDF5B62C; Mon, 11 Mar 2019 22:52:38 +0300 (MSK) Received: from mail.cicgroup.ru (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTP id B4ECD42211F; Mon, 11 Mar 2019 22:52:37 +0300 (MSK) X-Virus-Scanned: amavisd-new at cicgroup.ru Received: from mail.cicgroup.ru ([127.0.0.1]) by mail.cicgroup.ru (mail.cicgroup.ru [127.0.0.1]) (amavisd-new, port 10024) with SMTP id q-gEGQxsnLls; Mon, 11 Mar 2019 22:52:35 +0300 (MSK) Received: from localhost (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTPA id F2CEC42211C; Mon, 11 Mar 2019 22:52:34 +0300 (MSK) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 11 Mar 2019 22:52:34 +0300 From: Vladimir Kondratyev To: Jung-uk Kim Cc: Ravi Pokala , Vladimir Kondratyev , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r344982 - head/sys/x86/isa In-Reply-To: References: <201903102019.x2AKJiJY029807@repo.freebsd.org> <00F61A40-C128-4F75-A45F-A6CECBB791C2@panasas.com> Message-ID: <8335f06543bd6f4d2119d74f7f4df74f@kondratyev.su> X-Sender: vladimir@kondratyev.su User-Agent: Roundcube Webmail/1.3.5 X-Rspamd-Queue-Id: 352C9803F8 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 19:52:55 -0000 On 2019-03-11 21:17, Jung-uk Kim wrote: > On 19. 3. 11., Ravi Pokala wrote: >> -----Original Message----- >> From: on behalf of Vladimir >> Kondratyev >> Date: 2019-03-10, Sunday at 13:19 >> To: , , >> >> Subject: svn commit: r344982 - head/sys/x86/isa >> >>> Author: wulf >>> Date: Sun Mar 10 20:19:43 2019 >>> New Revision: 344982 >>> URL: https://svnweb.freebsd.org/changeset/base/344982 >>> >>> Log: >>> atrtc(4): install ACPI RTC/CMOS operation region handler >> >> Hi Vladimir, >> >> This appears to have broken all the various LINT kernels for amd64 and >> i386: >> >> ================================================================ >> /usr/home/rpokala/freebsd/clean/base/head/sys/x86/isa/atrtc.c:321:2: >> error: use of undeclared identifier '_AcpiModuleName' >> ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); >> ^ >> /usr/home/rpokala/freebsd/clean/base/head/sys/contrib/dev/acpica/include/acoutput.h:480:18: >> note: expanded from macro 'ACPI_FUNCTION_TRACE' >> AcpiUtTrace (ACPI_DEBUG_PARAMETERS) >> ^ >> /usr/home/rpokala/freebsd/clean/base/head/sys/contrib/dev/acpica/include/acoutput.h:402:39: >> note: expanded from macro 'ACPI_DEBUG_PARAMETERS' >> __LINE__, ACPI_GET_FUNCTION_NAME, _AcpiModuleName, _COMPONENT >> ^ >> /usr/home/rpokala/freebsd/clean/base/head/sys/x86/isa/atrtc.c:321:2: >> error: use of undeclared identifier '_COMPONENT' >> /usr/home/rpokala/freebsd/clean/base/head/sys/contrib/dev/acpica/include/acoutput.h:480:18: >> note: expanded from macro 'ACPI_FUNCTION_TRACE' >> AcpiUtTrace (ACPI_DEBUG_PARAMETERS) >> ^ >> /usr/home/rpokala/freebsd/clean/base/head/sys/contrib/dev/acpica/include/acoutput.h:402:56: >> note: expanded from macro 'ACPI_DEBUG_PARAMETERS' >> __LINE__, ACPI_GET_FUNCTION_NAME, _AcpiModuleName, _COMPONENT >> ^ >> ================================================================ >> >> That same pattern of errors is noted for lines 321, 362, and 386. >> >> Please take a look at your earliest convenience. > > Please try the attached patch. > > Jung-uk Kim Thank you! It fixed LINT at least on amd64. Sorry for breakage :-( -- WBR Vladimir Kondratyev From owner-svn-src-all@freebsd.org Mon Mar 11 20:39:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6091152DD7F; Mon, 11 Mar 2019 20:39:50 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 880068294D; Mon, 11 Mar 2019 20:39:50 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [172.17.133.69] (unknown [12.202.168.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id A30C4178CD; Mon, 11 Mar 2019 20:39:49 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/10.16.1.190220 Date: Mon, 11 Mar 2019 13:39:46 -0700 Subject: Re: svn commit: r344982 - head/sys/x86/isa From: Ravi Pokala To: Jung-uk Kim , Vladimir Kondratyev , , , Message-ID: <1AF8F88B-4291-4EBA-8A56-530DABF5E833@panasas.com> Thread-Topic: svn commit: r344982 - head/sys/x86/isa References: <201903102019.x2AKJiJY029807@repo.freebsd.org> <00F61A40-C128-4F75-A45F-A6CECBB791C2@panasas.com> In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-Rspamd-Queue-Id: 880068294D X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.966,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 20:39:51 -0000 That did the trick, and I see that Vladimir has already submitted it. Thank= you both! -Ravi (rpokala@) =EF=BB=BF-----Original Message----- From: on behalf of Jung-uk Kim Date: 2019-03-11, Monday at 11:17 To: Ravi Pokala , Vladimir Kondratyev , , , Subject: Re: svn commit: r344982 - head/sys/x86/isa On 19. 3. 11., Ravi Pokala wrote: > -----Original Message----- > From: on behalf of Vladimir Kondratyev= > Date: 2019-03-10, Sunday at 13:19 > To: , , > Subject: svn commit: r344982 - head/sys/x86/isa >=20 >> Author: wulf >> Date: Sun Mar 10 20:19:43 2019 >> New Revision: 344982 >> URL: https://svnweb.freebsd.org/changeset/base/344982 >> >> Log: >> atrtc(4): install ACPI RTC/CMOS operation region handler >=20 > Hi Vladimir, >=20 > This appears to have broken all the various LINT kernels for amd64 and i3= 86: >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > /usr/home/rpokala/freebsd/clean/base/head/sys/x86/isa/atrtc.c:321:2: erro= r: use of undeclared identifier '_AcpiModuleName' > ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); > ^ > /usr/home/rpokala/freebsd/clean/base/head/sys/contrib/dev/acpica/include/= acoutput.h:480:18: note: expanded from macro 'ACPI_FUNCTION_TRACE' > AcpiUtTrace (ACPI_DEBUG_PARAMETERS) > ^ > /usr/home/rpokala/freebsd/clean/base/head/sys/contrib/dev/acpica/include/= acoutput.h:402:39: note: expanded from macro 'ACPI_DEBUG_PARAMETERS' > __LINE__, ACPI_GET_FUNCTION_NAME, _AcpiModuleName, _COMPONENT > ^ > /usr/home/rpokala/freebsd/clean/base/head/sys/x86/isa/atrtc.c:321:2: erro= r: use of undeclared identifier '_COMPONENT' > /usr/home/rpokala/freebsd/clean/base/head/sys/contrib/dev/acpica/include/= acoutput.h:480:18: note: expanded from macro 'ACPI_FUNCTION_TRACE' > AcpiUtTrace (ACPI_DEBUG_PARAMETERS) > ^ > /usr/home/rpokala/freebsd/clean/base/head/sys/contrib/dev/acpica/include/= acoutput.h:402:56: note: expanded from macro 'ACPI_DEBUG_PARAMETERS' > __LINE__, ACPI_GET_FUNCTION_NAME, _AcpiModuleName, _COMPONENT > ^ > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > That same pattern of errors is noted for lines 321, 362, and 386. >=20 > Please take a look at your earliest convenience. Please try the attached patch. Jung-uk Kim From owner-svn-src-all@freebsd.org Mon Mar 11 20:40:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8959152DE48; Mon, 11 Mar 2019 20:40:58 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5CE0D82B1C; Mon, 11 Mar 2019 20:40:58 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 33BA118055; Mon, 11 Mar 2019 20:40:58 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BKevm1002530; Mon, 11 Mar 2019 20:40:57 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BKevsV002523; Mon, 11 Mar 2019 20:40:57 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201903112040.x2BKevsV002523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Mon, 11 Mar 2019 20:40:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345024 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/nandfs fs/nfsclient kern ufs/ufs X-SVN-Group: head X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/nandfs fs/nfsclient kern ufs/ufs X-SVN-Commit-Revision: 345024 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5CE0D82B1C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 20:40:59 -0000 Author: sjg Date: Mon Mar 11 20:40:56 2019 New Revision: 345024 URL: https://svnweb.freebsd.org/changeset/base/345024 Log: Add _PC_ACL_* to vop_stdpathconf This avoid EINVAL from tmpfs etc. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D19512 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c head/sys/fs/nandfs/nandfs_vnops.c head/sys/fs/nfsclient/nfs_clvnops.c head/sys/kern/vfs_default.c head/sys/ufs/ufs/ufs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Mon Mar 11 19:50:44 2019 (r345023) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Mon Mar 11 20:40:56 2019 (r345024) @@ -755,10 +755,6 @@ zfsctl_common_pathconf(ap) *ap->a_retval = (int)SPA_MINBLOCKSIZE; return (0); - case _PC_ACL_EXTENDED: - *ap->a_retval = 0; - return (0); - case _PC_ACL_NFS4: *ap->a_retval = 1; return (0); Modified: head/sys/fs/nandfs/nandfs_vnops.c ============================================================================== --- head/sys/fs/nandfs/nandfs_vnops.c Mon Mar 11 19:50:44 2019 (r345023) +++ head/sys/fs/nandfs/nandfs_vnops.c Mon Mar 11 20:40:56 2019 (r345024) @@ -2258,9 +2258,6 @@ nandfs_pathconf(struct vop_pathconf_args *ap) case _PC_NO_TRUNC: *ap->a_retval = 1; break; - case _PC_ACL_EXTENDED: - *ap->a_retval = 0; - break; case _PC_ALLOC_SIZE_MIN: *ap->a_retval = ap->a_vp->v_mount->mnt_stat.f_bsize; break; Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Mon Mar 11 19:50:44 2019 (r345023) +++ head/sys/fs/nfsclient/nfs_clvnops.c Mon Mar 11 20:40:56 2019 (r345024) @@ -3511,9 +3511,6 @@ nfs_pathconf(struct vop_pathconf_args *ap) case _PC_NO_TRUNC: *ap->a_retval = pc.pc_notrunc; break; - case _PC_ACL_EXTENDED: - *ap->a_retval = 0; - break; case _PC_ACL_NFS4: if (NFS_ISV4(vp) && nfsrv_useacl != 0 && attrflag != 0 && NFSISSET_ATTRBIT(&nfsva.na_suppattr, NFSATTRBIT_ACL)) @@ -3526,9 +3523,6 @@ nfs_pathconf(struct vop_pathconf_args *ap) *ap->a_retval = ACL_MAX_ENTRIES; else *ap->a_retval = 3; - break; - case _PC_MAC_PRESENT: - *ap->a_retval = 0; break; case _PC_PRIO_IO: *ap->a_retval = 0; Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Mon Mar 11 19:50:44 2019 (r345023) +++ head/sys/kern/vfs_default.c Mon Mar 11 20:40:56 2019 (r345024) @@ -482,6 +482,13 @@ vop_stdpathconf(ap) case _PC_PATH_MAX: *ap->a_retval = PATH_MAX; return (0); + case _PC_ACL_EXTENDED: + case _PC_ACL_NFS4: + case _PC_CAP_PRESENT: + case _PC_INF_PRESENT: + case _PC_MAC_PRESENT: + *ap->a_retval = 0; + return (0); default: return (EINVAL); } Modified: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Mon Mar 11 19:50:44 2019 (r345023) +++ head/sys/ufs/ufs/ufs_vnops.c Mon Mar 11 20:40:56 2019 (r345024) @@ -2421,28 +2421,20 @@ ufs_pathconf(ap) case _PC_NO_TRUNC: *ap->a_retval = 1; break; - case _PC_ACL_EXTENDED: #ifdef UFS_ACL + case _PC_ACL_EXTENDED: if (ap->a_vp->v_mount->mnt_flag & MNT_ACLS) *ap->a_retval = 1; else *ap->a_retval = 0; -#else - *ap->a_retval = 0; -#endif break; - case _PC_ACL_NFS4: -#ifdef UFS_ACL if (ap->a_vp->v_mount->mnt_flag & MNT_NFS4ACLS) *ap->a_retval = 1; else *ap->a_retval = 0; -#else - *ap->a_retval = 0; -#endif break; - +#endif case _PC_ACL_PATH_MAX: #ifdef UFS_ACL if (ap->a_vp->v_mount->mnt_flag & (MNT_ACLS | MNT_NFS4ACLS)) @@ -2453,16 +2445,14 @@ ufs_pathconf(ap) *ap->a_retval = 3; #endif break; - case _PC_MAC_PRESENT: #ifdef MAC + case _PC_MAC_PRESENT: if (ap->a_vp->v_mount->mnt_flag & MNT_MULTILABEL) *ap->a_retval = 1; else *ap->a_retval = 0; -#else - *ap->a_retval = 0; -#endif break; +#endif case _PC_MIN_HOLE_SIZE: *ap->a_retval = ap->a_vp->v_mount->mnt_stat.f_iosize; break; From owner-svn-src-all@freebsd.org Mon Mar 11 20:57:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C946152E51A; Mon, 11 Mar 2019 20:57:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EDF0B83503; Mon, 11 Mar 2019 20:57:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D9BEC18397; Mon, 11 Mar 2019 20:57:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BKvsFk012907; Mon, 11 Mar 2019 20:57:54 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BKvs5U012906; Mon, 11 Mar 2019 20:57:54 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201903112057.x2BKvs5U012906@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 11 Mar 2019 20:57:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345025 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 345025 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EDF0B83503 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 20:57:55 -0000 Author: imp Date: Mon Mar 11 20:57:54 2019 New Revision: 345025 URL: https://svnweb.freebsd.org/changeset/base/345025 Log: Upgrade Chipfancier SLC quirk to all versions The 16GB, 32GB and 128GB versions of this product all have the same problem. For some reason, the RC10 size is correct, while the RC16 size is larger (oddly by the capacity size / 1024 bytes). Using the RC16 size results in illegal LBA range errors when geom tastes the device. So, expand the quirk to cover all versions of this chip. Ideally, we'd get both READ CAPACITY 10 and READ CAPACITY 16 sizes and print a warnnig if they differ and use the smaller of the two numbers, though that may be problematical as well. Furthermore, SBC-4 encourages users transition to RC16 only, which suggests that in the future RC10 may disappear from some drives. It's unclear how to cope with these drives generically. PR: 234503 MFC After: 1 week Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Mon Mar 11 20:40:56 2019 (r345024) +++ head/sys/cam/scsi/scsi_da.c Mon Mar 11 20:57:54 2019 (r345025) @@ -865,11 +865,12 @@ static struct da_quirk_entry da_quirk_table[] = }, { /* - * 16GB SLC CHIPFANCIER - * PR: usb/234503 + * SLC CHIPFANCIER USB drives + * PR: usb/234503 (RC10 right, RC16 wrong) + * 16GB, 32GB and 128GB confirmed to have same issue */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "16G SLC", "CHIPFANCIER", - "1.00"}, /*quirks*/ DA_Q_NO_RC16 + {T_DIRECT, SIP_MEDIA_REMOVABLE, "*SLC", "CHIPFANCIER", + "*"}, /*quirks*/ DA_Q_NO_RC16 }, /* ATA/SATA devices over SAS/USB/... */ { From owner-svn-src-all@freebsd.org Mon Mar 11 21:35:58 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDA29152F7A2; Mon, 11 Mar 2019 21:35:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 813F884EB4; Mon, 11 Mar 2019 21:35:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6CFA918A60; Mon, 11 Mar 2019 21:35:57 +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 x2BLZvAf039143; Mon, 11 Mar 2019 21:35:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BLZuA8039141; Mon, 11 Mar 2019 21:35:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903112135.x2BLZuA8039141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 11 Mar 2019 21:35: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: r345027 - in stable/11: share/man/man4 sys/opencrypto X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable/11: share/man/man4 sys/opencrypto X-SVN-Commit-Revision: 345027 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 813F884EB4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 21:35:58 -0000 Author: jhb Date: Mon Mar 11 21:35:56 2019 New Revision: 345027 URL: https://svnweb.freebsd.org/changeset/base/345027 Log: MFC 323891,323892: Support EtA requests via /dev/crypto. 323891: Add a new COP_F_CIPHER_FIRST flag for struct crypt_op. This requests that the cipher be performed before rather than after the HMAC when both are specified for a single operation. 323892: Support AEAD requests with non-GCM algorithms. In particular, support chaining an AES cipher with an HMAC for a request including AAD. This permits submitting requests from userland to encrypt objects like IPSec packets using these algorithms. In the non-GCM case, the authentication crypto descriptor covers both the AAD and the ciphertext. The GCM case remains unchanged. This matches the requests created internally in IPSec. For the non-GCM case, the COP_F_CIPHER_FIRST is also supported since the ordering matters. Note that while this can be used to simulate IPSec requests from userland, this ioctl cannot currently be used to perform TLS requests using AES-CBC and MAC-before-encrypt. Sponsored by: Chelsio Communications Modified: stable/11/share/man/man4/crypto.4 stable/11/sys/opencrypto/cryptodev.c stable/11/sys/opencrypto/cryptodev.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/crypto.4 ============================================================================== --- stable/11/share/man/man4/crypto.4 Mon Mar 11 21:00:58 2019 (r345026) +++ stable/11/share/man/man4/crypto.4 Mon Mar 11 21:35:56 2019 (r345027) @@ -60,7 +60,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 15, 2015 +.Dd September 21, 2017 .Dt CRYPTO 4 .Os .Sh NAME @@ -127,7 +127,9 @@ Asymmetric operations do not use sessions. .It Submit requests, synchronously with .Dv CIOCCRYPT -(symmetric) +(symmetric), +.Dv CIOCCRYPTAEAD +(symmetric), or .Dv CIOCKEY (asymmetric). @@ -279,6 +281,16 @@ supplies the length of the input buffer; the fields .Fa cr_op-\*[Gt]iv supply the addresses of the input buffer, output buffer, one-way hash, and initialization vector, respectively. +If a session is using both a privacy algorithm and a hash algorithm, +the request will generate a hash of the input buffer before +generating the output buffer by default. +If the +.Dv COP_F_CIPHER_FIRST +flag is included in the +.Fa cr_op-\*[Gt]flags +field, +then the request will generate a hash of the output buffer after +executing the privacy algorithm. .It Dv CIOCCRYPTAEAD Fa struct crypt_aead *cr_aead .Bd -literal struct crypt_aead { Modified: stable/11/sys/opencrypto/cryptodev.c ============================================================================== --- stable/11/sys/opencrypto/cryptodev.c Mon Mar 11 21:00:58 2019 (r345026) +++ stable/11/sys/opencrypto/cryptodev.c Mon Mar 11 21:35:56 2019 (r345027) @@ -755,18 +755,22 @@ cryptodev_op( goto bail; } - if (cse->thash) { - crda = crp->crp_desc; - if (cse->txform) - crde = crda->crd_next; - } else { - if (cse->txform) + if (cse->thash && cse->txform) { + if (cop->flags & COP_F_CIPHER_FIRST) { crde = crp->crp_desc; - else { - SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); - error = EINVAL; - goto bail; + crda = crde->crd_next; + } else { + crda = crp->crp_desc; + crde = crda->crd_next; } + } else if (cse->thash) { + crda = crp->crp_desc; + } else if (cse->txform) { + crde = crp->crp_desc; + } else { + SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); + error = EINVAL; + goto bail; } if ((error = copyin(cop->src, cse->uio.uio_iov[0].iov_base, @@ -941,8 +945,13 @@ cryptodev_aead( goto bail; } - crda = crp->crp_desc; - crde = crda->crd_next; + if (caead->flags & COP_F_CIPHER_FIRST) { + crde = crp->crp_desc; + crda = crde->crd_next; + } else { + crda = crp->crp_desc; + crde = crda->crd_next; + } if ((error = copyin(caead->aad, cse->uio.uio_iov[0].iov_base, caead->aadlen))) { @@ -956,8 +965,16 @@ cryptodev_aead( goto bail; } + /* + * For GCM, crd_len covers only the AAD. For other ciphers + * chained with an HMAC, crd_len covers both the AAD and the + * cipher text. + */ crda->crd_skip = 0; - crda->crd_len = caead->aadlen; + if (cse->cipher == CRYPTO_AES_NIST_GCM_16) + crda->crd_len = caead->aadlen; + else + crda->crd_len = caead->aadlen + caead->len; crda->crd_inject = caead->aadlen + caead->len; crda->crd_alg = cse->mac; Modified: stable/11/sys/opencrypto/cryptodev.h ============================================================================== --- stable/11/sys/opencrypto/cryptodev.h Mon Mar 11 21:00:58 2019 (r345026) +++ stable/11/sys/opencrypto/cryptodev.h Mon Mar 11 21:35:56 2019 (r345027) @@ -238,7 +238,8 @@ struct crypt_op { #define COP_ENCRYPT 1 #define COP_DECRYPT 2 u_int16_t flags; -#define COP_F_BATCH 0x0008 /* Batch op if possible */ +#define COP_F_CIPHER_FIRST 0x0001 /* Cipher before MAC. */ +#define COP_F_BATCH 0x0008 /* Batch op if possible */ u_int len; c_caddr_t src; /* become iov[] inside kernel */ caddr_t dst; From owner-svn-src-all@freebsd.org Mon Mar 11 21:38:00 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 220B7152F82C; Mon, 11 Mar 2019 21:38:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B9FC48501D; Mon, 11 Mar 2019 21:37:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB3F518A62; Mon, 11 Mar 2019 21:37:59 +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 x2BLbxFD039303; Mon, 11 Mar 2019 21:37:59 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BLbx9k039302; Mon, 11 Mar 2019 21:37:59 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903112137.x2BLbx9k039302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 11 Mar 2019 21:37:59 +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: r345028 - stable/11/tools/tools/crypto X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/11/tools/tools/crypto X-SVN-Commit-Revision: 345028 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B9FC48501D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 21:38:00 -0000 Author: jhb Date: Mon Mar 11 21:37:58 2019 New Revision: 345028 URL: https://svnweb.freebsd.org/changeset/base/345028 Log: MFC 331417,331597: Add the cryptocheck test tool. 331417: Bring in JHB's cryptocheck tool It can be used to validate basic algorithm correctness on a variety of inputs, by comarison to openssl. While here, add some sanity to the crypto/Makefile. The tool may not be perfect, but getting it in tree where collaboration can happen is a nice first step. The pace of development outside of svn seems to have slowed down mid-2017. 331597: Update the license to note my work on cryptocheck was sponsored. Sponsored by: Chelsio Communications Added: stable/11/tools/tools/crypto/cryptocheck.c - copied, changed from r331417, head/tools/tools/crypto/cryptocheck.c Modified: stable/11/tools/tools/crypto/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/tools/crypto/Makefile ============================================================================== --- stable/11/tools/tools/crypto/Makefile Mon Mar 11 21:35:56 2019 (r345027) +++ stable/11/tools/tools/crypto/Makefile Mon Mar 11 21:37:58 2019 (r345028) @@ -1,5 +1,6 @@ # $FreeBSD$ # +# Copyright (c) 2018 Conrad Meyer # Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting # All rights reserved. # @@ -25,40 +26,23 @@ # SUCH DAMAGE. # -ALL= cryptotest cryptokeytest cryptostats \ +PROGS= cryptocheck cryptotest cryptokeytest cryptostats \ ubsecstats hifnstats ipsecstats safestats -BINDIR= /usr/local/bin +MAN= +BINDIR?= /usr/local/bin -all: ${ALL} +# cryptocheck: test symmetric crypto functions +LIBADD.cryptocheck+= crypto ssl util -# program to test asymmetric crypto functions -cryptokeytest: cryptokeytest.c - ${CC} -o cryptokeytest cryptokeytest.c -lcrypto +# cryptokeytest: test asymmetric crypto functions +LIBADD.cryptokeytest+= crypto -# program to dump statistics kept by the core crypto code -cryptostats: cryptostats.c - ${CC} -o cryptostats cryptostats.c +# cryptostats: dump statistics kept by the core crypto code +# ubsecstats: print statistics kept by the Broadcom driver +# hifnstats: print statistics kept by the HIFN driver +# safestats: statistics kept by the SafeNet driver +# ipsecstats: print statistics kept by fast ipsec -# program to print statistics kept by the Broadcom driver -ubsecstats: ubsecstats.c - ${CC} -o ubsecstats ubsecstats.c +CLEANFILES+= core a.out -# program to print statistics kept by the HIFN driver -hifnstats: hifnstats.c - ${CC} -o hifnstats hifnstats.c - -# program to print statistics kept by the SafeNet driver -safestats: safestats.c - ${CC} -o safestats safestats.c - -# program to print statistics kept by fast ipsec -ipsecstats: ipsecstats.c - ${CC} -o ipsecstats ipsecstats.c - -clean: - rm -f ${ALL} core a.out - -install: ${ALL} - for i in ${ALL}; do \ - install $$i ${DESTDIR}${BINDIR}; \ - done +.include Copied and modified: stable/11/tools/tools/crypto/cryptocheck.c (from r331417, head/tools/tools/crypto/cryptocheck.c) ============================================================================== --- head/tools/tools/crypto/cryptocheck.c Fri Mar 23 04:31:19 2018 (r331417, copy source) +++ stable/11/tools/tools/crypto/cryptocheck.c Mon Mar 11 21:37:58 2019 (r345028) @@ -1,5 +1,30 @@ /*- - * Copyright (c) 2017 John Baldwin, + * Copyright (c) 2017 Chelsio Communications, Inc. + * All rights reserved. + * Written by: John Baldwin + * + * 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. + */ +/*- * Copyright (c) 2004 Sam Leffler, Errno Consulting * All rights reserved. * From owner-svn-src-all@freebsd.org Mon Mar 11 21:49:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97CD5152FE3D; Mon, 11 Mar 2019 21:49:45 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D77C85925; Mon, 11 Mar 2019 21:49:45 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E55F18C0C; Mon, 11 Mar 2019 21:49:45 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BLnjLC044556; Mon, 11 Mar 2019 21:49:45 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BLnjY7044555; Mon, 11 Mar 2019 21:49:45 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201903112149.x2BLnjY7044555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Mon, 11 Mar 2019 21:49:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345029 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 345029 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3D77C85925 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 21:49:45 -0000 Author: mckusick Date: Mon Mar 11 21:49:44 2019 New Revision: 345029 URL: https://svnweb.freebsd.org/changeset/base/345029 Log: Augment DDB "show buffer" command to print the buffer's referenced vnode pointer (b_vp). The value of b_vp can be used by "show vnode" to print the vnode and "show vnodebufs" to print all the clean and dirty buffers associated with the vnode (which should include this buffer). Sponsored by: Netflix Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Mon Mar 11 21:37:58 2019 (r345028) +++ head/sys/kern/vfs_bio.c Mon Mar 11 21:49:44 2019 (r345029) @@ -5337,11 +5337,11 @@ DB_SHOW_COMMAND(buffer, db_show_buffer) (u_int)bp->b_ioflags, PRINT_BIO_FLAGS); db_printf( "b_error = %d, b_bufsize = %ld, b_bcount = %ld, b_resid = %ld\n" - "b_bufobj = (%p), b_data = %p, b_blkno = %jd, b_lblkno = %jd, " - "b_dep = %p\n", + "b_bufobj = (%p), b_data = %p\n, b_blkno = %jd, b_lblkno = %jd, " + "b_vp = %p, b_dep = %p\n", bp->b_error, bp->b_bufsize, bp->b_bcount, bp->b_resid, bp->b_bufobj, bp->b_data, (intmax_t)bp->b_blkno, - (intmax_t)bp->b_lblkno, bp->b_dep.lh_first); + (intmax_t)bp->b_lblkno, bp->b_vp, bp->b_dep.lh_first); db_printf("b_kvabase = %p, b_kvasize = %d\n", bp->b_kvabase, bp->b_kvasize); if (bp->b_npages) { From owner-svn-src-all@freebsd.org Mon Mar 11 21:51:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81552152FEED; Mon, 11 Mar 2019 21:51:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 24B3C85C52; Mon, 11 Mar 2019 21:51:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0EC2318C3D; Mon, 11 Mar 2019 21:51:16 +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 x2BLpF94045434; Mon, 11 Mar 2019 21:51:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BLpFsj045433; Mon, 11 Mar 2019 21:51:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903112151.x2BLpFsj045433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 11 Mar 2019 21:51: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: r345030 - stable/11/sys/opencrypto X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/11/sys/opencrypto X-SVN-Commit-Revision: 345030 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 24B3C85C52 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 21:51:16 -0000 Author: jhb Date: Mon Mar 11 21:51:15 2019 New Revision: 345030 URL: https://svnweb.freebsd.org/changeset/base/345030 Log: MFC 327839: Change the type of 'crp_opaque' from caddr_t to void *. Opaque pointers should be void *. Note that this does not go through the tree removing all of the now-unnecessary casts. Sponsored by: Chelsio Communications Modified: stable/11/sys/opencrypto/cryptodev.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/opencrypto/cryptodev.h ============================================================================== --- stable/11/sys/opencrypto/cryptodev.h Mon Mar 11 21:49:44 2019 (r345029) +++ stable/11/sys/opencrypto/cryptodev.h Mon Mar 11 21:51:15 2019 (r345030) @@ -422,7 +422,7 @@ struct cryptop { #define CRYPTO_F_CBIFSYNC 0x0040 /* Do CBIMM if op is synchronous */ caddr_t crp_buf; /* Data to be processed */ - caddr_t crp_opaque; /* Opaque pointer, passed along */ + void * crp_opaque; /* Opaque pointer, passed along */ struct cryptodesc *crp_desc; /* Linked list of processing descriptors */ int (*crp_callback)(struct cryptop *); /* Callback function */ From owner-svn-src-all@freebsd.org Mon Mar 11 21:56:36 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22ACE153034D; Mon, 11 Mar 2019 21:56:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B940386174; Mon, 11 Mar 2019 21:56:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A356918DAF; Mon, 11 Mar 2019 21:56:35 +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 x2BLuZck049794; Mon, 11 Mar 2019 21:56:35 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BLuZuZ049793; Mon, 11 Mar 2019 21:56:35 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903112156.x2BLuZuZ049793@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 11 Mar 2019 21:56: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: r345031 - stable/11/sys/opencrypto X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/11/sys/opencrypto X-SVN-Commit-Revision: 345031 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B940386174 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 21:56:36 -0000 Author: jhb Date: Mon Mar 11 21:56:35 2019 New Revision: 345031 URL: https://svnweb.freebsd.org/changeset/base/345031 Log: MFC 328057: Split crp_buf into a union. This adds explicit crp_mbuf and crp_uio pointers of the right type to replace casts of crp_buf. This does not sweep through changing existing code, but new code should use the correct fields instead of casts. Sponsored by: Chelsio Communications Modified: stable/11/sys/opencrypto/cryptodev.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/opencrypto/cryptodev.h ============================================================================== --- stable/11/sys/opencrypto/cryptodev.h Mon Mar 11 21:51:15 2019 (r345030) +++ stable/11/sys/opencrypto/cryptodev.h Mon Mar 11 21:56:35 2019 (r345031) @@ -421,7 +421,11 @@ struct cryptop { #define CRYPTO_F_DONE 0x0020 /* Operation completed */ #define CRYPTO_F_CBIFSYNC 0x0040 /* Do CBIMM if op is synchronous */ - caddr_t crp_buf; /* Data to be processed */ + union { + caddr_t crp_buf; /* Data to be processed */ + struct mbuf *crp_mbuf; + struct uio *crp_uio; + }; void * crp_opaque; /* Opaque pointer, passed along */ struct cryptodesc *crp_desc; /* Linked list of processing descriptors */ @@ -522,5 +526,6 @@ extern void crypto_copydata(int flags, caddr_t buf, in caddr_t out); extern int crypto_apply(int flags, caddr_t buf, int off, int len, int (*f)(void *, void *, u_int), void *arg); + #endif /* _KERNEL */ #endif /* _CRYPTO_CRYPTO_H_ */ From owner-svn-src-all@freebsd.org Mon Mar 11 22:05:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2ED2415306E3; Mon, 11 Mar 2019 22:05:35 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C478E86699; Mon, 11 Mar 2019 22:05:34 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B157618FB0; Mon, 11 Mar 2019 22:05:34 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BM5Y3T055184; Mon, 11 Mar 2019 22:05:34 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BM5Ym4055183; Mon, 11 Mar 2019 22:05:34 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201903112205.x2BM5Ym4055183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Mon, 11 Mar 2019 22:05:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345032 - head/sys/ufs/ufs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/ufs/ufs X-SVN-Commit-Revision: 345032 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C478E86699 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 22:05:35 -0000 Author: mckusick Date: Mon Mar 11 22:05:34 2019 New Revision: 345032 URL: https://svnweb.freebsd.org/changeset/base/345032 Log: Augment the UFS filesystem specific print function (called by the kernel vn_printf() routine when printing out vnodes associated with a UFS filesystem) to also include the inode's link count, effective link count, generation number, owner, group, flags, size, and for UFS2 filesystems, the extent size. Sponsored by: Netflix Modified: head/sys/ufs/ufs/inode.h head/sys/ufs/ufs/ufs_vnops.c Modified: head/sys/ufs/ufs/inode.h ============================================================================== --- head/sys/ufs/ufs/inode.h Mon Mar 11 21:56:35 2019 (r345031) +++ head/sys/ufs/ufs/inode.h Mon Mar 11 22:05:34 2019 (r345032) @@ -134,6 +134,10 @@ struct inode { #define IN_UFS2 0x0400 /* UFS2 vs UFS1 */ +#define PRINT_INODE_FLAGS "\20\20b16\17b15\16b14\15b13" \ + "\14b12\13is_ufs2\12truncated\11ea_lockwait\10ea_locked" \ + "\7lazyaccess\6lazymod\5needsync\4modified\3update\2change\1access" + #define i_dirhash i_un.dirhash #define i_snapblklist i_un.snapblklist #define i_din1 dinode_u.din1 Modified: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Mon Mar 11 21:56:35 2019 (r345031) +++ head/sys/ufs/ufs/ufs_vnops.c Mon Mar 11 22:05:34 2019 (r345032) @@ -2338,6 +2338,13 @@ ufs_print(ap) struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); + printf("\tnlink=%d, effnlink=%d, size=%jd", ip->i_nlink, + ip->i_effnlink, (intmax_t)ip->i_size); + if (I_IS_UFS2(ip)) + printf(", extsize %d", ip->i_din2->di_extsize); + printf("\n\tgeneration=%jx, uid=%d, gid=%d, flags=0x%b\n", + (uintmax_t)ip->i_gen, ip->i_uid, ip->i_gid, + (u_int)ip->i_flags, PRINT_INODE_FLAGS); printf("\tino %lu, on dev %s", (u_long)ip->i_number, devtoname(ITODEV(ip))); if (vp->v_type == VFIFO) From owner-svn-src-all@freebsd.org Mon Mar 11 22:17:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D2751530956; Mon, 11 Mar 2019 22:17:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B539D86BAD; Mon, 11 Mar 2019 22:17:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9926A1915B; Mon, 11 Mar 2019 22:17:53 +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 x2BMHrYB060527; Mon, 11 Mar 2019 22:17:53 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BMHrwo060526; Mon, 11 Mar 2019 22:17:53 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903112217.x2BMHrwo060526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 11 Mar 2019 22:17: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: r345033 - stable/11/sys/opencrypto X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/11/sys/opencrypto X-SVN-Commit-Revision: 345033 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B539D86BAD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 22:17:54 -0000 Author: jhb Date: Mon Mar 11 22:17:53 2019 New Revision: 345033 URL: https://svnweb.freebsd.org/changeset/base/345033 Log: MFC 328453: Move per-operation data out of the csession structure. Create a struct cryptop_data which contains state needed for a single symmetric crypto operation and move that state out of the session. This closes a race with the CRYPTO_F_DONE flag that can result in use after free. While here, remove the 'cse->error' member. It was just a copy of 'crp->crp_etype' and cryptodev_op() and cryptodev_aead() checked both 'crp->crp_etype' and 'cse->error'. Similarly, do not check for an error from mtx_sleep() since it is not used with PCATCH or a timeout so cannot fail with an error. PR: 218597 Sponsored by: Chelsio Communications Modified: stable/11/sys/opencrypto/cryptodev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/opencrypto/cryptodev.c ============================================================================== --- stable/11/sys/opencrypto/cryptodev.c Mon Mar 11 22:05:34 2019 (r345032) +++ stable/11/sys/opencrypto/cryptodev.c Mon Mar 11 22:17:53 2019 (r345033) @@ -281,10 +281,14 @@ struct csession { caddr_t mackey; int mackeylen; +}; - struct iovec iovec; +struct cryptop_data { + struct csession *cse; + + struct iovec iovec[1]; struct uio uio; - int error; + bool done; }; struct fcrypt { @@ -707,9 +711,37 @@ bail: #undef SES2 } -static int cryptodev_cb(void *); +static int cryptodev_cb(struct cryptop *); +static struct cryptop_data * +cod_alloc(struct csession *cse, size_t len, struct thread *td) +{ + struct cryptop_data *cod; + struct uio *uio; + cod = malloc(sizeof(struct cryptop_data), M_XDATA, M_WAITOK | M_ZERO); + + cod->cse = cse; + uio = &cod->uio; + uio->uio_iov = cod->iovec; + uio->uio_iovcnt = 1; + uio->uio_resid = len; + uio->uio_segflg = UIO_SYSSPACE; + uio->uio_rw = UIO_WRITE; + uio->uio_td = td; + uio->uio_iov[0].iov_len = len; + uio->uio_iov[0].iov_base = malloc(len, M_XDATA, M_WAITOK); + return (cod); +} + +static void +cod_free(struct cryptop_data *cod) +{ + + free(cod->uio.uio_iov[0].iov_base, M_XDATA); + free(cod, M_XDATA); +} + static int cryptodev_op( struct csession *cse, @@ -717,6 +749,7 @@ cryptodev_op( struct ucred *active_cred, struct thread *td) { + struct cryptop_data *cod = NULL; struct cryptop *crp = NULL; struct cryptodesc *crde = NULL, *crda = NULL; int error; @@ -733,20 +766,10 @@ cryptodev_op( } } - cse->uio.uio_iov = &cse->iovec; - cse->uio.uio_iovcnt = 1; - cse->uio.uio_offset = 0; - cse->uio.uio_resid = cop->len; - cse->uio.uio_segflg = UIO_SYSSPACE; - cse->uio.uio_rw = UIO_WRITE; - cse->uio.uio_td = td; - cse->uio.uio_iov[0].iov_len = cop->len; - if (cse->thash) { - cse->uio.uio_iov[0].iov_len += cse->thash->hashsize; - cse->uio.uio_resid += cse->thash->hashsize; - } - cse->uio.uio_iov[0].iov_base = malloc(cse->uio.uio_iov[0].iov_len, - M_XDATA, M_WAITOK); + if (cse->thash) + cod = cod_alloc(cse, cop->len + cse->thash->hashsize, td); + else + cod = cod_alloc(cse, cop->len, td); crp = crypto_getreq((cse->txform != NULL) + (cse->thash != NULL)); if (crp == NULL) { @@ -773,7 +796,7 @@ cryptodev_op( goto bail; } - if ((error = copyin(cop->src, cse->uio.uio_iov[0].iov_base, + if ((error = copyin(cop->src, cod->uio.uio_iov[0].iov_base, cop->len))) { SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); goto bail; @@ -805,10 +828,10 @@ cryptodev_op( crp->crp_ilen = cop->len; crp->crp_flags = CRYPTO_F_IOV | CRYPTO_F_CBIMM | (cop->flags & COP_F_BATCH); - crp->crp_buf = (caddr_t)&cse->uio; - crp->crp_callback = (int (*) (struct cryptop *)) cryptodev_cb; + crp->crp_uio = &cod->uio; + crp->crp_callback = cryptodev_cb; crp->crp_sid = cse->sid; - crp->crp_opaque = (void *)cse; + crp->crp_opaque = cod; if (cop->iv) { if (crde == NULL) { @@ -851,19 +874,20 @@ again: * entry and the crypto_done callback into us. */ error = crypto_dispatch(crp); - mtx_lock(&cse->lock); - if (error == 0 && (crp->crp_flags & CRYPTO_F_DONE) == 0) - error = msleep(crp, &cse->lock, PWAIT, "crydev", 0); - mtx_unlock(&cse->lock); - if (error != 0) { SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); goto bail; } + mtx_lock(&cse->lock); + while (!cod->done) + mtx_sleep(cod, &cse->lock, PWAIT, "crydev", 0); + mtx_unlock(&cse->lock); + if (crp->crp_etype == EAGAIN) { crp->crp_etype = 0; crp->crp_flags &= ~CRYPTO_F_DONE; + cod->done = false; goto again; } @@ -873,21 +897,15 @@ again: goto bail; } - if (cse->error) { - SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); - error = cse->error; - goto bail; - } - if (cop->dst && - (error = copyout(cse->uio.uio_iov[0].iov_base, cop->dst, + (error = copyout(cod->uio.uio_iov[0].iov_base, cop->dst, cop->len))) { SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); goto bail; } if (cop->mac && - (error = copyout((caddr_t)cse->uio.uio_iov[0].iov_base + cop->len, + (error = copyout((caddr_t)cod->uio.uio_iov[0].iov_base + cop->len, cop->mac, cse->thash->hashsize))) { SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); goto bail; @@ -896,8 +914,8 @@ again: bail: if (crp) crypto_freereq(crp); - if (cse->uio.uio_iov[0].iov_base) - free(cse->uio.uio_iov[0].iov_base, M_XDATA); + if (cod) + cod_free(cod); return (error); } @@ -909,7 +927,7 @@ cryptodev_aead( struct ucred *active_cred, struct thread *td) { - struct uio *uio; + struct cryptop_data *cod = NULL; struct cryptop *crp = NULL; struct cryptodesc *crde = NULL, *crda = NULL; int error; @@ -925,19 +943,9 @@ cryptodev_aead( return (EINVAL); } - uio = &cse->uio; - uio->uio_iov = &cse->iovec; - uio->uio_iovcnt = 1; - uio->uio_offset = 0; - uio->uio_resid = caead->aadlen + caead->len + cse->thash->hashsize; - uio->uio_segflg = UIO_SYSSPACE; - uio->uio_rw = UIO_WRITE; - uio->uio_td = td; - uio->uio_iov[0].iov_len = uio->uio_resid; + cod = cod_alloc(cse, caead->aadlen + caead->len + cse->thash->hashsize, + td); - uio->uio_iov[0].iov_base = malloc(uio->uio_iov[0].iov_len, - M_XDATA, M_WAITOK); - crp = crypto_getreq(2); if (crp == NULL) { error = ENOMEM; @@ -953,13 +961,13 @@ cryptodev_aead( crde = crda->crd_next; } - if ((error = copyin(caead->aad, cse->uio.uio_iov[0].iov_base, + if ((error = copyin(caead->aad, cod->uio.uio_iov[0].iov_base, caead->aadlen))) { SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); goto bail; } - if ((error = copyin(caead->src, (char *)cse->uio.uio_iov[0].iov_base + + if ((error = copyin(caead->src, (char *)cod->uio.uio_iov[0].iov_base + caead->aadlen, caead->len))) { SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); goto bail; @@ -996,10 +1004,10 @@ cryptodev_aead( crp->crp_ilen = caead->aadlen + caead->len; crp->crp_flags = CRYPTO_F_IOV | CRYPTO_F_CBIMM | (caead->flags & COP_F_BATCH); - crp->crp_buf = (caddr_t)&cse->uio.uio_iov; - crp->crp_callback = (int (*) (struct cryptop *)) cryptodev_cb; + crp->crp_uio = &cod->uio; + crp->crp_callback = cryptodev_cb; crp->crp_sid = cse->sid; - crp->crp_opaque = (void *)cse; + crp->crp_opaque = cod; if (caead->iv) { if (caead->ivlen > sizeof(crde->crd_iv)) { @@ -1019,7 +1027,7 @@ cryptodev_aead( crde->crd_len -= cse->txform->blocksize; } - if ((error = copyin(caead->tag, (caddr_t)cse->uio.uio_iov[0].iov_base + + if ((error = copyin(caead->tag, (caddr_t)cod->uio.uio_iov[0].iov_base + caead->len + caead->aadlen, cse->thash->hashsize))) { SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); goto bail; @@ -1033,19 +1041,20 @@ again: * entry and the crypto_done callback into us. */ error = crypto_dispatch(crp); - mtx_lock(&cse->lock); - if (error == 0 && (crp->crp_flags & CRYPTO_F_DONE) == 0) - error = msleep(crp, &cse->lock, PWAIT, "crydev", 0); - mtx_unlock(&cse->lock); - if (error != 0) { SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); goto bail; } + mtx_lock(&cse->lock); + while (!cod->done) + mtx_sleep(cod, &cse->lock, PWAIT, "crydev", 0); + mtx_unlock(&cse->lock); + if (crp->crp_etype == EAGAIN) { crp->crp_etype = 0; crp->crp_flags &= ~CRYPTO_F_DONE; + cod->done = false; goto again; } @@ -1055,20 +1064,14 @@ again: goto bail; } - if (cse->error) { - error = cse->error; - SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); - goto bail; - } - if (caead->dst && (error = copyout( - (caddr_t)cse->uio.uio_iov[0].iov_base + caead->aadlen, caead->dst, + (caddr_t)cod->uio.uio_iov[0].iov_base + caead->aadlen, caead->dst, caead->len))) { SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); goto bail; } - if ((error = copyout((caddr_t)cse->uio.uio_iov[0].iov_base + + if ((error = copyout((caddr_t)cod->uio.uio_iov[0].iov_base + caead->aadlen + caead->len, caead->tag, cse->thash->hashsize))) { SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); goto bail; @@ -1076,21 +1079,26 @@ again: bail: crypto_freereq(crp); - free(cse->uio.uio_iov[0].iov_base, M_XDATA); + if (cod) + cod_free(cod); return (error); } static int -cryptodev_cb(void *op) +cryptodev_cb(struct cryptop *crp) { - struct cryptop *crp = (struct cryptop *) op; - struct csession *cse = (struct csession *)crp->crp_opaque; + struct cryptop_data *cod = crp->crp_opaque; - mtx_lock(&cse->lock); - cse->error = crp->crp_etype; - wakeup_one(crp); - mtx_unlock(&cse->lock); + /* + * Lock to ensure the wakeup() is not missed by the loops + * waiting on cod->done in cryptodev_op() and + * cryptodev_aead(). + */ + mtx_lock(&cod->cse->lock); + cod->done = true; + mtx_unlock(&cod->cse->lock); + wakeup(cod); return (0); } From owner-svn-src-all@freebsd.org Mon Mar 11 22:23:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25F311530F22; Mon, 11 Mar 2019 22:23:59 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BB58E871AB; Mon, 11 Mar 2019 22:23:58 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ACAB6192FF; Mon, 11 Mar 2019 22:23:58 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BMNwXm065410; Mon, 11 Mar 2019 22:23:58 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BMNufA065400; Mon, 11 Mar 2019 22:23:56 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201903112223.x2BMNufA065400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 11 Mar 2019 22:23:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345034 - in head: libexec/tftpd/tests tests/sys/geom/class/eli tests/sys/geom/class/nop tests/sys/geom/class/part tests/sys/kern usr.bin/cmp/tests usr.bin/dc/tests usr.bin/pr/tests usr... X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head: libexec/tftpd/tests tests/sys/geom/class/eli tests/sys/geom/class/nop tests/sys/geom/class/part tests/sys/kern usr.bin/cmp/tests usr.bin/dc/tests usr.bin/pr/tests usr.bin/tail/tests usr.sbin/... X-SVN-Commit-Revision: 345034 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BB58E871AB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 22:23:59 -0000 Author: asomers Date: Mon Mar 11 22:23:56 2019 New Revision: 345034 URL: https://svnweb.freebsd.org/changeset/base/345034 Log: Drop "All rights reserved" from the files I own Also, add SPDX tags where needed. MFC after: 2 weeks Modified: head/libexec/tftpd/tests/functional.c head/tests/sys/geom/class/eli/misc_test.sh head/tests/sys/geom/class/nop/nop_test.sh head/tests/sys/geom/class/part/misc.sh head/tests/sys/kern/unix_socketpair_test.c head/usr.bin/cmp/tests/cmp_test2.sh head/usr.bin/dc/tests/bcode.sh head/usr.bin/dc/tests/inout.sh head/usr.bin/pr/tests/basic2_test.sh head/usr.bin/tail/tests/tail_test.sh head/usr.sbin/fstyp/tests/fstyp_test.sh Modified: head/libexec/tftpd/tests/functional.c ============================================================================== --- head/libexec/tftpd/tests/functional.c Mon Mar 11 22:17:53 2019 (r345033) +++ head/libexec/tftpd/tests/functional.c Mon Mar 11 22:23:56 2019 (r345034) @@ -1,7 +1,8 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2018 Alan Somers. All rights reserved. + * Copyright (c) 2018 Alan Somers. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: head/tests/sys/geom/class/eli/misc_test.sh ============================================================================== --- head/tests/sys/geom/class/eli/misc_test.sh Mon Mar 11 22:17:53 2019 (r345033) +++ head/tests/sys/geom/class/eli/misc_test.sh Mon Mar 11 22:23:56 2019 (r345034) @@ -1,5 +1,6 @@ +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# # Copyright (c) 2018 Alan Somers -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/tests/sys/geom/class/nop/nop_test.sh ============================================================================== --- head/tests/sys/geom/class/nop/nop_test.sh Mon Mar 11 22:17:53 2019 (r345033) +++ head/tests/sys/geom/class/nop/nop_test.sh Mon Mar 11 22:23:56 2019 (r345034) @@ -1,5 +1,6 @@ +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# # Copyright (c) 2016 Alan Somers -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/tests/sys/geom/class/part/misc.sh ============================================================================== --- head/tests/sys/geom/class/part/misc.sh Mon Mar 11 22:17:53 2019 (r345033) +++ head/tests/sys/geom/class/part/misc.sh Mon Mar 11 22:23:56 2019 (r345034) @@ -1,5 +1,6 @@ +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# # Copyright (c) 2018 Alan Somers -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/tests/sys/kern/unix_socketpair_test.c ============================================================================== --- head/tests/sys/kern/unix_socketpair_test.c Mon Mar 11 22:17:53 2019 (r345033) +++ head/tests/sys/kern/unix_socketpair_test.c Mon Mar 11 22:23:56 2019 (r345034) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2018 Alan Somers * * Redistribution and use in source and binary forms, with or without Modified: head/usr.bin/cmp/tests/cmp_test2.sh ============================================================================== --- head/usr.bin/cmp/tests/cmp_test2.sh Mon Mar 11 22:17:53 2019 (r345033) +++ head/usr.bin/cmp/tests/cmp_test2.sh Mon Mar 11 22:23:56 2019 (r345034) @@ -1,5 +1,6 @@ +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# # Copyright (c) 2017 Alan Somers -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.bin/dc/tests/bcode.sh ============================================================================== --- head/usr.bin/dc/tests/bcode.sh Mon Mar 11 22:17:53 2019 (r345033) +++ head/usr.bin/dc/tests/bcode.sh Mon Mar 11 22:23:56 2019 (r345034) @@ -1,7 +1,6 @@ # SPDX-License-Identifier: BSD-2-Clause-FreeBSD # # Copyright (c) 2017 Alan Somers -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.bin/dc/tests/inout.sh ============================================================================== --- head/usr.bin/dc/tests/inout.sh Mon Mar 11 22:17:53 2019 (r345033) +++ head/usr.bin/dc/tests/inout.sh Mon Mar 11 22:23:56 2019 (r345034) @@ -1,7 +1,6 @@ # SPDX-License-Identifier: BSD-2-Clause-FreeBSD # # Copyright (c) 2017 Alan Somers -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.bin/pr/tests/basic2_test.sh ============================================================================== --- head/usr.bin/pr/tests/basic2_test.sh Mon Mar 11 22:17:53 2019 (r345033) +++ head/usr.bin/pr/tests/basic2_test.sh Mon Mar 11 22:23:56 2019 (r345034) @@ -1,5 +1,6 @@ +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# # Copyright (c) 2017 Alan Somers -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.bin/tail/tests/tail_test.sh ============================================================================== --- head/usr.bin/tail/tests/tail_test.sh Mon Mar 11 22:17:53 2019 (r345033) +++ head/usr.bin/tail/tests/tail_test.sh Mon Mar 11 22:23:56 2019 (r345034) @@ -1,5 +1,6 @@ +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# # Copyright (c) 2016 Alan Somers -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/fstyp/tests/fstyp_test.sh ============================================================================== --- head/usr.sbin/fstyp/tests/fstyp_test.sh Mon Mar 11 22:17:53 2019 (r345033) +++ head/usr.sbin/fstyp/tests/fstyp_test.sh Mon Mar 11 22:23:56 2019 (r345034) @@ -1,7 +1,8 @@ #!/bin/sh # +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# # Copyright (c) 2015 Alan Somers -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions From owner-svn-src-all@freebsd.org Mon Mar 11 22:42:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CD761531489; Mon, 11 Mar 2019 22:42:34 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B180A87DC8; Mon, 11 Mar 2019 22:42:33 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E1C919684; Mon, 11 Mar 2019 22:42:33 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BMgXNr076317; Mon, 11 Mar 2019 22:42:33 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BMgXDm076316; Mon, 11 Mar 2019 22:42:33 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201903112242.x2BMgXDm076316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Mon, 11 Mar 2019 22:42:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345037 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 345037 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B180A87DC8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 22:42:34 -0000 Author: mckusick Date: Mon Mar 11 22:42:33 2019 New Revision: 345037 URL: https://svnweb.freebsd.org/changeset/base/345037 Log: Update the main loop in the flushbuflist() routine to properly select buffers for flushing when requested to flush both normal and extended attributes buffers. Sponsored by: Netflix Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Mon Mar 11 22:39:06 2019 (r345036) +++ head/sys/kern/vfs_subr.c Mon Mar 11 22:42:33 2019 (r345037) @@ -1756,8 +1756,16 @@ flushbuflist(struct bufv *bufv, int flags, struct bufo retval = 0; TAILQ_FOREACH_SAFE(bp, &bufv->bv_hd, b_bobufs, nbp) { - if (((flags & V_NORMAL) && (bp->b_xflags & BX_ALTDATA)) || - ((flags & V_ALT) && (bp->b_xflags & BX_ALTDATA) == 0)) { + /* + * If we are flushing both V_NORMAL and V_ALT buffers then + * do not skip any buffers. If we are flushing only V_NORMAL + * buffers then skip buffers marked as BX_ALTDATA. If we are + * flushing only V_ALT buffers then skip buffers not marked + * as BX_ALTDATA. + */ + if (((flags & (V_NORMAL | V_ALT)) != (V_NORMAL | V_ALT)) && + (((flags & V_NORMAL) && (bp->b_xflags & BX_ALTDATA) != 0) || + ((flags & V_ALT) && (bp->b_xflags & BX_ALTDATA) == 0))) { continue; } if (nbp != NULL) { From owner-svn-src-all@freebsd.org Mon Mar 11 22:48:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D099F15315AB; Mon, 11 Mar 2019 22:48:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6E652880FE; Mon, 11 Mar 2019 22:48:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 60E2D196B8; Mon, 11 Mar 2019 22:48:52 +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 x2BMmqAs076752; Mon, 11 Mar 2019 22:48:52 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BMmptp076749; Mon, 11 Mar 2019 22:48:51 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903112248.x2BMmptp076749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 11 Mar 2019 22:48: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: r345039 - in stable/11: share/man/man9 sys/kern sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable/11: share/man/man9 sys/kern sys/sys X-SVN-Commit-Revision: 345039 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6E652880FE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 22:48:53 -0000 Author: jhb Date: Mon Mar 11 22:48:51 2019 New Revision: 345039 URL: https://svnweb.freebsd.org/changeset/base/345039 Log: MFC 318388: Add sglist_append_sglist(). This function permits a range of one scatter/gather list to be appended to another sglist. This can be used to construct a scatter/gather list that reorders or duplicates ranges from one or more existing scatter/gather lists. Sponsored by: Chelsio Communications Modified: stable/11/share/man/man9/Makefile stable/11/share/man/man9/sglist.9 stable/11/sys/kern/subr_sglist.c stable/11/sys/sys/sglist.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/Makefile ============================================================================== --- stable/11/share/man/man9/Makefile Mon Mar 11 22:43:24 2019 (r345038) +++ stable/11/share/man/man9/Makefile Mon Mar 11 22:48:51 2019 (r345039) @@ -1593,6 +1593,7 @@ MLINKS+=sglist.9 sglist_alloc.9 \ sglist.9 sglist_append_bio.9 \ sglist.9 sglist_append_mbuf.9 \ sglist.9 sglist_append_phys.9 \ + sglist.9 sglist_append_sglist.9 \ sglist.9 sglist_append_uio.9 \ sglist.9 sglist_append_user.9 \ sglist.9 sglist_append_vmpages.9 \ Modified: stable/11/share/man/man9/sglist.9 ============================================================================== --- stable/11/share/man/man9/sglist.9 Mon Mar 11 22:43:24 2019 (r345038) +++ stable/11/share/man/man9/sglist.9 Mon Mar 11 22:48:51 2019 (r345039) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 12, 2014 +.Dd May 16, 2017 .Dt SGLIST 9 .Os .Sh NAME @@ -36,6 +36,7 @@ .Nm sglist_append_bio , .Nm sglist_append_mbuf , .Nm sglist_append_phys , +.Nm sglist_append_sglist , .Nm sglist_append_uio , .Nm sglist_append_user , .Nm sglist_append_vmpages , @@ -67,6 +68,8 @@ .Ft int .Fn sglist_append_phys "struct sglist *sg" "vm_paddr_t paddr" "size_t len" .Ft int +.Fn sglist_append_sglist "struct sglist *sg" "struct sglist *source" "size_t offset" "size_t len" +.Ft int .Fn sglist_append_uio "struct sglist *sg" "struct uio *uio" .Ft int .Fn sglist_append_user "struct sglist *sg" "void *buf" "size_t len" "struct thread *td" @@ -250,6 +253,20 @@ The physical address range starts at and is .Fa len bytes long. +.Pp +The +.Nm sglist_append_sglist +function appends physical address ranges described by the scatter/gather list +.Fa source +to the scatter/gather list +.Fa sg . +The physical address ranges start at offset +.Fa offset +within +.Fa source +and continue for +.Fa len +bytes. .Pp The .Nm sglist_append_uio Modified: stable/11/sys/kern/subr_sglist.c ============================================================================== --- stable/11/sys/kern/subr_sglist.c Mon Mar 11 22:43:24 2019 (r345038) +++ stable/11/sys/kern/subr_sglist.c Mon Mar 11 22:48:51 2019 (r345039) @@ -413,6 +413,49 @@ sglist_append_user(struct sglist *sg, void *buf, size_ } /* + * Append a subset of an existing scatter/gather list 'source' to a + * the scatter/gather list 'sg'. If there are insufficient segments, + * then this fails with EFBIG. + */ +int +sglist_append_sglist(struct sglist *sg, struct sglist *source, size_t offset, + size_t length) +{ + struct sgsave save; + struct sglist_seg *ss; + size_t seglen; + int error, i; + + if (sg->sg_maxseg == 0 || length == 0) + return (EINVAL); + SGLIST_SAVE(sg, save); + error = EINVAL; + ss = &sg->sg_segs[sg->sg_nseg - 1]; + for (i = 0; i < source->sg_nseg; i++) { + if (offset >= source->sg_segs[i].ss_len) { + offset -= source->sg_segs[i].ss_len; + continue; + } + seglen = source->sg_segs[i].ss_len - offset; + if (seglen > length) + seglen = length; + error = _sglist_append_range(sg, &ss, + source->sg_segs[i].ss_paddr + offset, seglen); + if (error) + break; + offset = 0; + length -= seglen; + if (length == 0) + break; + } + if (length != 0) + error = EINVAL; + if (error) + SGLIST_RESTORE(sg, save); + return (error); +} + +/* * Append the segments that describe a single uio to a scatter/gather * list. If there are insufficient segments, then this fails with * EFBIG. Modified: stable/11/sys/sys/sglist.h ============================================================================== --- stable/11/sys/sys/sglist.h Mon Mar 11 22:43:24 2019 (r345038) +++ stable/11/sys/sys/sglist.h Mon Mar 11 22:48:51 2019 (r345039) @@ -88,6 +88,8 @@ int sglist_append_bio(struct sglist *sg, struct bio *b int sglist_append_mbuf(struct sglist *sg, struct mbuf *m0); int sglist_append_phys(struct sglist *sg, vm_paddr_t paddr, size_t len); +int sglist_append_sglist(struct sglist *sg, struct sglist *source, + size_t offset, size_t length); int sglist_append_uio(struct sglist *sg, struct uio *uio); int sglist_append_user(struct sglist *sg, void *buf, size_t len, struct thread *td); From owner-svn-src-all@freebsd.org Mon Mar 11 23:16:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E02E1531EAE; Mon, 11 Mar 2019 23:16:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D12088E96; Mon, 11 Mar 2019 23:16:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EEE8D19C0C; Mon, 11 Mar 2019 23:16:11 +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 x2BNGBBd092515; Mon, 11 Mar 2019 23:16:11 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BNGA4b092507; Mon, 11 Mar 2019 23:16:10 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903112316.x2BNGA4b092507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 11 Mar 2019 23:16: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: r345040 - in stable/11: share/man/man4 sys/conf sys/dev/cxgbe sys/dev/cxgbe/crypto sys/dev/cxgbe/firmware sys/modules/cxgbe sys/modules/cxgbe/ccr sys/powerpc/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable/11: share/man/man4 sys/conf sys/dev/cxgbe sys/dev/cxgbe/crypto sys/dev/cxgbe/firmware sys/modules/cxgbe sys/modules/cxgbe/ccr sys/powerpc/conf X-SVN-Commit-Revision: 345040 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0D12088E96 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 23:16:12 -0000 Author: jhb Date: Mon Mar 11 23:16:10 2019 New Revision: 345040 URL: https://svnweb.freebsd.org/changeset/base/345040 Log: MFC 318429,318967,319721,319723,323600,323724,328353-328361,330042,343056: Add a driver for the Chelsio T6 crypto accelerator engine. Note that with the set of commits in this batch, no additional tunables are needed to use the driver once it is loaded. 318429: Add a driver for the Chelsio T6 crypto accelerator engine. The ccr(4) driver supports use of the crypto accelerator engine on Chelsio T6 NICs in "lookaside" mode via the opencrypto framework. Currently, the driver supports AES-CBC, AES-CTR, AES-GCM, and AES-XTS cipher algorithms as well as the SHA1-HMAC, SHA2-256-HMAC, SHA2-384-HMAC, and SHA2-512-HMAC authentication algorithms. The driver also supports chaining one of AES-CBC, AES-CTR, or AES-XTS with an authentication algorithm for encrypt-then-authenticate operations. Note that this driver is still under active development and testing and may not yet be ready for production use. It does pass the tests in tests/sys/opencrypto with the exception that the AES-GCM implementation in the driver does not yet support requests with a zero byte payload. To use this driver currently, the "uwire" configuration must be used along with explicitly enabling support for lookaside crypto capabilities in the cxgbe(4) driver. These can be done by setting the following tunables before loading the cxgbe(4) driver: hw.cxgbe.config_file=uwire hw.cxgbe.cryptocaps_allowed=-1 318967: Fail large requests with EFBIG. The adapter firmware in general does not accept PDUs larger than 64k - 1 bytes in size. Sending crypto requests larger than this size result in hangs or incorrect output, so reject them with EFBIG. For requests chaining an AES cipher with an HMAC, the firmware appears to require slightly smaller requests (around 512 bytes). 319721: Add explicit handling for requests with an empty payload. - For HMAC requests, construct a special input buffer to request an empty hash result. - For plain cipher requests and requests that chain an AES cipher with an HMAC, fail with EINVAL if there is no cipher payload. If needed in the future, chained requests that only contain AAD could be serviced as HMAC-only requests. - For GCM requests, the hardware does not support generating the tag for an AAD-only request. Instead, complete these requests synchronously in software on the assumption that such requests are rare. 319723: Fix the software fallback for GCM to validate the existing tag for decrypts. 323600: Fix some incorrect sysctl pointers for some error stats. The bad_session, sglist_error, and process_error sysctl nodes were returning the value of the pad_error node instead of the appropriate error counters. 323724: Enable support for lookaside crypto operations by default. This permits ccr(4) to be used with the default firmware configuration file. 328353: Always store the IV in the immediate portion of a work request. Combined authentication-encryption and GCM requests already stored the IV in the immediate explicitly. This extends this behavior to block cipher requests to work around a firmware bug. While here, simplify the AEAD and GCM handlers to not include always-true conditions. 328354: Always set the IV location to IV_NOP. The firmware ignores this field in the FW_CRYPTO_LOOKASIDE_WR work request. 328355: Reject requests with AAD and IV larger than 511 bytes. The T6 crypto engine's control messages only support a total AAD length (including the prefixed IV) of 511 bytes. Reject requests with large AAD rather than returning incorrect results. 328356: Don't discard AAD and IV output data for AEAD requests. The T6 can hang when processing certain AEAD requests if the request sets a flag asking the crypto engine to discard the input IV and AAD rather than copying them into the output buffer. The existing driver always discards the IV and AAD as we do not need it. As a workaround, allocate a single "dummy" buffer when the ccr driver attaches and change all AEAD requests to write the IV and AAD to this scratch buffer. The contents of the scratch buffer are never used (similar to "bogus_page"), and it is ok for multiple in-flight requests to share this dummy buffer. 328357: Fail crypto requests when the resulting work request is too large. Most crypto requests will not trigger this condition, but a request with a highly-fragmented data buffer (and a resulting "large" S/G list) could trigger it. 328358: Clamp DSGL entries to a length of 2KB. This works around an issue in the T6 that can result in DMA engine stalls if an error occurs while processing a DSGL entry with a length larger than 2KB. 328359: Expand the software fallback for GCM to cover more cases. - Extend ccr_gcm_soft() to handle requests with a non-empty payload. While here, switch to allocating the GMAC context instead of placing it on the stack since it is over 1KB in size. - Allow ccr_gcm() to return a special error value (EMSGSIZE) which triggers a fallback to ccr_gcm_soft(). Move the existing empty payload check into ccr_gcm() and change a few other cases (e.g. large AAD) to fallback to software via EMSGSIZE as well. - Add a new 'sw_fallback' stat to count the number of requests processed via the software fallback. 328360: Don't read or generate an IV until all error checking is complete. In particular, this avoids edge cases where a generated IV might be written into the output buffer even though the request is failed with an error. 328361: Store IV in output buffer in GCM software fallback when requested. Properly honor the lack of the CRD_F_IV_PRESENT flag in the GCM software fallback case for encryption requests. 330042: Don't overflow the ipad[] array when clearing the remainder. After the auth key is copied into the ipad[] array, any remaining bytes are cleared to zero (in case the key is shorter than one block size). The full block size was used as the length of the zero rather than the size of the remaining ipad[]. In practice this overflow was harmless as it could only clear bytes in the following opad[] array which is initialized with a copy of ipad[] in the next statement. 343056: Reject new sessions if the necessary queues aren't initialized. ccr reuses the control queue and first rx queue from the first port on each adapter. The driver cannot send requests until those queues are initialized. Refuse to create sessions for now if the queues aren't ready. This is a workaround until cxgbe allocates one or more dedicated queues for ccr. Relnotes: yes Sponsored by: Chelsio Communications Added: stable/11/share/man/man4/ccr.4 - copied unchanged from r318429, head/share/man/man4/ccr.4 stable/11/sys/dev/cxgbe/crypto/ - copied from r318429, head/sys/dev/cxgbe/crypto/ stable/11/sys/modules/cxgbe/ccr/ - copied from r318429, head/sys/modules/cxgbe/ccr/ Modified: stable/11/share/man/man4/Makefile stable/11/share/man/man4/cxgbe.4 stable/11/sys/conf/NOTES stable/11/sys/conf/files stable/11/sys/dev/cxgbe/adapter.h stable/11/sys/dev/cxgbe/crypto/t4_crypto.c stable/11/sys/dev/cxgbe/firmware/t6fw_cfg.txt stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/modules/cxgbe/Makefile stable/11/sys/powerpc/conf/NOTES Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/Makefile ============================================================================== --- stable/11/share/man/man4/Makefile Mon Mar 11 22:48:51 2019 (r345039) +++ stable/11/share/man/man4/Makefile Mon Mar 11 23:16:10 2019 (r345040) @@ -101,6 +101,7 @@ MAN= aac.4 \ cc_newreno.4 \ cc_vegas.4 \ ${_ccd.4} \ + ccr.4 \ cd.4 \ cdce.4 \ cfi.4 \ Copied: stable/11/share/man/man4/ccr.4 (from r318429, head/share/man/man4/ccr.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/share/man/man4/ccr.4 Mon Mar 11 23:16:10 2019 (r345040, copy of r318429, head/share/man/man4/ccr.4) @@ -0,0 +1,110 @@ +.\" Copyright (c) 2017, Chelsio Inc +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd May 16, 2017 +.Dt CCR 4 +.Os +.Sh NAME +.Nm ccr +.Nd "Chelsio T6 crypto accelerator driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indeunt +.Cd "device ccr" +.Ed +.Pp +To load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +ccr_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the crypto accelerator engine included on +PCI Express Ethernet adapters based on the Chelsio Terminator 6 ASIC (T6). +The driver accelerates AES-CBC, AES-CTR, AES-GCM, AES-XTS, SHA1-HMAC, +SHA2-256-HMAC, SHA2-384-HMAC, and SHA2-512-HMAC operations for +.Xr crypto 4 +and +.Xr ipsec 4 . +The driver also supports chaining one of AES-CBC, AES-CTR, or AES-XTS with +SHA1-HMAC, SHA2-256-HMAC, SHA2-384-HMAC, or SHA2-512-HMAC for +encrypt-then-authenticate operations. +For further hardware information and questions related to hardware +requirements, see +.Pa http://www.chelsio.com/ . +.Pp +The +.Nm +driver attaches as a child of an existing Chelsio NIC device and thus +requires that the +.Xr cxgbe 4 +driver be active. +.Sh HARDWARE +The +.Nm +driver supports the crypto accelerator engine included on adapters +based on the T6 ASIC: +.Pp +.Bl -bullet -compact +.It +Chelsio T6225-CR +.It +Chelsio T6225-SO-CR +.It +Chelsio T62100-LP-CR +.It +Chelsio T62100-SO-CR +.It +Chelsio T62100-CR +.El +.Sh SUPPORT +For general information and support, +go to the Chelsio support website at: +.Pa http://www.chelsio.com/ . +.Pp +If an issue is identified with this driver with a supported adapter, +email all the specific information related to the issue to +.Aq Mt support@chelsio.com . +.Sh SEE ALSO +.Xr crypto 4 , +.Xr cxgbe 4 , +.Xr ipsec 4 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 12.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An John Baldwin Aq Mt jhb@FreeBSD.org . Modified: stable/11/share/man/man4/cxgbe.4 ============================================================================== --- stable/11/share/man/man4/cxgbe.4 Mon Mar 11 22:48:51 2019 (r345039) +++ stable/11/share/man/man4/cxgbe.4 Mon Mar 11 23:16:10 2019 (r345040) @@ -363,6 +363,7 @@ email all the specific information related to the issu .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , +.Xr ccr 4 , .Xr cxgb 4 , .Xr cxgbev 4 , .Xr netintro 4 , Modified: stable/11/sys/conf/NOTES ============================================================================== --- stable/11/sys/conf/NOTES Mon Mar 11 22:48:51 2019 (r345039) +++ stable/11/sys/conf/NOTES Mon Mar 11 23:16:10 2019 (r345040) @@ -2884,6 +2884,8 @@ device cryptodev # /dev/crypto for access to h/w device rndtest # FIPS 140-2 entropy tester +device ccr # Chelsio T6 + device hifn # Hifn 7951, 7781, etc. options HIFN_DEBUG # enable debugging support: hw.hifn.debug options HIFN_RNDTEST # enable rndtest support Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Mon Mar 11 22:48:51 2019 (r345039) +++ stable/11/sys/conf/files Mon Mar 11 23:16:10 2019 (r345040) @@ -1456,6 +1456,8 @@ t6fw.fw optional cxgbe \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t6fw.fw" +dev/cxgbe/crypto/t4_crypto.c optional ccr \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cy/cy.c optional cy dev/cy/cy_isa.c optional cy isa dev/cy/cy_pci.c optional cy pci Modified: stable/11/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/11/sys/dev/cxgbe/adapter.h Mon Mar 11 22:48:51 2019 (r345039) +++ stable/11/sys/dev/cxgbe/adapter.h Mon Mar 11 23:16:10 2019 (r345040) @@ -802,6 +802,7 @@ struct adapter { struct iw_tunables iwt; void *iwarp_softc; /* (struct c4iw_dev *) */ void *iscsi_ulp_softc; /* (struct cxgbei_data *) */ + void *ccr_softc; /* (struct ccr_softc *) */ struct l2t_data *l2t; /* L2 table */ struct tid_info tids; Modified: stable/11/sys/dev/cxgbe/crypto/t4_crypto.c ============================================================================== --- head/sys/dev/cxgbe/crypto/t4_crypto.c Wed May 17 22:13:07 2017 (r318429) +++ stable/11/sys/dev/cxgbe/crypto/t4_crypto.c Mon Mar 11 23:16:10 2019 (r345040) @@ -111,12 +111,26 @@ __FBSDID("$FreeBSD$"); */ /* - * The documentation for CPL_RX_PHYS_DSGL claims a maximum of 32 - * SG entries. + * The crypto engine supports a maximum AAD size of 511 bytes. */ +#define MAX_AAD_LEN 511 + +/* + * The documentation for CPL_RX_PHYS_DSGL claims a maximum of 32 SG + * entries. While the CPL includes a 16-bit length field, the T6 can + * sometimes hang if an error occurs while processing a request with a + * single DSGL entry larger than 2k. + */ #define MAX_RX_PHYS_DSGL_SGE 32 -#define DSGL_SGE_MAXLEN 65535 +#define DSGL_SGE_MAXLEN 2048 +/* + * The adapter only supports requests with a total input or output + * length of 64k-1 or smaller. Longer requests either result in hung + * requests or incorrect results. + */ +#define MAX_REQUEST_SIZE 65535 + static MALLOC_DEFINE(M_CCR, "ccr", "Chelsio T6 crypto"); struct ccr_session_hmac { @@ -178,6 +192,13 @@ struct ccr_softc { struct sglist *sg_ulptx; struct sglist *sg_dsgl; + /* + * Pre-allocate a dummy output buffer for the IV and AAD for + * AEAD requests. + */ + char *iv_aad_buf; + struct sglist *sg_iv_aad; + /* Statistics. */ uint64_t stats_blkcipher_encrypt; uint64_t stats_blkcipher_decrypt; @@ -193,6 +214,7 @@ struct ccr_softc { uint64_t stats_bad_session; uint64_t stats_sglist_error; uint64_t stats_process_error; + uint64_t stats_sw_fallback; }; /* @@ -358,7 +380,7 @@ ccr_use_imm_data(u_int transhdr_len, u_int input_len) static void ccr_populate_wreq(struct ccr_softc *sc, struct chcr_wr *crwr, u_int kctx_len, u_int wr_len, uint32_t sid, u_int imm_len, u_int sgl_len, u_int hash_size, - u_int iv_loc, struct cryptop *crp) + struct cryptop *crp) { u_int cctx_size; @@ -376,7 +398,7 @@ ccr_populate_wreq(struct ccr_softc *sc, struct chcr_wr V_FW_CRYPTO_LOOKASIDE_WR_RX_CHID(sc->tx_channel_id) | V_FW_CRYPTO_LOOKASIDE_WR_LCB(0) | V_FW_CRYPTO_LOOKASIDE_WR_PHASH(0) | - V_FW_CRYPTO_LOOKASIDE_WR_IV(iv_loc) | + V_FW_CRYPTO_LOOKASIDE_WR_IV(IV_NOP) | V_FW_CRYPTO_LOOKASIDE_WR_FQIDX(0) | V_FW_CRYPTO_LOOKASIDE_WR_TX_CH(0) | V_FW_CRYPTO_LOOKASIDE_WR_RX_Q_ID(sc->rxq->iq.abs_id)); @@ -412,6 +434,12 @@ ccr_hmac(struct ccr_softc *sc, uint32_t sid, struct cc u_int imm_len, iopad_size; int error, sgl_nsegs, sgl_len; + crd = crp->crp_desc; + + /* Reject requests with too large of an input buffer. */ + if (crd->crd_len > MAX_REQUEST_SIZE) + return (EFBIG); + axf = s->hmac.auth_hash; /* PADs must be 128-bit aligned. */ @@ -425,8 +453,11 @@ ccr_hmac(struct ccr_softc *sc, uint32_t sid, struct cc hash_size_in_response = axf->hashsize; transhdr_len = HASH_TRANSHDR_SIZE(kctx_len); - crd = crp->crp_desc; - if (ccr_use_imm_data(transhdr_len, crd->crd_len)) { + if (crd->crd_len == 0) { + imm_len = axf->blocksize; + sgl_nsegs = 0; + sgl_len = 0; + } else if (ccr_use_imm_data(transhdr_len, crd->crd_len)) { imm_len = crd->crd_len; sgl_nsegs = 0; sgl_len = 0; @@ -442,6 +473,8 @@ ccr_hmac(struct ccr_softc *sc, uint32_t sid, struct cc } wr_len = roundup2(transhdr_len, 16) + roundup2(imm_len, 16) + sgl_len; + if (wr_len > SGE_MAX_WR_LEN) + return (EFBIG); wr = alloc_wrqe(wr_len, sc->txq); if (wr == NULL) { sc->stats_wr_nomem++; @@ -451,7 +484,7 @@ ccr_hmac(struct ccr_softc *sc, uint32_t sid, struct cc memset(crwr, 0, wr_len); ccr_populate_wreq(sc, crwr, kctx_len, wr_len, sid, imm_len, sgl_len, - hash_size_in_response, IV_NOP, crp); + hash_size_in_response, crp); /* XXX: Hardcodes SGE loopback channel of 0. */ crwr->sec_cpl.op_ivinsrtofst = htobe32( @@ -461,7 +494,8 @@ ccr_hmac(struct ccr_softc *sc, uint32_t sid, struct cc V_CPL_TX_SEC_PDU_CPLLEN(2) | V_CPL_TX_SEC_PDU_PLACEHOLDER(0) | V_CPL_TX_SEC_PDU_IVINSRTOFST(0)); - crwr->sec_cpl.pldlen = htobe32(crd->crd_len); + crwr->sec_cpl.pldlen = htobe32(crd->crd_len == 0 ? axf->blocksize : + crd->crd_len); crwr->sec_cpl.cipherstop_lo_authinsert = htobe32( V_CPL_TX_SEC_PDU_AUTHSTART(1) | V_CPL_TX_SEC_PDU_AUTHSTOP(0)); @@ -474,7 +508,8 @@ ccr_hmac(struct ccr_softc *sc, uint32_t sid, struct cc V_SCMD_AUTH_MODE(s->hmac.auth_mode) | V_SCMD_HMAC_CTRL(CHCR_SCMD_HMAC_CTRL_NO_TRUNC)); crwr->sec_cpl.ivgen_hdrlen = htobe32( - V_SCMD_LAST_FRAG(0) | V_SCMD_MORE_FRAGS(0) | V_SCMD_MAC_ONLY(1)); + V_SCMD_LAST_FRAG(0) | + V_SCMD_MORE_FRAGS(crd->crd_len == 0 ? 1 : 0) | V_SCMD_MAC_ONLY(1)); memcpy(crwr->key_ctx.key, s->hmac.ipad, s->hmac.partial_digest_len); memcpy(crwr->key_ctx.key + iopad_size, s->hmac.opad, @@ -488,7 +523,11 @@ ccr_hmac(struct ccr_softc *sc, uint32_t sid, struct cc V_KEY_CONTEXT_MK_SIZE(s->hmac.mk_size) | V_KEY_CONTEXT_VALID(1)); dst = (char *)(crwr + 1) + kctx_len + DUMMY_BYTES; - if (imm_len != 0) + if (crd->crd_len == 0) { + dst[0] = 0x80; + *(uint64_t *)(dst + axf->blocksize - sizeof(uint64_t)) = + htobe64(axf->blocksize << 3); + } else if (imm_len != 0) crypto_copydata(crp->crp_flags, crp->crp_buf, crd->crd_skip, crd->crd_len, dst); else @@ -524,7 +563,7 @@ ccr_blkcipher(struct ccr_softc *sc, uint32_t sid, stru struct wrqe *wr; struct cryptodesc *crd; char *dst; - u_int iv_loc, kctx_len, key_half, op_type, transhdr_len, wr_len; + u_int kctx_len, key_half, op_type, transhdr_len, wr_len; u_int imm_len; int dsgl_nsegs, dsgl_len; int sgl_nsegs, sgl_len; @@ -532,32 +571,21 @@ ccr_blkcipher(struct ccr_softc *sc, uint32_t sid, stru crd = crp->crp_desc; - if (s->blkcipher.key_len == 0) + if (s->blkcipher.key_len == 0 || crd->crd_len == 0) return (EINVAL); if (crd->crd_alg == CRYPTO_AES_CBC && (crd->crd_len % AES_BLOCK_LEN) != 0) return (EINVAL); - iv_loc = IV_NOP; - if (crd->crd_flags & CRD_F_ENCRYPT) { + /* Reject requests with too large of an input buffer. */ + if (crd->crd_len > MAX_REQUEST_SIZE) + return (EFBIG); + + if (crd->crd_flags & CRD_F_ENCRYPT) op_type = CHCR_ENCRYPT_OP; - if (crd->crd_flags & CRD_F_IV_EXPLICIT) - memcpy(iv, crd->crd_iv, s->blkcipher.iv_len); - else - arc4rand(iv, s->blkcipher.iv_len, 0); - iv_loc = IV_IMMEDIATE; - if ((crd->crd_flags & CRD_F_IV_PRESENT) == 0) - crypto_copyback(crp->crp_flags, crp->crp_buf, - crd->crd_inject, s->blkcipher.iv_len, iv); - } else { + else op_type = CHCR_DECRYPT_OP; - if (crd->crd_flags & CRD_F_IV_EXPLICIT) { - memcpy(iv, crd->crd_iv, s->blkcipher.iv_len); - iv_loc = IV_IMMEDIATE; - } else - iv_loc = IV_DSGL; - } - + sglist_reset(sc->sg_dsgl); error = sglist_append_sglist(sc->sg_dsgl, sc->sg_crp, crd->crd_skip, crd->crd_len); @@ -575,22 +603,11 @@ ccr_blkcipher(struct ccr_softc *sc, uint32_t sid, stru if (ccr_use_imm_data(transhdr_len, crd->crd_len + s->blkcipher.iv_len)) { imm_len = crd->crd_len; - if (iv_loc == IV_DSGL) { - crypto_copydata(crp->crp_flags, crp->crp_buf, - crd->crd_inject, s->blkcipher.iv_len, iv); - iv_loc = IV_IMMEDIATE; - } sgl_nsegs = 0; sgl_len = 0; } else { imm_len = 0; sglist_reset(sc->sg_ulptx); - if (iv_loc == IV_DSGL) { - error = sglist_append_sglist(sc->sg_ulptx, sc->sg_crp, - crd->crd_inject, s->blkcipher.iv_len); - if (error) - return (error); - } error = sglist_append_sglist(sc->sg_ulptx, sc->sg_crp, crd->crd_skip, crd->crd_len); if (error) @@ -599,9 +616,10 @@ ccr_blkcipher(struct ccr_softc *sc, uint32_t sid, stru sgl_len = ccr_ulptx_sgl_len(sgl_nsegs); } - wr_len = roundup2(transhdr_len, 16) + roundup2(imm_len, 16) + sgl_len; - if (iv_loc == IV_IMMEDIATE) - wr_len += s->blkcipher.iv_len; + wr_len = roundup2(transhdr_len, 16) + s->blkcipher.iv_len + + roundup2(imm_len, 16) + sgl_len; + if (wr_len > SGE_MAX_WR_LEN) + return (EFBIG); wr = alloc_wrqe(wr_len, sc->txq); if (wr == NULL) { sc->stats_wr_nomem++; @@ -610,8 +628,29 @@ ccr_blkcipher(struct ccr_softc *sc, uint32_t sid, stru crwr = wrtod(wr); memset(crwr, 0, wr_len); + /* + * Read the existing IV from the request or generate a random + * one if none is provided. Optionally copy the generated IV + * into the output buffer if requested. + */ + if (op_type == CHCR_ENCRYPT_OP) { + if (crd->crd_flags & CRD_F_IV_EXPLICIT) + memcpy(iv, crd->crd_iv, s->blkcipher.iv_len); + else + arc4rand(iv, s->blkcipher.iv_len, 0); + if ((crd->crd_flags & CRD_F_IV_PRESENT) == 0) + crypto_copyback(crp->crp_flags, crp->crp_buf, + crd->crd_inject, s->blkcipher.iv_len, iv); + } else { + if (crd->crd_flags & CRD_F_IV_EXPLICIT) + memcpy(iv, crd->crd_iv, s->blkcipher.iv_len); + else + crypto_copydata(crp->crp_flags, crp->crp_buf, + crd->crd_inject, s->blkcipher.iv_len, iv); + } + ccr_populate_wreq(sc, crwr, kctx_len, wr_len, sid, imm_len, sgl_len, 0, - iv_loc, crp); + crp); /* XXX: Hardcodes SGE loopback channel of 0. */ crwr->sec_cpl.op_ivinsrtofst = htobe32( @@ -674,10 +713,8 @@ ccr_blkcipher(struct ccr_softc *sc, uint32_t sid, stru dst = (char *)(crwr + 1) + kctx_len; ccr_write_phys_dsgl(sc, dst, dsgl_nsegs); dst += sizeof(struct cpl_rx_phys_dsgl) + dsgl_len; - if (iv_loc == IV_IMMEDIATE) { - memcpy(dst, iv, s->blkcipher.iv_len); - dst += s->blkcipher.iv_len; - } + memcpy(dst, iv, s->blkcipher.iv_len); + dst += s->blkcipher.iv_len; if (imm_len != 0) crypto_copydata(crp->crp_flags, crp->crp_buf, crd->crd_skip, crd->crd_len, dst); @@ -729,7 +766,7 @@ ccr_authenc(struct ccr_softc *sc, uint32_t sid, struct struct wrqe *wr; struct auth_hash *axf; char *dst; - u_int iv_loc, kctx_len, key_half, op_type, transhdr_len, wr_len; + u_int kctx_len, key_half, op_type, transhdr_len, wr_len; u_int hash_size_in_response, imm_len, iopad_size; u_int aad_start, aad_len, aad_stop; u_int auth_start, auth_stop, auth_insert; @@ -739,53 +776,65 @@ ccr_authenc(struct ccr_softc *sc, uint32_t sid, struct int sgl_nsegs, sgl_len; int error; - if (s->blkcipher.key_len == 0) + /* + * If there is a need in the future, requests with an empty + * payload could be supported as HMAC-only requests. + */ + if (s->blkcipher.key_len == 0 || crde->crd_len == 0) return (EINVAL); if (crde->crd_alg == CRYPTO_AES_CBC && (crde->crd_len % AES_BLOCK_LEN) != 0) return (EINVAL); /* - * AAD is only permitted before the cipher/plain text, not - * after. + * Compute the length of the AAD (data covered by the + * authentication descriptor but not the encryption + * descriptor). To simplify the logic, AAD is only permitted + * before the cipher/plain text, not after. This is true of + * all currently-generated requests. */ if (crda->crd_len + crda->crd_skip > crde->crd_len + crde->crd_skip) return (EINVAL); + if (crda->crd_skip < crde->crd_skip) { + if (crda->crd_skip + crda->crd_len > crde->crd_skip) + aad_len = (crde->crd_skip - crda->crd_skip); + else + aad_len = crda->crd_len; + } else + aad_len = 0; + if (aad_len + s->blkcipher.iv_len > MAX_AAD_LEN) + return (EINVAL); axf = s->hmac.auth_hash; hash_size_in_response = s->hmac.hash_len; - - /* - * The IV is always stored at the start of the buffer even - * though it may be duplicated in the payload. The crypto - * engine doesn't work properly if the IV offset points inside - * of the AAD region, so a second copy is always required. - */ - iv_loc = IV_IMMEDIATE; - if (crde->crd_flags & CRD_F_ENCRYPT) { + if (crde->crd_flags & CRD_F_ENCRYPT) op_type = CHCR_ENCRYPT_OP; - if (crde->crd_flags & CRD_F_IV_EXPLICIT) - memcpy(iv, crde->crd_iv, s->blkcipher.iv_len); - else - arc4rand(iv, s->blkcipher.iv_len, 0); - if ((crde->crd_flags & CRD_F_IV_PRESENT) == 0) - crypto_copyback(crp->crp_flags, crp->crp_buf, - crde->crd_inject, s->blkcipher.iv_len, iv); - } else { + else op_type = CHCR_DECRYPT_OP; - if (crde->crd_flags & CRD_F_IV_EXPLICIT) - memcpy(iv, crde->crd_iv, s->blkcipher.iv_len); - else - crypto_copydata(crp->crp_flags, crp->crp_buf, - crde->crd_inject, s->blkcipher.iv_len, iv); - } /* * The output buffer consists of the cipher text followed by * the hash when encrypting. For decryption it only contains * the plain text. + * + * Due to a firmware bug, the output buffer must include a + * dummy output buffer for the IV and AAD prior to the real + * output buffer. */ + if (op_type == CHCR_ENCRYPT_OP) { + if (s->blkcipher.iv_len + aad_len + crde->crd_len + + hash_size_in_response > MAX_REQUEST_SIZE) + return (EFBIG); + } else { + if (s->blkcipher.iv_len + aad_len + crde->crd_len > + MAX_REQUEST_SIZE) + return (EFBIG); + } sglist_reset(sc->sg_dsgl); + error = sglist_append_sglist(sc->sg_dsgl, sc->sg_iv_aad, 0, + s->blkcipher.iv_len + aad_len); + if (error) + return (error); error = sglist_append_sglist(sc->sg_dsgl, sc->sg_crp, crde->crd_skip, crde->crd_len); if (error) @@ -815,15 +864,25 @@ ccr_authenc(struct ccr_softc *sc, uint32_t sid, struct * The input buffer consists of the IV, any AAD, and then the * cipher/plain text. For decryption requests the hash is * appended after the cipher text. + * + * The IV is always stored at the start of the input buffer + * even though it may be duplicated in the payload. The + * crypto engine doesn't work properly if the IV offset points + * inside of the AAD region, so a second copy is always + * required. */ - if (crda->crd_skip < crde->crd_skip) { - if (crda->crd_skip + crda->crd_len > crde->crd_skip) - aad_len = (crde->crd_skip - crda->crd_skip); - else - aad_len = crda->crd_len; - } else - aad_len = 0; input_len = aad_len + crde->crd_len; + + /* + * The firmware hangs if sent a request which is a + * bit smaller than MAX_REQUEST_SIZE. In particular, the + * firmware appears to require 512 - 16 bytes of spare room + * along with the size of the hash even if the hash isn't + * included in the input buffer. + */ + if (input_len + roundup2(axf->hashsize, 16) + (512 - 16) > + MAX_REQUEST_SIZE) + return (EFBIG); if (op_type == CHCR_DECRYPT_OP) input_len += hash_size_in_response; if (ccr_use_imm_data(transhdr_len, s->blkcipher.iv_len + input_len)) { @@ -887,9 +946,10 @@ ccr_authenc(struct ccr_softc *sc, uint32_t sid, struct else auth_insert = 0; - wr_len = roundup2(transhdr_len, 16) + roundup2(imm_len, 16) + sgl_len; - if (iv_loc == IV_IMMEDIATE) - wr_len += s->blkcipher.iv_len; + wr_len = roundup2(transhdr_len, 16) + s->blkcipher.iv_len + + roundup2(imm_len, 16) + sgl_len; + if (wr_len > SGE_MAX_WR_LEN) + return (EFBIG); wr = alloc_wrqe(wr_len, sc->txq); if (wr == NULL) { sc->stats_wr_nomem++; @@ -898,9 +958,29 @@ ccr_authenc(struct ccr_softc *sc, uint32_t sid, struct crwr = wrtod(wr); memset(crwr, 0, wr_len); + /* + * Read the existing IV from the request or generate a random + * one if none is provided. Optionally copy the generated IV + * into the output buffer if requested. + */ + if (op_type == CHCR_ENCRYPT_OP) { + if (crde->crd_flags & CRD_F_IV_EXPLICIT) + memcpy(iv, crde->crd_iv, s->blkcipher.iv_len); + else + arc4rand(iv, s->blkcipher.iv_len, 0); + if ((crde->crd_flags & CRD_F_IV_PRESENT) == 0) + crypto_copyback(crp->crp_flags, crp->crp_buf, + crde->crd_inject, s->blkcipher.iv_len, iv); + } else { + if (crde->crd_flags & CRD_F_IV_EXPLICIT) + memcpy(iv, crde->crd_iv, s->blkcipher.iv_len); + else + crypto_copydata(crp->crp_flags, crp->crp_buf, + crde->crd_inject, s->blkcipher.iv_len, iv); + } + ccr_populate_wreq(sc, crwr, kctx_len, wr_len, sid, imm_len, sgl_len, - op_type == CHCR_DECRYPT_OP ? hash_size_in_response : 0, iv_loc, - crp); + op_type == CHCR_DECRYPT_OP ? hash_size_in_response : 0, crp); /* XXX: Hardcodes SGE loopback channel of 0. */ crwr->sec_cpl.op_ivinsrtofst = htobe32( @@ -938,7 +1018,7 @@ ccr_authenc(struct ccr_softc *sc, uint32_t sid, struct crwr->sec_cpl.ivgen_hdrlen = htobe32( V_SCMD_IV_GEN_CTRL(0) | V_SCMD_MORE_FRAGS(0) | V_SCMD_LAST_FRAG(0) | V_SCMD_MAC_ONLY(0) | - V_SCMD_AADIVDROP(1) | V_SCMD_HDR_LEN(dsgl_len)); + V_SCMD_AADIVDROP(0) | V_SCMD_HDR_LEN(dsgl_len)); crwr->key_ctx.ctx_hdr = s->blkcipher.key_ctx_hdr; switch (crde->crd_alg) { @@ -974,10 +1054,8 @@ ccr_authenc(struct ccr_softc *sc, uint32_t sid, struct dst = (char *)(crwr + 1) + kctx_len; ccr_write_phys_dsgl(sc, dst, dsgl_nsegs); dst += sizeof(struct cpl_rx_phys_dsgl) + dsgl_len; - if (iv_loc == IV_IMMEDIATE) { - memcpy(dst, iv, s->blkcipher.iv_len); - dst += s->blkcipher.iv_len; - } + memcpy(dst, iv, s->blkcipher.iv_len); + dst += s->blkcipher.iv_len; if (imm_len != 0) { if (aad_len != 0) { crypto_copydata(crp->crp_flags, crp->crp_buf, @@ -1037,7 +1115,7 @@ ccr_gcm(struct ccr_softc *sc, uint32_t sid, struct ccr struct chcr_wr *crwr; struct wrqe *wr; char *dst; - u_int iv_len, iv_loc, kctx_len, op_type, transhdr_len, wr_len; + u_int iv_len, kctx_len, op_type, transhdr_len, wr_len; u_int hash_size_in_response, imm_len; u_int aad_start, aad_stop, cipher_start, cipher_stop, auth_insert; u_int hmac_ctrl, input_len; @@ -1049,63 +1127,71 @@ ccr_gcm(struct ccr_softc *sc, uint32_t sid, struct ccr return (EINVAL); /* + * The crypto engine doesn't handle GCM requests with an empty + * payload, so handle those in software instead. + */ + if (crde->crd_len == 0) + return (EMSGSIZE); + + /* * AAD is only permitted before the cipher/plain text, not * after. */ if (crda->crd_len + crda->crd_skip > crde->crd_len + crde->crd_skip) - return (EINVAL); + return (EMSGSIZE); - hash_size_in_response = s->gmac.hash_len; + if (crda->crd_len + AES_BLOCK_LEN > MAX_AAD_LEN) + return (EMSGSIZE); - /* - * The IV is always stored at the start of the buffer even - * though it may be duplicated in the payload. The crypto - * engine doesn't work properly if the IV offset points inside - * of the AAD region, so a second copy is always required. - * - * The IV for GCM is further complicated in that IPSec - * provides a full 16-byte IV (including the counter), whereas - * the /dev/crypto interface sometimes provides a full 16-byte - * IV (if no IV is provided in the ioctl) and sometimes a - * 12-byte IV (if the IV was explicit). For now the driver - * always assumes a 12-byte IV and initializes the low 4 byte - * counter to 1. - */ - iv_loc = IV_IMMEDIATE; - if (crde->crd_flags & CRD_F_ENCRYPT) { + hash_size_in_response = s->gmac.hash_len; + if (crde->crd_flags & CRD_F_ENCRYPT) op_type = CHCR_ENCRYPT_OP; - if (crde->crd_flags & CRD_F_IV_EXPLICIT) - memcpy(iv, crde->crd_iv, s->blkcipher.iv_len); - else - arc4rand(iv, s->blkcipher.iv_len, 0); - if ((crde->crd_flags & CRD_F_IV_PRESENT) == 0) - crypto_copyback(crp->crp_flags, crp->crp_buf, - crde->crd_inject, s->blkcipher.iv_len, iv); - } else { + else op_type = CHCR_DECRYPT_OP; - if (crde->crd_flags & CRD_F_IV_EXPLICIT) - memcpy(iv, crde->crd_iv, s->blkcipher.iv_len); - else - crypto_copydata(crp->crp_flags, crp->crp_buf, - crde->crd_inject, s->blkcipher.iv_len, iv); - } /* - * If the input IV is 12 bytes, append an explicit counter of - * 1. + * The IV handling for GCM in OCF is a bit more complicated in + * that IPSec provides a full 16-byte IV (including the + * counter), whereas the /dev/crypto interface sometimes + * provides a full 16-byte IV (if no IV is provided in the + * ioctl) and sometimes a 12-byte IV (if the IV was explicit). + * + * When provided a 12-byte IV, assume the IV is really 16 bytes + * with a counter in the last 4 bytes initialized to 1. + * + * While iv_len is checked below, the value is currently + * always set to 12 when creating a GCM session in this driver + * due to limitations in OCF (there is no way to know what the + * IV length of a given request will be). This means that the + * driver always assumes as 12-byte IV for now. */ - if (s->blkcipher.iv_len == 12) { - *(uint32_t *)&iv[12] = htobe32(1); + if (s->blkcipher.iv_len == 12) iv_len = AES_BLOCK_LEN; - } else + else iv_len = s->blkcipher.iv_len; /* * The output buffer consists of the cipher text followed by * the tag when encrypting. For decryption it only contains * the plain text. + * + * Due to a firmware bug, the output buffer must include a + * dummy output buffer for the IV and AAD prior to the real + * output buffer. */ + if (op_type == CHCR_ENCRYPT_OP) { + if (iv_len + crda->crd_len + crde->crd_len + + hash_size_in_response > MAX_REQUEST_SIZE) + return (EFBIG); + } else { + if (iv_len + crda->crd_len + crde->crd_len > MAX_REQUEST_SIZE) + return (EFBIG); + } sglist_reset(sc->sg_dsgl); + error = sglist_append_sglist(sc->sg_dsgl, sc->sg_iv_aad, 0, iv_len + + crda->crd_len); + if (error) + return (error); error = sglist_append_sglist(sc->sg_dsgl, sc->sg_crp, crde->crd_skip, crde->crd_len); if (error) @@ -1132,10 +1218,18 @@ ccr_gcm(struct ccr_softc *sc, uint32_t sid, struct ccr * The input buffer consists of the IV, any AAD, and then the * cipher/plain text. For decryption requests the hash is * appended after the cipher text. + * + * The IV is always stored at the start of the input buffer + * even though it may be duplicated in the payload. The + * crypto engine doesn't work properly if the IV offset points + * inside of the AAD region, so a second copy is always + * required. */ input_len = crda->crd_len + crde->crd_len; if (op_type == CHCR_DECRYPT_OP) input_len += hash_size_in_response; + if (input_len > MAX_REQUEST_SIZE) + return (EFBIG); if (ccr_use_imm_data(transhdr_len, iv_len + input_len)) { imm_len = input_len; sgl_nsegs = 0; @@ -1180,9 +1274,10 @@ ccr_gcm(struct ccr_softc *sc, uint32_t sid, struct ccr else auth_insert = 0; - wr_len = roundup2(transhdr_len, 16) + roundup2(imm_len, 16) + sgl_len; - if (iv_loc == IV_IMMEDIATE) - wr_len += iv_len; + wr_len = roundup2(transhdr_len, 16) + iv_len + roundup2(imm_len, 16) + + sgl_len; + if (wr_len > SGE_MAX_WR_LEN) + return (EFBIG); wr = alloc_wrqe(wr_len, sc->txq); if (wr == NULL) { sc->stats_wr_nomem++; @@ -1191,8 +1286,34 @@ ccr_gcm(struct ccr_softc *sc, uint32_t sid, struct ccr crwr = wrtod(wr); memset(crwr, 0, wr_len); + /* + * Read the existing IV from the request or generate a random + * one if none is provided. Optionally copy the generated IV + * into the output buffer if requested. + * + * If the input IV is 12 bytes, append an explicit 4-byte + * counter of 1. + */ + if (op_type == CHCR_ENCRYPT_OP) { + if (crde->crd_flags & CRD_F_IV_EXPLICIT) + memcpy(iv, crde->crd_iv, s->blkcipher.iv_len); + else + arc4rand(iv, s->blkcipher.iv_len, 0); + if ((crde->crd_flags & CRD_F_IV_PRESENT) == 0) + crypto_copyback(crp->crp_flags, crp->crp_buf, + crde->crd_inject, s->blkcipher.iv_len, iv); + } else { + if (crde->crd_flags & CRD_F_IV_EXPLICIT) + memcpy(iv, crde->crd_iv, s->blkcipher.iv_len); + else + crypto_copydata(crp->crp_flags, crp->crp_buf, + crde->crd_inject, s->blkcipher.iv_len, iv); + } + if (s->blkcipher.iv_len == 12) + *(uint32_t *)&iv[12] = htobe32(1); + ccr_populate_wreq(sc, crwr, kctx_len, wr_len, sid, imm_len, sgl_len, - 0, iv_loc, crp); + 0, crp); /* XXX: Hardcodes SGE loopback channel of 0. */ crwr->sec_cpl.op_ivinsrtofst = htobe32( @@ -1240,7 +1361,7 @@ ccr_gcm(struct ccr_softc *sc, uint32_t sid, struct ccr crwr->sec_cpl.ivgen_hdrlen = htobe32( V_SCMD_IV_GEN_CTRL(0) | V_SCMD_MORE_FRAGS(0) | V_SCMD_LAST_FRAG(0) | V_SCMD_MAC_ONLY(0) | - V_SCMD_AADIVDROP(1) | V_SCMD_HDR_LEN(dsgl_len)); + V_SCMD_AADIVDROP(0) | V_SCMD_HDR_LEN(dsgl_len)); crwr->key_ctx.ctx_hdr = s->blkcipher.key_ctx_hdr; memcpy(crwr->key_ctx.key, s->blkcipher.enckey, s->blkcipher.key_len); @@ -1250,10 +1371,8 @@ ccr_gcm(struct ccr_softc *sc, uint32_t sid, struct ccr dst = (char *)(crwr + 1) + kctx_len; ccr_write_phys_dsgl(sc, dst, dsgl_nsegs); dst += sizeof(struct cpl_rx_phys_dsgl) + dsgl_len; - if (iv_loc == IV_IMMEDIATE) { - memcpy(dst, iv, iv_len); - dst += iv_len; - } + memcpy(dst, iv, iv_len); + dst += iv_len; if (imm_len != 0) { if (crda->crd_len != 0) { crypto_copydata(crp->crp_flags, crp->crp_buf, @@ -1289,7 +1408,153 @@ ccr_gcm_done(struct ccr_softc *sc, struct ccr_session return (error); } +/* + * Handle a GCM request that is not supported by the crypto engine by + * performing the operation in software. Derived from swcr_authenc(). + */ static void +ccr_gcm_soft(struct ccr_session *s, struct cryptop *crp, + struct cryptodesc *crda, struct cryptodesc *crde) +{ + struct auth_hash *axf; + struct enc_xform *exf; + void *auth_ctx; + uint8_t *kschedule; + char block[GMAC_BLOCK_LEN]; + char digest[GMAC_DIGEST_LEN]; + char iv[AES_BLOCK_LEN]; + int error, i, len; + + auth_ctx = NULL; + kschedule = NULL; + + /* Initialize the MAC. */ + switch (s->blkcipher.key_len) { + case 16: + axf = &auth_hash_nist_gmac_aes_128; + break; + case 24: + axf = &auth_hash_nist_gmac_aes_192; + break; + case 32: + axf = &auth_hash_nist_gmac_aes_256; + break; + default: + error = EINVAL; + goto out; + } + auth_ctx = malloc(axf->ctxsize, M_CCR, M_NOWAIT); + if (auth_ctx == NULL) { + error = ENOMEM; + goto out; + } + axf->Init(auth_ctx); + axf->Setkey(auth_ctx, s->blkcipher.enckey, s->blkcipher.key_len); + + /* Initialize the cipher. */ + exf = &enc_xform_aes_nist_gcm; + error = exf->setkey(&kschedule, s->blkcipher.enckey, + s->blkcipher.key_len); + if (error) + goto out; + + /* + * This assumes a 12-byte IV from the crp. See longer comment + * above in ccr_gcm() for more details. + */ + if (crde->crd_flags & CRD_F_ENCRYPT) { + if (crde->crd_flags & CRD_F_IV_EXPLICIT) + memcpy(iv, crde->crd_iv, 12); + else + arc4rand(iv, 12, 0); + if ((crde->crd_flags & CRD_F_IV_PRESENT) == 0) + crypto_copyback(crp->crp_flags, crp->crp_buf, + crde->crd_inject, 12, iv); + } else { + if (crde->crd_flags & CRD_F_IV_EXPLICIT) + memcpy(iv, crde->crd_iv, 12); + else + crypto_copydata(crp->crp_flags, crp->crp_buf, + crde->crd_inject, 12, iv); + } + *(uint32_t *)&iv[12] = htobe32(1); + + axf->Reinit(auth_ctx, iv, sizeof(iv)); + + /* MAC the AAD. */ + for (i = 0; i < crda->crd_len; i += sizeof(block)) { + len = imin(crda->crd_len - i, sizeof(block)); + crypto_copydata(crp->crp_flags, crp->crp_buf, crda->crd_skip + + i, len, block); + bzero(block + len, sizeof(block) - len); + axf->Update(auth_ctx, block, sizeof(block)); + } + + exf->reinit(kschedule, iv); + + /* Do encryption with MAC */ + for (i = 0; i < crde->crd_len; i += sizeof(block)) { + len = imin(crde->crd_len - i, sizeof(block)); + crypto_copydata(crp->crp_flags, crp->crp_buf, crde->crd_skip + + i, len, block); + bzero(block + len, sizeof(block) - len); + if (crde->crd_flags & CRD_F_ENCRYPT) { + exf->encrypt(kschedule, block); + axf->Update(auth_ctx, block, len); + crypto_copyback(crp->crp_flags, crp->crp_buf, + crde->crd_skip + i, len, block); + } else { + axf->Update(auth_ctx, block, len); + } + } + + /* Length block. */ + bzero(block, sizeof(block)); + ((uint32_t *)block)[1] = htobe32(crda->crd_len * 8); + ((uint32_t *)block)[3] = htobe32(crde->crd_len * 8); + axf->Update(auth_ctx, block, sizeof(block)); + + /* Finalize MAC. */ + axf->Final(digest, auth_ctx); + + /* Inject or validate tag. */ + if (crde->crd_flags & CRD_F_ENCRYPT) { + crypto_copyback(crp->crp_flags, crp->crp_buf, crda->crd_inject, + sizeof(digest), digest); + error = 0; + } else { + char digest2[GMAC_DIGEST_LEN]; + + crypto_copydata(crp->crp_flags, crp->crp_buf, crda->crd_inject, + sizeof(digest2), digest2); + if (timingsafe_bcmp(digest, digest2, sizeof(digest)) == 0) { + error = 0; + + /* Tag matches, decrypt data. */ + for (i = 0; i < crde->crd_len; i += sizeof(block)) { + len = imin(crde->crd_len - i, sizeof(block)); + crypto_copydata(crp->crp_flags, crp->crp_buf, + crde->crd_skip + i, len, block); + bzero(block + len, sizeof(block) - len); + exf->decrypt(kschedule, block); + crypto_copyback(crp->crp_flags, crp->crp_buf, + crde->crd_skip + i, len, block); + } + } else + error = EBADMSG; + } + + exf->zerokey(&kschedule); +out: + if (auth_ctx != NULL) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Mar 11 23:18:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AF031531F8B; Mon, 11 Mar 2019 23:18:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F1AC68904C; Mon, 11 Mar 2019 23:18:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DEBB019C0D; Mon, 11 Mar 2019 23:18:09 +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 x2BNI9Kl092653; Mon, 11 Mar 2019 23:18:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BNI9gg092652; Mon, 11 Mar 2019 23:18:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903112318.x2BNI9gg092652@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 11 Mar 2019 23:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345041 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 345041 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F1AC68904C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 23:18:10 -0000 Author: jhb Date: Mon Mar 11 23:18:09 2019 New Revision: 345041 URL: https://svnweb.freebsd.org/changeset/base/345041 Log: Update ccr(4) to note recent support for SHA2-224 and plain SHA hashes. MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/share/man/man4/ccr.4 Modified: head/share/man/man4/ccr.4 ============================================================================== --- head/share/man/man4/ccr.4 Mon Mar 11 23:16:10 2019 (r345040) +++ head/share/man/man4/ccr.4 Mon Mar 11 23:18:09 2019 (r345041) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 16, 2017 +.Dd March 11, 2019 .Dt CCR 4 .Os .Sh NAME @@ -49,13 +49,14 @@ The .Nm driver provides support for the crypto accelerator engine included on PCI Express Ethernet adapters based on the Chelsio Terminator 6 ASIC (T6). -The driver accelerates AES-CBC, AES-CTR, AES-GCM, AES-XTS, SHA1-HMAC, +The driver accelerates AES-CBC, AES-CTR, AES-GCM, AES-XTS, SHA1, SHA2-224, +SHA2-256, SHA2-384, SHA2-512, SHA1-HMAC, SHA2-224-HMAC, SHA2-256-HMAC, SHA2-384-HMAC, and SHA2-512-HMAC operations for .Xr crypto 4 and .Xr ipsec 4 . The driver also supports chaining one of AES-CBC, AES-CTR, or AES-XTS with -SHA1-HMAC, SHA2-256-HMAC, SHA2-384-HMAC, or SHA2-512-HMAC for +SHA1-HMAC, SHA2-224-HMAC, SHA2-256-HMAC, SHA2-384-HMAC, or SHA2-512-HMAC for encrypt-then-authenticate operations. For further hardware information and questions related to hardware requirements, see From owner-svn-src-all@freebsd.org Mon Mar 11 23:53:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 664A21532C63; Mon, 11 Mar 2019 23:53:57 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 03FAC8A411; Mon, 11 Mar 2019 23:53:57 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E0D3E1A2FA; Mon, 11 Mar 2019 23:53:56 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2BNruh4013431; Mon, 11 Mar 2019 23:53:56 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BNruND013429; Mon, 11 Mar 2019 23:53:56 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201903112353.x2BNruND013429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Mon, 11 Mar 2019 23:53:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345043 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 345043 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 03FAC8A411 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 23:53:57 -0000 Author: mckusick Date: Mon Mar 11 23:53:56 2019 New Revision: 345043 URL: https://svnweb.freebsd.org/changeset/base/345043 Log: Give more complete information in INVARIANTS panic messages at end of the ffs_truncate() function. Sponsored by: Netflix Modified: head/sys/ufs/ffs/ffs_inode.c Modified: head/sys/ufs/ffs/ffs_inode.c ============================================================================== --- head/sys/ufs/ffs/ffs_inode.c Mon Mar 11 23:27:50 2019 (r345042) +++ head/sys/ufs/ffs/ffs_inode.c Mon Mar 11 23:53:56 2019 (r345043) @@ -594,15 +594,20 @@ done: #ifdef INVARIANTS for (level = SINGLE; level <= TRIPLE; level++) if (newblks[UFS_NDADDR + level] != DIP(ip, i_ib[level])) - panic("ffs_truncate1"); + panic("ffs_truncate1: level %d newblks %jd != i_ib %jd", + level, (intmax_t)newblks[UFS_NDADDR + level], + (intmax_t)DIP(ip, i_ib[level])); for (i = 0; i < UFS_NDADDR; i++) if (newblks[i] != DIP(ip, i_db[i])) - panic("ffs_truncate2"); + panic("ffs_truncate2: blkno %d newblks %jd != i_db %jd", + i, (intmax_t)newblks[UFS_NDADDR + level], + (intmax_t)DIP(ip, i_ib[level])); BO_LOCK(bo); if (length == 0 && (fs->fs_magic != FS_UFS2_MAGIC || ip->i_din2->di_extsize == 0) && (bo->bo_dirty.bv_cnt > 0 || bo->bo_clean.bv_cnt > 0)) - panic("ffs_truncate3"); + panic("ffs_truncate3: vp = %p, buffers: dirty = %d, clean = %d", + vp, bo->bo_dirty.bv_cnt, bo->bo_clean.bv_cnt); BO_UNLOCK(bo); #endif /* INVARIANTS */ /* From owner-svn-src-all@freebsd.org Tue Mar 12 00:10:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D6BF153329B; Tue, 12 Mar 2019 00:10:32 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DBD888AA17; Tue, 12 Mar 2019 00:10:31 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C7CC11A4B7; Tue, 12 Mar 2019 00:10:31 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2C0AVl1018868; Tue, 12 Mar 2019 00:10:31 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2C0AVwW018867; Tue, 12 Mar 2019 00:10:31 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201903120010.x2C0AVwW018867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Tue, 12 Mar 2019 00:10:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345044 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 345044 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DBD888AA17 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 00:10:32 -0000 Author: mckusick Date: Tue Mar 12 00:10:31 2019 New Revision: 345044 URL: https://svnweb.freebsd.org/changeset/base/345044 Log: Add KASSERT to the softdep_disk_write_complete() function in the soft dependency code to ensure that it will be able to avoid a dangling dependency. Sponsored by: Netflix Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Mon Mar 11 23:53:56 2019 (r345043) +++ head/sys/ufs/ffs/ffs_softdep.c Tue Mar 12 00:10:31 2019 (r345044) @@ -11036,6 +11036,9 @@ softdep_disk_write_complete(bp) struct buf *sbp; ump = softdep_bp_to_mp(bp); + KASSERT(LIST_EMPTY(&bp->b_dep) || ump != NULL, + ("softdep_disk_write_complete: softdep_bp_to_mp returned NULL " + "with outstanding dependencies for buffer %p", bp)); if (ump == NULL) return; From owner-svn-src-all@freebsd.org Tue Mar 12 01:43:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93BA615394DA; Tue, 12 Mar 2019 01:43:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B5287685F6; Tue, 12 Mar 2019 01:43:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A6BDA1B917; Tue, 12 Mar 2019 01:43:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2C1h3W6072847; Tue, 12 Mar 2019 01:43:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2C1h2lm072839; Tue, 12 Mar 2019 01:43:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201903120143.x2C1h2lm072839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 12 Mar 2019 01:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r345046 - in vendor/google/capsicum-test: . dist X-SVN-Group: vendor X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in vendor/google/capsicum-test: . dist X-SVN-Commit-Revision: 345046 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B5287685F6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 01:43:05 -0000 Author: ngie Date: Tue Mar 12 01:43:01 2019 New Revision: 345046 URL: https://svnweb.freebsd.org/changeset/base/345046 Log: Import capsicum-test into ^/vendor/google/capsicum-test/dist The following change imports google/capsicum-test@9333154 from GitHub, omitting the embedded version of googletest, as well as the incomplete libcasper. This test suite helps verify capsicum(3) support via functional tests written in the GoogleTest test framework. Kernel support for capsicum(4) is tested by side-effect of testing capsicum(3). NB: as discussed in a previous [closed] PR [1], the casper(3) tests are incomplete/buggy and will not pass on FreeBSD. Thus, I have no intention of integrating them into the build/test on FreeBSD as-is. The import command used was: ``` curl -L https://github.com/google/capsicum-test/tarball/9333154 | tar --strip-components=1 -xvzf - -C dist/ rm -Rf dist/*/ ``` 1. https://github.com/google/capsicum-test/pull/26 Reviewed by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D19261 Added: vendor/google/capsicum-test/ vendor/google/capsicum-test/dist/ vendor/google/capsicum-test/dist/.gitignore vendor/google/capsicum-test/dist/CONTRIBUTING.md vendor/google/capsicum-test/dist/GNUmakefile vendor/google/capsicum-test/dist/LICENSE vendor/google/capsicum-test/dist/README.md vendor/google/capsicum-test/dist/capability-fd-pair.cc (contents, props changed) vendor/google/capsicum-test/dist/capability-fd.cc (contents, props changed) vendor/google/capsicum-test/dist/capmode.cc (contents, props changed) vendor/google/capsicum-test/dist/capsicum-freebsd.h (contents, props changed) vendor/google/capsicum-test/dist/capsicum-linux.h (contents, props changed) vendor/google/capsicum-test/dist/capsicum-rights.h (contents, props changed) vendor/google/capsicum-test/dist/capsicum-test-main.cc (contents, props changed) vendor/google/capsicum-test/dist/capsicum-test.cc (contents, props changed) vendor/google/capsicum-test/dist/capsicum-test.h (contents, props changed) vendor/google/capsicum-test/dist/capsicum.h (contents, props changed) vendor/google/capsicum-test/dist/fcntl.cc (contents, props changed) vendor/google/capsicum-test/dist/fexecve.cc (contents, props changed) vendor/google/capsicum-test/dist/ioctl.cc (contents, props changed) vendor/google/capsicum-test/dist/linux.cc (contents, props changed) vendor/google/capsicum-test/dist/makefile (contents, props changed) vendor/google/capsicum-test/dist/mini-me.c (contents, props changed) vendor/google/capsicum-test/dist/mqueue.cc (contents, props changed) vendor/google/capsicum-test/dist/openat.cc (contents, props changed) vendor/google/capsicum-test/dist/overhead.cc (contents, props changed) vendor/google/capsicum-test/dist/procdesc.cc (contents, props changed) vendor/google/capsicum-test/dist/rename.cc (contents, props changed) vendor/google/capsicum-test/dist/sctp.cc (contents, props changed) vendor/google/capsicum-test/dist/select.cc (contents, props changed) vendor/google/capsicum-test/dist/showrights (contents, props changed) vendor/google/capsicum-test/dist/smoketest.c (contents, props changed) vendor/google/capsicum-test/dist/socket.cc (contents, props changed) vendor/google/capsicum-test/dist/syscalls.h (contents, props changed) vendor/google/capsicum-test/dist/sysctl.cc (contents, props changed) vendor/google/capsicum-test/dist/waittest.c (contents, props changed) Added: vendor/google/capsicum-test/dist/.gitignore ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/google/capsicum-test/dist/.gitignore Tue Mar 12 01:43:01 2019 (r345046) @@ -0,0 +1,19 @@ +capsicum-test +mini-me +mini-me.noexec +mini-me.setuid +mini-me.32 +mini-me.x32 +mini-me.64 +libgtest.a +smoketest +*.o +libcap*.deb +libcap*.dsc +libcap*.tar.gz +libcap*.changes +casper*.deb +casper*.dsc +casper*.tar.gz +casper*.changes +libcaprights.a \ No newline at end of file Added: vendor/google/capsicum-test/dist/CONTRIBUTING.md ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/google/capsicum-test/dist/CONTRIBUTING.md Tue Mar 12 01:43:01 2019 (r345046) @@ -0,0 +1,20 @@ +## Contributor License Agreement ## + +Contributions to any Google project must be accompanied by a Contributor +License Agreement. This is not a copyright **assignment**, it simply gives +Google permission to use and redistribute your contributions as part of the +project. + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual + CLA][]. + + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA][]. + +You generally only need to submit a CLA once, so if you've already submitted +one (even if it was for a different project), you probably don't need to do it +again. + +[individual CLA]: https://developers.google.com/open-source/cla/individual +[corporate CLA]: https://developers.google.com/open-source/cla/corporate Added: vendor/google/capsicum-test/dist/GNUmakefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/google/capsicum-test/dist/GNUmakefile Tue Mar 12 01:43:01 2019 (r345046) @@ -0,0 +1,78 @@ +OS:=$(shell uname) + +# Set ARCH to 32 or x32 for i386/x32 ABIs +ARCH?=64 +ARCHFLAG=-m$(ARCH) + +ifeq ($(OS),Linux) +PROCESSOR:=$(shell uname -p) + +ifneq ($(wildcard /usr/lib/$(PROCESSOR)-linux-gnu),) +# Can use standard Debian location for static libraries. +PLATFORM_LIBDIR=/usr/lib/$(PROCESSOR)-linux-gnu +else +# Attempt to determine library location from gcc configuration. +PLATFORM_LIBDIR=$(shell gcc -v 2>&1 | grep "Configured with:" | sed 's/.*--libdir=\(\/usr\/[^ ]*\).*/\1/g') +endif + +# Override for explicitly specified ARCHFLAG. +# Use locally compiled libcaprights in this case, on the +# assumption that any installed version is 64-bit. +ifeq ($(ARCHFLAG),-m32) +PROCESSOR=i386 +PLATFORM_LIBDIR=/usr/lib32 +LIBCAPRIGHTS=./libcaprights.a +endif +ifeq ($(ARCHFLAG),-mx32) +PROCESSOR=x32 +PLATFORM_LIBDIR=/usr/libx32 +LIBCAPRIGHTS=./libcaprights.a +endif + +# Detect presence of libsctp in normal Debian location +ifneq ($(wildcard $(PLATFORM_LIBDIR)/libsctp.a),) +LIBSCTP=-lsctp +CXXFLAGS=-DHAVE_SCTP +endif + +ifneq ($(LIBCAPRIGHTS),) +# Build local libcaprights.a (assuming ./configure +# has already been done in libcaprights/) +LOCAL_LIBS=$(LIBCAPRIGHTS) +LIBCAPRIGHTS_OBJS=libcaprights/capsicum.o libcaprights/linux-bpf-capmode.o libcaprights/procdesc.o libcaprights/signal.o +LOCAL_CLEAN=$(LOCAL_LIBS) $(LIBCAPRIGHTS_OBJS) +else +# Detect installed libcaprights static library. +ifneq ($(wildcard $(PLATFORM_LIBDIR)/libcaprights.a),) +LIBCAPRIGHTS=$(PLATFORM_LIBDIR)/libcaprights.a +else +ifneq ($(wildcard /usr/lib/libcaprights.a),) +LIBCAPRIGHTS=/usr/lib/libcaprights.a +endif +endif +endif + +endif + +# Extra test programs for arch-transition tests +EXTRA_PROGS = mini-me.32 mini-me.64 +ifneq ($(wildcard /usr/include/gnu/stubs-x32.h),) +EXTRA_PROGS += mini-me.x32 +endif + +# Chain on to the master makefile +include makefile + +./libcaprights.a: $(LIBCAPRIGHTS_OBJS) + ar cr $@ $^ + +# Small static programs of known architectures +# These may require additional packages to be installed; for example, for Debian: +# - libc6-dev-i386 provides 32-bit headers for a 64-bit system +# - libc6-dev-x32 provides headers for the x32 ABI. +mini-me.32: mini-me.c + $(CC) $(CFLAGS) -m32 -static -o $@ $< +mini-me.x32: mini-me.c + $(CC) $(CFLAGS) -mx32 -static -o $@ $< +mini-me.64: mini-me.c + $(CC) $(CFLAGS) -m64 -static -o $@ $< Added: vendor/google/capsicum-test/dist/LICENSE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/google/capsicum-test/dist/LICENSE Tue Mar 12 01:43:01 2019 (r345046) @@ -0,0 +1,26 @@ +Copyright (c) 2009-2011 Robert N. M. Watson +Copyright (c) 2011 Jonathan Anderson +Copyright (C) 2012 The Chromium OS Authors +Copyright (c) 2013-2014 Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE 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. Added: vendor/google/capsicum-test/dist/README.md ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/google/capsicum-test/dist/README.md Tue Mar 12 01:43:01 2019 (r345046) @@ -0,0 +1,62 @@ +# Capsicum User Space Tests + +This directory holds unit tests for [Capsicum](http://www.cl.cam.ac.uk/research/security/capsicum/) +object-capabilities. The tests exercise the syscall interface to a Capsicum-enabled operating system, +currently either [FreeBSD >=10.x](http://www.freebsd.org) or a modified Linux kernel (the +[capsicum-linux](http://github.com/google/capsicum-linux) project). + +The tests are written in C++98, and use the [Google Test](https://code.google.com/p/googletest/) +framework, with some additions to fork off particular tests (because a process that enters capability +mode cannot leave it again). + +## Provenance + +The original basis for these tests was: + + - [unit tests](https://github.com/freebsd/freebsd/tree/master/tools/regression/security/cap_test) + written by Robert Watson and Jonathan Anderson for the original FreeBSD 9.x Capsicum implementation + - [unit tests](http://git.chromium.org/gitweb/?p=chromiumos/third_party/kernel-capsicum.git;a=tree;f=tools/testing/capsicum_tests;hb=refs/heads/capsicum) written by Meredydd Luff for the original Capsicum-Linux port. + +These tests were coalesced and moved into an independent repository to enable +comparative testing across multiple OSes, and then substantially extended. + +## OS Configuration + +### Linux + +The following kernel configuration options are needed to run the tests: + + - `CONFIG_SECURITY_CAPSICUM`: enable the Capsicum framework + - `CONFIG_PROCDESC`: enable Capsicum process-descriptor functionality + - `CONFIG_DEBUG_FS`: enable debug filesystem + - `CONFIG_IP_SCTP`: enable SCTP support + +### FreeBSD (>= 10.x) + +The following kernel configuration options are needed so that all tests can run: + + - `options P1003_1B_MQUEUE`: Enable POSIX message queues (or `kldload mqueuefs`) + +## Other Dependencies + +### Linux + +The following additional development packages are needed to build the full test suite on Linux. + + - `libcaprights`: See below + - `libcap-dev`: Provides headers for POSIX.1e capabilities. + - `libsctp1`: Provides SCTP library functions. + - `libsctp-dev`: Provides headers for SCTP library functions. + + +## Linux libcaprights + +The Capsicum userspace library is held in the `libcaprights/` subdirectory. Ideally, this +library should be built (with `./configure; make` or `dpkg-buildpackage -uc -us`) and +installed (with `make install` or `dpkg -i libcaprights*.deb`) so that the tests will +use behave like a normal Capsicum-aware application. + +However, if no installed copy of the library is found, the `GNUmakefile` will attempt +to use the local `libcaprights/*.c` source; this requires `./configure` to have been +performed in the `libcaprights` subdirectory. The local code is also used for +cross-compiled builds of the test suite (e.g. `make ARCH=32` or `make ARCH=x32`). Added: vendor/google/capsicum-test/dist/capability-fd-pair.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/google/capsicum-test/dist/capability-fd-pair.cc Tue Mar 12 01:43:01 2019 (r345046) @@ -0,0 +1,188 @@ +// Tests involving 2 capability file descriptors. +#include +#include +#include + +#include "capsicum.h" +#include "syscalls.h" +#include "capsicum-test.h" + +TEST(CapabilityPair, sendfile) { + int in_fd = open(TmpFile("cap_sendfile_in"), O_CREAT|O_RDWR, 0644); + EXPECT_OK(write(in_fd, "1234", 4)); + // Output fd for sendfile must be a stream socket in FreeBSD. + int sock_fds[2]; + EXPECT_OK(socketpair(AF_UNIX, SOCK_STREAM, 0, sock_fds)); + + cap_rights_t r_rs; + cap_rights_init(&r_rs, CAP_READ, CAP_SEEK); + cap_rights_t r_ws; + cap_rights_init(&r_ws, CAP_WRITE, CAP_SEEK); + + int cap_in_ro = dup(in_fd); + EXPECT_OK(cap_in_ro); + EXPECT_OK(cap_rights_limit(cap_in_ro, &r_rs)); + int cap_in_wo = dup(in_fd); + EXPECT_OK(cap_in_wo); + EXPECT_OK(cap_rights_limit(cap_in_wo, &r_ws)); + int cap_out_ro = dup(sock_fds[0]); + EXPECT_OK(cap_out_ro); + EXPECT_OK(cap_rights_limit(cap_out_ro, &r_rs)); + int cap_out_wo = dup(sock_fds[0]); + EXPECT_OK(cap_out_wo); + EXPECT_OK(cap_rights_limit(cap_out_wo, &r_ws)); + + off_t offset = 0; + EXPECT_NOTCAPABLE(sendfile_(cap_out_ro, cap_in_ro, &offset, 4)); + EXPECT_NOTCAPABLE(sendfile_(cap_out_wo, cap_in_wo, &offset, 4)); + EXPECT_OK(sendfile_(cap_out_wo, cap_in_ro, &offset, 4)); + + close(cap_in_ro); + close(cap_in_wo); + close(cap_out_ro); + close(cap_out_wo); + close(in_fd); + close(sock_fds[0]); + close(sock_fds[1]); + unlink(TmpFile("cap_sendfile_in")); +} + +#ifdef HAVE_TEE +TEST(CapabilityPair, tee) { + int pipe1_fds[2]; + EXPECT_OK(pipe2(pipe1_fds, O_NONBLOCK)); + int pipe2_fds[2]; + EXPECT_OK(pipe2(pipe2_fds, O_NONBLOCK)); + + // Put some data into pipe1. + unsigned char buffer[4] = {1, 2, 3, 4}; + EXPECT_OK(write(pipe1_fds[1], buffer, 4)); + + cap_rights_t r_ro; + cap_rights_init(&r_ro, CAP_READ); + cap_rights_t r_wo; + cap_rights_init(&r_wo, CAP_WRITE); + cap_rights_t r_rw; + cap_rights_init(&r_rw, CAP_READ, CAP_WRITE); + + // Various attempts to tee into pipe2. + int cap_in_wo = dup(pipe1_fds[0]); + EXPECT_OK(cap_in_wo); + EXPECT_OK(cap_rights_limit(cap_in_wo, &r_wo)); + int cap_in_rw = dup(pipe1_fds[0]); + EXPECT_OK(cap_in_rw); + EXPECT_OK(cap_rights_limit(cap_in_rw, &r_rw)); + int cap_out_ro = dup(pipe2_fds[1]); + EXPECT_OK(cap_out_ro); + EXPECT_OK(cap_rights_limit(cap_out_ro, &r_ro)); + int cap_out_rw = dup(pipe2_fds[1]); + EXPECT_OK(cap_out_rw); + EXPECT_OK(cap_rights_limit(cap_out_rw, &r_rw)); + + EXPECT_NOTCAPABLE(tee(cap_in_wo, cap_out_rw, 4, SPLICE_F_NONBLOCK)); + EXPECT_NOTCAPABLE(tee(cap_in_rw, cap_out_ro, 4, SPLICE_F_NONBLOCK)); + EXPECT_OK(tee(cap_in_rw, cap_out_rw, 4, SPLICE_F_NONBLOCK)); + + close(cap_in_wo); + close(cap_in_rw); + close(cap_out_ro); + close(cap_out_rw); + close(pipe1_fds[0]); + close(pipe1_fds[1]); + close(pipe2_fds[0]); + close(pipe2_fds[1]); +} +#endif + +#ifdef HAVE_SPLICE +TEST(CapabilityPair, splice) { + int pipe1_fds[2]; + EXPECT_OK(pipe2(pipe1_fds, O_NONBLOCK)); + int pipe2_fds[2]; + EXPECT_OK(pipe2(pipe2_fds, O_NONBLOCK)); + + // Put some data into pipe1. + unsigned char buffer[4] = {1, 2, 3, 4}; + EXPECT_OK(write(pipe1_fds[1], buffer, 4)); + + cap_rights_t r_ro; + cap_rights_init(&r_ro, CAP_READ); + cap_rights_t r_wo; + cap_rights_init(&r_wo, CAP_WRITE); + cap_rights_t r_rs; + cap_rights_init(&r_rs, CAP_READ, CAP_SEEK); + cap_rights_t r_ws; + cap_rights_init(&r_ws, CAP_WRITE, CAP_SEEK); + + // Various attempts to splice. + int cap_in_wo = dup(pipe1_fds[0]); + EXPECT_OK(cap_in_wo); + EXPECT_OK(cap_rights_limit(cap_in_wo, &r_wo)); + int cap_in_ro = dup(pipe1_fds[0]); + EXPECT_OK(cap_in_ro); + EXPECT_OK(cap_rights_limit(cap_in_ro, &r_ro)); + int cap_in_ro_seek = dup(pipe1_fds[0]); + EXPECT_OK(cap_in_ro_seek); + EXPECT_OK(cap_rights_limit(cap_in_ro_seek, &r_rs)); + int cap_out_wo = dup(pipe2_fds[1]); + EXPECT_OK(cap_out_wo); + EXPECT_OK(cap_rights_limit(cap_out_wo, &r_wo)); + int cap_out_ro = dup(pipe2_fds[1]); + EXPECT_OK(cap_out_ro); + EXPECT_OK(cap_rights_limit(cap_out_ro, &r_ro)); + int cap_out_wo_seek = dup(pipe2_fds[1]); + EXPECT_OK(cap_out_wo_seek); + EXPECT_OK(cap_rights_limit(cap_out_wo_seek, &r_ws)); + + EXPECT_NOTCAPABLE(splice(cap_in_ro, NULL, cap_out_wo_seek, NULL, 4, SPLICE_F_NONBLOCK)); + EXPECT_NOTCAPABLE(splice(cap_in_wo, NULL, cap_out_wo_seek, NULL, 4, SPLICE_F_NONBLOCK)); + EXPECT_NOTCAPABLE(splice(cap_in_ro_seek, NULL, cap_out_ro, NULL, 4, SPLICE_F_NONBLOCK)); + EXPECT_NOTCAPABLE(splice(cap_in_ro_seek, NULL, cap_out_wo, NULL, 4, SPLICE_F_NONBLOCK)); + EXPECT_OK(splice(cap_in_ro_seek, NULL, cap_out_wo_seek, NULL, 4, SPLICE_F_NONBLOCK)); + + close(cap_in_wo); + close(cap_in_ro); + close(cap_in_ro_seek); + close(cap_out_wo); + close(cap_out_ro); + close(cap_out_wo_seek); + close(pipe1_fds[0]); + close(pipe1_fds[1]); + close(pipe2_fds[0]); + close(pipe2_fds[1]); +} +#endif + +#ifdef HAVE_VMSPLICE +// Although it only involves a single file descriptor, test vmsplice(2) here too. +TEST(CapabilityPair, vmsplice) { + int pipe_fds[2]; + EXPECT_OK(pipe2(pipe_fds, O_NONBLOCK)); + + cap_rights_t r_ro; + cap_rights_init(&r_ro, CAP_READ); + cap_rights_t r_rw; + cap_rights_init(&r_rw, CAP_READ, CAP_WRITE); + + int cap_ro = dup(pipe_fds[1]); + EXPECT_OK(cap_ro); + EXPECT_OK(cap_rights_limit(cap_ro, &r_ro)); + int cap_rw = dup(pipe_fds[1]); + EXPECT_OK(cap_rw); + EXPECT_OK(cap_rights_limit(cap_rw, &r_rw)); + + unsigned char buffer[4] = {1, 2, 3, 4}; + struct iovec iov; + memset(&iov, 0, sizeof(iov)); + iov.iov_base = buffer; + iov.iov_len = sizeof(buffer); + + EXPECT_NOTCAPABLE(vmsplice(cap_ro, &iov, 1, SPLICE_F_NONBLOCK)); + EXPECT_OK(vmsplice(cap_rw, &iov, 1, SPLICE_F_NONBLOCK)); + + close(cap_ro); + close(cap_rw); + close(pipe_fds[0]); + close(pipe_fds[1]); +} +#endif Added: vendor/google/capsicum-test/dist/capability-fd.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/google/capsicum-test/dist/capability-fd.cc Tue Mar 12 01:43:01 2019 (r345046) @@ -0,0 +1,1271 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "capsicum.h" +#include "syscalls.h" +#include "capsicum-test.h" + +/* Utilities for printing rights information */ +/* Written in C style to allow for: */ +/* TODO(drysdale): migrate these to somewhere in libcaprights/ */ +#define RIGHTS_INFO(RR) { (RR), #RR} +typedef struct { + uint64_t right; + const char* name; +} right_info; +right_info known_rights[] = { + /* Rights that are common to all versions of Capsicum */ + RIGHTS_INFO(CAP_READ), + RIGHTS_INFO(CAP_WRITE), + RIGHTS_INFO(CAP_SEEK_TELL), + RIGHTS_INFO(CAP_SEEK), + RIGHTS_INFO(CAP_PREAD), + RIGHTS_INFO(CAP_PWRITE), + RIGHTS_INFO(CAP_MMAP), + RIGHTS_INFO(CAP_MMAP_R), + RIGHTS_INFO(CAP_MMAP_W), + RIGHTS_INFO(CAP_MMAP_X), + RIGHTS_INFO(CAP_MMAP_RW), + RIGHTS_INFO(CAP_MMAP_RX), + RIGHTS_INFO(CAP_MMAP_WX), + RIGHTS_INFO(CAP_MMAP_RWX), + RIGHTS_INFO(CAP_CREATE), + RIGHTS_INFO(CAP_FEXECVE), + RIGHTS_INFO(CAP_FSYNC), + RIGHTS_INFO(CAP_FTRUNCATE), + RIGHTS_INFO(CAP_LOOKUP), + RIGHTS_INFO(CAP_FCHDIR), + RIGHTS_INFO(CAP_FCHFLAGS), + RIGHTS_INFO(CAP_CHFLAGSAT), + RIGHTS_INFO(CAP_FCHMOD), + RIGHTS_INFO(CAP_FCHMODAT), + RIGHTS_INFO(CAP_FCHOWN), + RIGHTS_INFO(CAP_FCHOWNAT), + RIGHTS_INFO(CAP_FCNTL), + RIGHTS_INFO(CAP_FLOCK), + RIGHTS_INFO(CAP_FPATHCONF), + RIGHTS_INFO(CAP_FSCK), + RIGHTS_INFO(CAP_FSTAT), + RIGHTS_INFO(CAP_FSTATAT), + RIGHTS_INFO(CAP_FSTATFS), + RIGHTS_INFO(CAP_FUTIMES), + RIGHTS_INFO(CAP_FUTIMESAT), + RIGHTS_INFO(CAP_MKDIRAT), + RIGHTS_INFO(CAP_MKFIFOAT), + RIGHTS_INFO(CAP_MKNODAT), + RIGHTS_INFO(CAP_RENAMEAT_SOURCE), + RIGHTS_INFO(CAP_SYMLINKAT), + RIGHTS_INFO(CAP_UNLINKAT), + RIGHTS_INFO(CAP_ACCEPT), + RIGHTS_INFO(CAP_BIND), + RIGHTS_INFO(CAP_CONNECT), + RIGHTS_INFO(CAP_GETPEERNAME), + RIGHTS_INFO(CAP_GETSOCKNAME), + RIGHTS_INFO(CAP_GETSOCKOPT), + RIGHTS_INFO(CAP_LISTEN), + RIGHTS_INFO(CAP_PEELOFF), + RIGHTS_INFO(CAP_RECV), + RIGHTS_INFO(CAP_SEND), + RIGHTS_INFO(CAP_SETSOCKOPT), + RIGHTS_INFO(CAP_SHUTDOWN), + RIGHTS_INFO(CAP_BINDAT), + RIGHTS_INFO(CAP_CONNECTAT), + RIGHTS_INFO(CAP_LINKAT_SOURCE), + RIGHTS_INFO(CAP_RENAMEAT_TARGET), + RIGHTS_INFO(CAP_SOCK_CLIENT), + RIGHTS_INFO(CAP_SOCK_SERVER), + RIGHTS_INFO(CAP_MAC_GET), + RIGHTS_INFO(CAP_MAC_SET), + RIGHTS_INFO(CAP_SEM_GETVALUE), + RIGHTS_INFO(CAP_SEM_POST), + RIGHTS_INFO(CAP_SEM_WAIT), + RIGHTS_INFO(CAP_EVENT), + RIGHTS_INFO(CAP_KQUEUE_EVENT), + RIGHTS_INFO(CAP_IOCTL), + RIGHTS_INFO(CAP_TTYHOOK), + RIGHTS_INFO(CAP_PDWAIT), + RIGHTS_INFO(CAP_PDGETPID), + RIGHTS_INFO(CAP_PDKILL), + RIGHTS_INFO(CAP_EXTATTR_DELETE), + RIGHTS_INFO(CAP_EXTATTR_GET), + RIGHTS_INFO(CAP_EXTATTR_LIST), + RIGHTS_INFO(CAP_EXTATTR_SET), + RIGHTS_INFO(CAP_ACL_CHECK), + RIGHTS_INFO(CAP_ACL_DELETE), + RIGHTS_INFO(CAP_ACL_GET), + RIGHTS_INFO(CAP_ACL_SET), + RIGHTS_INFO(CAP_KQUEUE_CHANGE), + RIGHTS_INFO(CAP_KQUEUE), + /* Rights that are only present in some version or some OS, and so are #ifdef'ed */ + /* LINKAT got split */ +#ifdef CAP_LINKAT + RIGHTS_INFO(CAP_LINKAT), +#endif +#ifdef CAP_LINKAT_SOURCE + RIGHTS_INFO(CAP_LINKAT_SOURCE), +#endif +#ifdef CAP_LINKAT_TARGET + RIGHTS_INFO(CAP_LINKAT_TARGET), +#endif + /* Linux aliased some FD operations for pdgetpid/pdkill */ +#ifdef CAP_PDGETPID_FREEBSD + RIGHTS_INFO(CAP_PDGETPID_FREEBSD), +#endif +#ifdef CAP_PDKILL_FREEBSD + RIGHTS_INFO(CAP_PDKILL_FREEBSD), +#endif + /* Linux-specific rights */ +#ifdef CAP_FSIGNAL + RIGHTS_INFO(CAP_FSIGNAL), +#endif +#ifdef CAP_EPOLL_CTL + RIGHTS_INFO(CAP_EPOLL_CTL), +#endif +#ifdef CAP_NOTIFY + RIGHTS_INFO(CAP_NOTIFY), +#endif +#ifdef CAP_SETNS + RIGHTS_INFO(CAP_SETNS), +#endif +#ifdef CAP_PERFMON + RIGHTS_INFO(CAP_PERFMON), +#endif +#ifdef CAP_BPF + RIGHTS_INFO(CAP_BPF), +#endif + /* Rights in later versions of FreeBSD (>10.0) */ +}; + +void ShowCapRights(FILE *out, int fd) { + size_t ii; + bool first = true; + cap_rights_t rights; + CAP_SET_NONE(&rights); + if (cap_rights_get(fd, &rights) < 0) { + fprintf(out, "Failed to get rights for fd %d: errno %d\n", fd, errno); + return; + } + + /* First print out all known rights */ + size_t num_known = (sizeof(known_rights)/sizeof(known_rights[0])); + for (ii = 0; ii < num_known; ii++) { + if (cap_rights_is_set(&rights, known_rights[ii].right)) { + if (!first) fprintf(out, ","); + first = false; + fprintf(out, "%s", known_rights[ii].name); + } + } + /* Now repeat the loop, clearing rights we know of; this needs to be + * a separate loop because some named rights overlap. + */ + for (ii = 0; ii < num_known; ii++) { + cap_rights_clear(&rights, known_rights[ii].right); + } + /* The following relies on the internal structure of cap_rights_t to + * try to show rights we don't know about. */ + for (ii = 0; ii < (size_t)CAPARSIZE(&rights); ii++) { + uint64_t bits = (rights.cr_rights[0] & 0x01ffffffffffffffULL); + if (bits != 0) { + uint64_t which = 1; + for (which = 1; which < 0x0200000000000000 ; which <<= 1) { + if (bits & which) { + if (!first) fprintf(out, ","); + fprintf(out, "CAP_RIGHT(%d, 0x%016llxULL)", (int)ii, (long long unsigned)which); + } + } + } + } + fprintf(out, "\n"); +} + +void ShowAllCapRights(FILE *out) { + int fd; + struct rlimit limits; + if (getrlimit(RLIMIT_NOFILE, &limits) != 0) { + fprintf(out, "Failed to getrlimit for max FDs: errno %d\n", errno); + return; + } + for (fd = 0; fd < (int)limits.rlim_cur; fd++) { + if (fcntl(fd, F_GETFD, 0) != 0) { + continue; + } + fprintf(out, "fd %d: ", fd); + ShowCapRights(out, fd); + } +} + +FORK_TEST(Capability, CapNew) { + cap_rights_t r_rws; + cap_rights_init(&r_rws, CAP_READ, CAP_WRITE, CAP_SEEK); + cap_rights_t r_all; + CAP_SET_ALL(&r_all); + + int cap_fd = dup(STDOUT_FILENO); + cap_rights_t rights; + CAP_SET_NONE(&rights); + EXPECT_OK(cap_rights_get(cap_fd, &rights)); + EXPECT_RIGHTS_EQ(&r_all, &rights); + + EXPECT_OK(cap_fd); + EXPECT_OK(cap_rights_limit(cap_fd, &r_rws)); + if (cap_fd < 0) return; + int rc = write(cap_fd, "OK!\n", 4); + EXPECT_OK(rc); + EXPECT_EQ(4, rc); + EXPECT_OK(cap_rights_get(cap_fd, &rights)); + EXPECT_RIGHTS_EQ(&r_rws, &rights); + + // dup/dup2 should preserve rights. + int cap_dup = dup(cap_fd); + EXPECT_OK(cap_dup); + EXPECT_OK(cap_rights_get(cap_dup, &rights)); + EXPECT_RIGHTS_EQ(&r_rws, &rights); + close(cap_dup); + EXPECT_OK(dup2(cap_fd, cap_dup)); + EXPECT_OK(cap_rights_get(cap_dup, &rights)); + EXPECT_RIGHTS_EQ(&r_rws, &rights); + close(cap_dup); +#ifdef HAVE_DUP3 + EXPECT_OK(dup3(cap_fd, cap_dup, 0)); + EXPECT_OK(cap_rights_get(cap_dup, &rights)); + EXPECT_RIGHTS_EQ(&r_rws, &rights); + close(cap_dup); +#endif + + // Try to get a disjoint set of rights in a sub-capability. + cap_rights_t r_rs; + cap_rights_init(&r_rs, CAP_READ, CAP_SEEK); + cap_rights_t r_rsmapchmod; + cap_rights_init(&r_rsmapchmod, CAP_READ, CAP_SEEK, CAP_MMAP, CAP_FCHMOD); + int cap_cap_fd = dup(cap_fd); + EXPECT_OK(cap_cap_fd); + EXPECT_NOTCAPABLE(cap_rights_limit(cap_cap_fd, &r_rsmapchmod)); + + // Dump rights info to stderr (mostly to ensure that Show[All]CapRights() + // is working. + ShowAllCapRights(stderr); + + EXPECT_OK(close(cap_fd)); +} + +FORK_TEST(Capability, CapEnter) { + EXPECT_EQ(0, cap_enter()); +} + +FORK_TEST(Capability, BasicInterception) { + cap_rights_t r_0; + cap_rights_init(&r_0, 0); + int cap_fd = dup(1); + EXPECT_OK(cap_fd); + EXPECT_OK(cap_rights_limit(cap_fd, &r_0)); + + EXPECT_NOTCAPABLE(write(cap_fd, "", 0)); + + EXPECT_OK(cap_enter()); // Enter capability mode + + EXPECT_NOTCAPABLE(write(cap_fd, "", 0)); + + // Create a new capability which does have write permission + cap_rights_t r_ws; + cap_rights_init(&r_ws, CAP_WRITE, CAP_SEEK); + int cap_fd2 = dup(1); + EXPECT_OK(cap_fd2); + EXPECT_OK(cap_rights_limit(cap_fd2, &r_ws)); + EXPECT_OK(write(cap_fd2, "", 0)); + + // Tidy up. + if (cap_fd >= 0) close(cap_fd); + if (cap_fd2 >= 0) close(cap_fd2); +} + +FORK_TEST_ON(Capability, OpenAtDirectoryTraversal, TmpFile("cap_openat_testfile")) { + int dir = open(tmpdir.c_str(), O_RDONLY); + EXPECT_OK(dir); + + cap_enter(); + + int file = openat(dir, "cap_openat_testfile", O_RDONLY|O_CREAT, 0644); + EXPECT_OK(file); + + // Test that we are confined to /tmp, and cannot + // escape using absolute paths or ../. + int new_file = openat(dir, "../dev/null", O_RDONLY); + EXPECT_EQ(-1, new_file); + + new_file = openat(dir, "..", O_RDONLY); + EXPECT_EQ(-1, new_file); + + new_file = openat(dir, "/dev/null", O_RDONLY); + EXPECT_EQ(-1, new_file); + + new_file = openat(dir, "/", O_RDONLY); + EXPECT_EQ(-1, new_file); + + // Tidy up. + close(file); + close(dir); +} + +FORK_TEST_ON(Capability, FileInSync, TmpFile("cap_file_sync")) { + int fd = open(TmpFile("cap_file_sync"), O_RDWR|O_CREAT, 0644); + EXPECT_OK(fd); + const char* message = "Hello capability world"; + EXPECT_OK(write(fd, message, strlen(message))); + + cap_rights_t r_rsstat; + cap_rights_init(&r_rsstat, CAP_READ, CAP_SEEK, CAP_FSTAT); + + int cap_fd = dup(fd); + EXPECT_OK(cap_fd); + EXPECT_OK(cap_rights_limit(cap_fd, &r_rsstat)); + int cap_cap_fd = dup(cap_fd); + EXPECT_OK(cap_cap_fd); + EXPECT_OK(cap_rights_limit(cap_cap_fd, &r_rsstat)); + + EXPECT_OK(cap_enter()); // Enter capability mode. + + // Changes to one file descriptor affect the others. + EXPECT_EQ(1, lseek(fd, 1, SEEK_SET)); + EXPECT_EQ(1, lseek(fd, 0, SEEK_CUR)); + EXPECT_EQ(1, lseek(cap_fd, 0, SEEK_CUR)); + EXPECT_EQ(1, lseek(cap_cap_fd, 0, SEEK_CUR)); + EXPECT_EQ(3, lseek(cap_fd, 3, SEEK_SET)); + EXPECT_EQ(3, lseek(fd, 0, SEEK_CUR)); + EXPECT_EQ(3, lseek(cap_fd, 0, SEEK_CUR)); + EXPECT_EQ(3, lseek(cap_cap_fd, 0, SEEK_CUR)); + EXPECT_EQ(5, lseek(cap_cap_fd, 5, SEEK_SET)); + EXPECT_EQ(5, lseek(fd, 0, SEEK_CUR)); + EXPECT_EQ(5, lseek(cap_fd, 0, SEEK_CUR)); + EXPECT_EQ(5, lseek(cap_cap_fd, 0, SEEK_CUR)); + + close(cap_cap_fd); + close(cap_fd); + close(fd); +} + +// Create a capability on /tmp that does not allow CAP_WRITE, +// and check that this restriction is inherited through openat(). +FORK_TEST_ON(Capability, Inheritance, TmpFile("cap_openat_write_testfile")) { + int dir = open(tmpdir.c_str(), O_RDONLY); + EXPECT_OK(dir); + + cap_rights_t r_rl; + cap_rights_init(&r_rl, CAP_READ, CAP_LOOKUP); + + int cap_dir = dup(dir); + EXPECT_OK(cap_dir); + EXPECT_OK(cap_rights_limit(cap_dir, &r_rl)); + + const char *filename = "cap_openat_write_testfile"; + int file = openat(dir, filename, O_WRONLY|O_CREAT, 0644); + EXPECT_OK(file); + EXPECT_EQ(5, write(file, "TEST\n", 5)); + if (file >= 0) close(file); + + EXPECT_OK(cap_enter()); + file = openat(cap_dir, filename, O_RDONLY); + EXPECT_OK(file); + + cap_rights_t rights; + cap_rights_init(&rights, 0); + EXPECT_OK(cap_rights_get(file, &rights)); + EXPECT_RIGHTS_EQ(&r_rl, &rights); + if (file >= 0) close(file); + + file = openat(cap_dir, filename, O_WRONLY|O_APPEND); + EXPECT_NOTCAPABLE(file); + if (file > 0) close(file); + + if (dir > 0) close(dir); + if (cap_dir > 0) close(cap_dir); +} + + +// Ensure that, if the capability had enough rights for the system call to +// pass, then it did. Otherwise, ensure that the errno is ENOTCAPABLE; +// capability restrictions should kick in before any other error logic. +#define CHECK_RIGHT_RESULT(result, rights, ...) do { \ + cap_rights_t rights_needed; \ + cap_rights_init(&rights_needed, __VA_ARGS__); \ + if (cap_rights_contains(&rights, &rights_needed)) { \ + EXPECT_OK(result) << std::endl \ + << " need: " << rights_needed \ + << std::endl \ + << " got: " << rights; \ + } else { \ + EXPECT_EQ(-1, result) << " need: " << rights_needed \ + << std::endl \ + << " got: "<< rights; \ + EXPECT_EQ(ENOTCAPABLE, errno); \ + } \ +} while (0) + +#define EXPECT_MMAP_NOTCAPABLE(result) do { \ + void *rv = result; \ + EXPECT_EQ(MAP_FAILED, rv); \ + EXPECT_EQ(ENOTCAPABLE, errno); \ + if (rv != MAP_FAILED) munmap(rv, getpagesize()); \ +} while (0) + +#define EXPECT_MMAP_OK(result) do { \ + void *rv = result; \ + EXPECT_NE(MAP_FAILED, rv) << " with errno " << errno; \ + if (rv != MAP_FAILED) munmap(rv, getpagesize()); \ +} while (0) + + +// As above, but for the special mmap() case: unmap after successful mmap(). +#define CHECK_RIGHT_MMAP_RESULT(result, rights, ...) do { \ + cap_rights_t rights_needed; \ + cap_rights_init(&rights_needed, __VA_ARGS__); \ + if (cap_rights_contains(&rights, &rights_needed)) { \ + EXPECT_MMAP_OK(result); \ + } else { \ + EXPECT_MMAP_NOTCAPABLE(result); \ + } \ +} while (0) + +FORK_TEST_ON(Capability, Mmap, TmpFile("cap_mmap_operations")) { + int fd = open(TmpFile("cap_mmap_operations"), O_RDWR | O_CREAT, 0644); + EXPECT_OK(fd); + if (fd < 0) return; + + cap_rights_t r_0; + cap_rights_init(&r_0, 0); + cap_rights_t r_mmap; + cap_rights_init(&r_mmap, CAP_MMAP); + cap_rights_t r_r; + cap_rights_init(&r_r, CAP_PREAD); + cap_rights_t r_rmmap; + cap_rights_init(&r_rmmap, CAP_PREAD, CAP_MMAP); + + // If we're missing a capability, it will fail. + int cap_none = dup(fd); + EXPECT_OK(cap_none); + EXPECT_OK(cap_rights_limit(cap_none, &r_0)); + int cap_mmap = dup(fd); + EXPECT_OK(cap_mmap); + EXPECT_OK(cap_rights_limit(cap_mmap, &r_mmap)); + int cap_read = dup(fd); + EXPECT_OK(cap_read); + EXPECT_OK(cap_rights_limit(cap_read, &r_r)); + int cap_both = dup(fd); + EXPECT_OK(cap_both); + EXPECT_OK(cap_rights_limit(cap_both, &r_rmmap)); + + EXPECT_OK(cap_enter()); // Enter capability mode. + + EXPECT_MMAP_NOTCAPABLE(mmap(NULL, getpagesize(), PROT_READ, MAP_PRIVATE, cap_none, 0)); + EXPECT_MMAP_NOTCAPABLE(mmap(NULL, getpagesize(), PROT_READ, MAP_PRIVATE, cap_mmap, 0)); + EXPECT_MMAP_NOTCAPABLE(mmap(NULL, getpagesize(), PROT_READ, MAP_PRIVATE, cap_read, 0)); + + EXPECT_MMAP_OK(mmap(NULL, getpagesize(), PROT_READ, MAP_PRIVATE, cap_both, 0)); + + // A call with MAP_ANONYMOUS should succeed without any capability requirements. + EXPECT_MMAP_OK(mmap(NULL, getpagesize(), PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)); + + EXPECT_OK(close(cap_both)); + EXPECT_OK(close(cap_read)); + EXPECT_OK(close(cap_mmap)); + EXPECT_OK(close(cap_none)); + EXPECT_OK(close(fd)); +} + +// Given a file descriptor, create a capability with specific rights and +// make sure only those rights work. +#define TRY_FILE_OPS(fd, ...) do { \ + cap_rights_t rights; \ + cap_rights_init(&rights, __VA_ARGS__); \ + TryFileOps((fd), rights); \ +} while (0) + +static void TryFileOps(int fd, cap_rights_t rights) { + int cap_fd = dup(fd); + EXPECT_OK(cap_fd); + EXPECT_OK(cap_rights_limit(cap_fd, &rights)); + if (cap_fd < 0) return; + cap_rights_t erights; + EXPECT_OK(cap_rights_get(cap_fd, &erights)); + EXPECT_RIGHTS_EQ(&rights, &erights); + + // Check creation of a capability from a capability. + int cap_cap_fd = dup(cap_fd); + EXPECT_OK(cap_cap_fd); + EXPECT_OK(cap_rights_limit(cap_cap_fd, &rights)); + EXPECT_NE(cap_fd, cap_cap_fd); + EXPECT_OK(cap_rights_get(cap_cap_fd, &erights)); + EXPECT_RIGHTS_EQ(&rights, &erights); + close(cap_cap_fd); + + char ch; + CHECK_RIGHT_RESULT(read(cap_fd, &ch, sizeof(ch)), rights, CAP_READ, CAP_SEEK_ASWAS); + + ssize_t len1 = pread(cap_fd, &ch, sizeof(ch), 0); + CHECK_RIGHT_RESULT(len1, rights, CAP_PREAD); + ssize_t len2 = pread(cap_fd, &ch, sizeof(ch), 0); + CHECK_RIGHT_RESULT(len2, rights, CAP_PREAD); + EXPECT_EQ(len1, len2); + + CHECK_RIGHT_RESULT(write(cap_fd, &ch, sizeof(ch)), rights, CAP_WRITE, CAP_SEEK_ASWAS); + CHECK_RIGHT_RESULT(pwrite(cap_fd, &ch, sizeof(ch), 0), rights, CAP_PWRITE); + CHECK_RIGHT_RESULT(lseek(cap_fd, 0, SEEK_SET), rights, CAP_SEEK); + +#ifdef HAVE_CHFLAGS + // Note: this is not expected to work over NFS. + struct statfs sf; + EXPECT_OK(fstatfs(fd, &sf)); + bool is_nfs = (strncmp("nfs", sf.f_fstypename, sizeof(sf.f_fstypename)) == 0); + if (!is_nfs) { + CHECK_RIGHT_RESULT(fchflags(cap_fd, UF_NODUMP), rights, CAP_FCHFLAGS); + } +#endif + + CHECK_RIGHT_MMAP_RESULT(mmap(NULL, getpagesize(), PROT_NONE, MAP_SHARED, cap_fd, 0), + rights, CAP_MMAP); + CHECK_RIGHT_MMAP_RESULT(mmap(NULL, getpagesize(), PROT_READ, MAP_SHARED, cap_fd, 0), + rights, CAP_MMAP_R); + CHECK_RIGHT_MMAP_RESULT(mmap(NULL, getpagesize(), PROT_WRITE, MAP_SHARED, cap_fd, 0), + rights, CAP_MMAP_W); + CHECK_RIGHT_MMAP_RESULT(mmap(NULL, getpagesize(), PROT_EXEC, MAP_SHARED, cap_fd, 0), + rights, CAP_MMAP_X); + CHECK_RIGHT_MMAP_RESULT(mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, cap_fd, 0), + rights, CAP_MMAP_RW); + CHECK_RIGHT_MMAP_RESULT(mmap(NULL, getpagesize(), PROT_READ | PROT_EXEC, MAP_SHARED, cap_fd, 0), + rights, CAP_MMAP_RX); + CHECK_RIGHT_MMAP_RESULT(mmap(NULL, getpagesize(), PROT_EXEC | PROT_WRITE, MAP_SHARED, cap_fd, 0), + rights, CAP_MMAP_WX); + CHECK_RIGHT_MMAP_RESULT(mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE | PROT_EXEC, MAP_SHARED, cap_fd, 0), + rights, CAP_MMAP_RWX); + + CHECK_RIGHT_RESULT(fsync(cap_fd), rights, CAP_FSYNC); +#ifdef HAVE_SYNC_FILE_RANGE + CHECK_RIGHT_RESULT(sync_file_range(cap_fd, 0, 1, 0), rights, CAP_FSYNC, CAP_SEEK); +#endif + + int rc = fcntl(cap_fd, F_GETFL); + CHECK_RIGHT_RESULT(rc, rights, CAP_FCNTL); + rc = fcntl(cap_fd, F_SETFL, rc); + CHECK_RIGHT_RESULT(rc, rights, CAP_FCNTL); + + CHECK_RIGHT_RESULT(fchown(cap_fd, -1, -1), rights, CAP_FCHOWN); + + CHECK_RIGHT_RESULT(fchmod(cap_fd, 0644), rights, CAP_FCHMOD); + + CHECK_RIGHT_RESULT(flock(cap_fd, LOCK_SH), rights, CAP_FLOCK); + CHECK_RIGHT_RESULT(flock(cap_fd, LOCK_UN), rights, CAP_FLOCK); + + CHECK_RIGHT_RESULT(ftruncate(cap_fd, 0), rights, CAP_FTRUNCATE); + + struct stat sb; + CHECK_RIGHT_RESULT(fstat(cap_fd, &sb), rights, CAP_FSTAT); + + struct statfs cap_sf; + CHECK_RIGHT_RESULT(fstatfs(cap_fd, &cap_sf), rights, CAP_FSTATFS); + +#ifdef HAVE_FPATHCONF + CHECK_RIGHT_RESULT(fpathconf(cap_fd, _PC_NAME_MAX), rights, CAP_FPATHCONF); +#endif + + CHECK_RIGHT_RESULT(futimes(cap_fd, NULL), rights, CAP_FUTIMES); + + struct pollfd pollfd; + pollfd.fd = cap_fd; + pollfd.events = POLLIN | POLLERR | POLLHUP; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Mar 12 04:49:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 706821544096; Tue, 12 Mar 2019 04:49:49 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 129A772D04; Tue, 12 Mar 2019 04:49:49 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DFCB81DA99; Tue, 12 Mar 2019 04:49:48 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2C4nmtJ069663; Tue, 12 Mar 2019 04:49:48 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2C4nlGO069658; Tue, 12 Mar 2019 04:49:47 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201903120449.x2C4nlGO069658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 12 Mar 2019 04:49:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345049 - in head/sys: amd64/linux32 compat/freebsd32 kern sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: amd64/linux32 compat/freebsd32 kern sys X-SVN-Commit-Revision: 345049 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 129A772D04 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 04:49:49 -0000 Author: imp Date: Tue Mar 12 04:49:47 2019 New Revision: 345049 URL: https://svnweb.freebsd.org/changeset/base/345049 Log: Kill tz_minuteswest and tz_dsttime. Research Unix, 7th Edition introduced TIMEZONE and DSTFLAG compile-time constants in sys/param.h to communicate these values for the machine. 4.2BSD moved from the compile-time to run-time and introduced these variables and used for localtime() to return the right offset from UTC (sometimes referred to as GMT, for this purpose is the same). 4.4BSD migrated to using the tzdata code/database and these variables were basically unused. FreeBSD removed the real need for these with adjkerntz in 1995. However, some RTC clocks continued to use these variables, though they were largely unused otherwise. Later, phk centeralized most of the uses in utc_offset, but left it using both tz_minuteswest and adjkerntz. POSIX (IEEE Std 1003.1-2017) states in the gettimeofday specification "If tzp is not a null pointer, the behavior is unspecified" so there's no standards reason to retain it anymore. In fact, gettimeofday has been marked as obsolecent, meaning it could be removed from a future release of the standard. It is the only interface defined in POSIX that references these two values. All other references come from the tzdata database via tzset(). These were used to more faithfully implement early unix ABIs which have been removed from FreeBSD. NetBSD has completely eliminated these variables years ago. Linux has migrated to tzdata as well, though these variables technically still exist for compatibility with unspecified older programs. So, there's no real reason to have them these days. They are a historical vestige that's no longer used in any meaningful way. Reviewed By: jhb@, brooks@ Differential Revision: https://reviews.freebsd.org/D19550 Modified: head/sys/amd64/linux32/linux32_machdep.c head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/kern_time.c head/sys/kern/subr_clock.c head/sys/sys/clock.h Modified: head/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- head/sys/amd64/linux32/linux32_machdep.c Tue Mar 12 02:52:22 2019 (r345048) +++ head/sys/amd64/linux32/linux32_machdep.c Tue Mar 12 04:49:47 2019 (r345049) @@ -674,8 +674,8 @@ linux_gettimeofday(struct thread *td, struct linux_get error = copyout(&atv32, uap->tp, sizeof(atv32)); } if (error == 0 && uap->tzp != NULL) { - rtz.tz_minuteswest = tz_minuteswest; - rtz.tz_dsttime = tz_dsttime; + rtz.tz_minuteswest = 0; + rtz.tz_dsttime = 0; error = copyout(&rtz, uap->tzp, sizeof(rtz)); } return (error); Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Tue Mar 12 02:52:22 2019 (r345048) +++ head/sys/compat/freebsd32/freebsd32_misc.c Tue Mar 12 04:49:47 2019 (r345049) @@ -834,8 +834,8 @@ freebsd32_gettimeofday(struct thread *td, error = copyout(&atv32, uap->tp, sizeof (atv32)); } if (error == 0 && uap->tzp != NULL) { - rtz.tz_minuteswest = tz_minuteswest; - rtz.tz_dsttime = tz_dsttime; + rtz.tz_minuteswest = 0; + rtz.tz_dsttime = 0; error = copyout(&rtz, uap->tzp, sizeof (rtz)); } return (error); Modified: head/sys/kern/kern_time.c ============================================================================== --- head/sys/kern/kern_time.c Tue Mar 12 02:52:22 2019 (r345048) +++ head/sys/kern/kern_time.c Tue Mar 12 04:49:47 2019 (r345049) @@ -660,8 +660,8 @@ sys_gettimeofday(struct thread *td, struct gettimeofda error = copyout(&atv, uap->tp, sizeof (atv)); } if (error == 0 && uap->tzp != NULL) { - rtz.tz_minuteswest = tz_minuteswest; - rtz.tz_dsttime = tz_dsttime; + rtz.tz_minuteswest = 0; + rtz.tz_dsttime = 0; error = copyout(&rtz, uap->tzp, sizeof (rtz)); } return (error); @@ -712,10 +712,6 @@ kern_settimeofday(struct thread *td, struct timeval *t tv->tv_sec < 0) return (EINVAL); error = settime(td, tv); - } - if (tzp && error == 0) { - tz_minuteswest = tzp->tz_minuteswest; - tz_dsttime = tzp->tz_dsttime; } return (error); } Modified: head/sys/kern/subr_clock.c ============================================================================== --- head/sys/kern/subr_clock.c Tue Mar 12 02:52:22 2019 (r345048) +++ head/sys/kern/subr_clock.c Tue Mar 12 04:49:47 2019 (r345049) @@ -52,9 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include -int tz_minuteswest; -int tz_dsttime; - /* * The adjkerntz and wall_cmos_clock sysctls are in the "machdep" sysctl * namespace because they were misplaced there originally. @@ -386,5 +383,5 @@ int utc_offset(void) { - return (tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0)); + return (wall_cmos_clock ? adjkerntz : 0); } Modified: head/sys/sys/clock.h ============================================================================== --- head/sys/sys/clock.h Tue Mar 12 02:52:22 2019 (r345048) +++ head/sys/sys/clock.h Tue Mar 12 04:49:47 2019 (r345049) @@ -51,12 +51,6 @@ #ifdef _KERNEL /* No user serviceable parts */ -/* - * Timezone info from settimeofday(2), usually not used - */ -extern int tz_minuteswest; -extern int tz_dsttime; - int utc_offset(void); /* From owner-svn-src-all@freebsd.org Tue Mar 12 04:50:00 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 709AA15440D5; Tue, 12 Mar 2019 04:50:00 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0358B72DFF; Tue, 12 Mar 2019 04:50:00 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 739AD1DA9A; Tue, 12 Mar 2019 04:49:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2C4nxvp069720; Tue, 12 Mar 2019 04:49:59 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2C4nxKQ069719; Tue, 12 Mar 2019 04:49:59 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201903120449.x2C4nxKQ069719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 12 Mar 2019 04:49:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345050 - head/bin/date X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/bin/date X-SVN-Commit-Revision: 345050 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0358B72DFF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 04:50:00 -0000 Author: imp Date: Tue Mar 12 04:49:59 2019 New Revision: 345050 URL: https://svnweb.freebsd.org/changeset/base/345050 Log: Remove now useless -d and -t flags. These were used to set dst flag and minutes west of UTC respectively. These are obsolete and have been removed form the kernel. These existed primarily to faithfully emulate early Unix ABIs that have been removed from FreeBSD. Reviewed by: jbh@, brooks@ Differential Revision: https://reviews.freebsd.org/D19550 Modified: head/bin/date/date.c Modified: head/bin/date/date.c ============================================================================== --- head/bin/date/date.c Tue Mar 12 04:49:47 2019 (r345049) +++ head/bin/date/date.c Tue Mar 12 04:49:59 2019 (r345050) @@ -91,14 +91,12 @@ static const char *rfc2822_format = "%a, %d %b %Y %T % int main(int argc, char *argv[]) { - struct timezone tz; int ch, rflag; bool Iflag, jflag, nflag, Rflag; const char *format; char buf[1024]; - char *endptr, *fmt; + char *fmt; char *tmp; - int set_timezone; struct vary *v; const struct vary *badv; struct tm *lt; @@ -108,18 +106,10 @@ main(int argc, char *argv[]) v = NULL; fmt = NULL; (void) setlocale(LC_TIME, ""); - tz.tz_dsttime = tz.tz_minuteswest = 0; rflag = 0; Iflag = jflag = nflag = Rflag = 0; - set_timezone = 0; - while ((ch = getopt(argc, argv, "d:f:I::jnRr:t:uv:")) != -1) + while ((ch = getopt(argc, argv, "f:I::jnRr:uv:")) != -1) switch((char)ch) { - case 'd': /* daylight savings time */ - tz.tz_dsttime = strtol(optarg, &endptr, 10) ? 1 : 0; - if (endptr == optarg || *endptr != '\0') - usage(); - set_timezone = 1; - break; case 'f': fmt = optarg; break; @@ -160,13 +150,6 @@ main(int argc, char *argv[]) usage(); } break; - case 't': /* minutes west of UTC */ - /* error check; don't allow "PST" */ - tz.tz_minuteswest = strtol(optarg, &endptr, 10); - if (endptr == optarg || *endptr != '\0') - usage(); - set_timezone = 1; - break; case 'u': /* do everything in UTC */ (void)setenv("TZ", "UTC0", 1); break; @@ -179,13 +162,6 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; - /* - * If -d or -t, set the timezone or daylight savings time; this - * doesn't belong here; the kernel should not know about either. - */ - if (set_timezone && settimeofday(NULL, &tz) != 0) - err(1, "settimeofday (timezone)"); - if (!rflag && time(&tval) == -1) err(1, "time"); @@ -411,8 +387,7 @@ static void usage(void) { (void)fprintf(stderr, "%s\n%s\n%s\n", - "usage: date [-jnRu] [-d dst] [-r seconds|file] [-t west] " - "[-v[+|-]val[ymwdHMS]]", + "usage: date [-jnRu] [-r seconds|file] [-v[+|-]val[ymwdHMS]]", " " "[-I[date | hours | minutes | seconds]]", " " From owner-svn-src-all@freebsd.org Tue Mar 12 04:57:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 196231544499; Tue, 12 Mar 2019 04:57:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ACB6E733DC; Tue, 12 Mar 2019 04:57:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A38721DC48; Tue, 12 Mar 2019 04:57:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2C4v6o3075237; Tue, 12 Mar 2019 04:57:06 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2C4v6IP075235; Tue, 12 Mar 2019 04:57:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201903120457.x2C4v6IP075235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 12 Mar 2019 04:57:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345051 - head/sbin/camcontrol X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sbin/camcontrol X-SVN-Commit-Revision: 345051 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ACB6E733DC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 04:57:07 -0000 Author: imp Date: Tue Mar 12 04:57:05 2019 New Revision: 345051 URL: https://svnweb.freebsd.org/changeset/base/345051 Log: Add -l to camcontrol readcap. The -l flag sends only the READ CAPACITY (16) sevice action. Normally we send the READ CAPACITY (10) command, and only send RC16 when the capacity is larger than 2TB (since that's the max RC10 can report). However, some badly programmed drives report different numbers for RC10 and RC16. This can be hard to diagnose, but generally there's a "Logical block address out of range" error when RC16 reports a larger number than RC10 and the RC10 number is the correct one. By comparing the output of readcap with and without the -l argmuent, one can determine if there's a mismatch and if the DA_Q_NO_RC16 quirk is needed. Reviewed by: ken@ Differential Revision: https://reviews.freebsd.org/D19536 Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Tue Mar 12 04:49:59 2019 (r345050) +++ head/sbin/camcontrol/camcontrol.8 Tue Mar 12 04:57:05 2019 (r345051) @@ -78,6 +78,7 @@ .Op Fl b .Op Fl h .Op Fl H +.Op Fl l .Op Fl N .Op Fl q .Op Fl s @@ -544,6 +545,11 @@ or .Fl b . .It Fl H Print out the device size in human readable (base 10, 1K == 1000) format. +.It Fl l +Skip sending the SCSI READ CAPACITY (10) command. +Send only the SCSI READ CAPACITY (16) service action and report +its results. +When the two do not match, a quirk is needed to resolve the ambiguity. .It Fl N Print out the number of blocks in the device instead of the last logical block. Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Tue Mar 12 04:49:59 2019 (r345050) +++ head/sbin/camcontrol/camcontrol.c Tue Mar 12 04:57:05 2019 (r345051) @@ -203,7 +203,7 @@ static struct camcontrol_opts option_table[] = { {"load", CAM_CMD_STARTSTOP, CAM_ARG_START_UNIT | CAM_ARG_EJECT, NULL}, {"eject", CAM_CMD_STARTSTOP, CAM_ARG_EJECT, NULL}, {"reportluns", CAM_CMD_REPORTLUNS, CAM_ARG_NONE, "clr:"}, - {"readcapacity", CAM_CMD_READCAP, CAM_ARG_NONE, "bhHNqs"}, + {"readcapacity", CAM_CMD_READCAP, CAM_ARG_NONE, "bhHlNqs"}, {"reprobe", CAM_CMD_REPROBE, CAM_ARG_NONE, NULL}, #endif /* MINIMALISTIC */ {"rescan", CAM_CMD_RESCAN, CAM_ARG_NONE, NULL}, @@ -7162,7 +7162,7 @@ scsireadcapacity(struct cam_device *device, int argc, char *combinedopt, int task_attr, int retry_count, int timeout) { union ccb *ccb; - int blocksizeonly, humanize, numblocks, quiet, sizeonly, baseten; + int blocksizeonly, humanize, numblocks, quiet, sizeonly, baseten, longonly; struct scsi_read_capacity_data rcap; struct scsi_read_capacity_data_long rcaplong; uint64_t maxsector; @@ -7172,6 +7172,7 @@ scsireadcapacity(struct cam_device *device, int argc, blocksizeonly = 0; humanize = 0; + longonly = 0; numblocks = 0; quiet = 0; sizeonly = 0; @@ -7200,6 +7201,9 @@ scsireadcapacity(struct cam_device *device, int argc, humanize++; baseten++; break; + case 'l': + longonly++; + break; case 'N': numblocks++; break; @@ -7242,6 +7246,9 @@ scsireadcapacity(struct cam_device *device, int argc, goto bailout; } + if (longonly != 0) + goto long_only; + scsi_read_capacity(&ccb->csio, /*retries*/ retry_count, /*cbfcnp*/ NULL, @@ -7284,6 +7291,7 @@ scsireadcapacity(struct cam_device *device, int argc, if (maxsector != 0xffffffff) goto do_print; +long_only: scsi_read_capacity_16(&ccb->csio, /*retries*/ retry_count, /*cbfcnp*/ NULL, @@ -9515,7 +9523,7 @@ usage(int printlong) " camcontrol identify [dev_id][generic args] [-v]\n" " camcontrol reportluns [dev_id][generic args] [-c] [-l] [-r report]\n" " camcontrol readcap [dev_id][generic args] [-b] [-h] [-H] [-N]\n" -" [-q] [-s]\n" +" [-q] [-s] [-l]\n" " camcontrol start [dev_id][generic args]\n" " camcontrol stop [dev_id][generic args]\n" " camcontrol load [dev_id][generic args]\n" From owner-svn-src-all@freebsd.org Tue Mar 12 05:10:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 911EC1544C42; Tue, 12 Mar 2019 05:10:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3834773C50; Tue, 12 Mar 2019 05:10:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2CF151DE22; Tue, 12 Mar 2019 05:10:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2C5Aftl081737; Tue, 12 Mar 2019 05:10:41 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2C5Afs9081736; Tue, 12 Mar 2019 05:10:41 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201903120510.x2C5Afs9081736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 12 Mar 2019 05:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345052 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 345052 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3834773C50 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 05:10:42 -0000 Author: imp Date: Tue Mar 12 05:10:41 2019 New Revision: 345052 URL: https://svnweb.freebsd.org/changeset/base/345052 Log: Fix botched merge with 355066 When merging from Netflix's tree, resetting the carsize was dropped accidentally. This fix fixes that revision by properly resetting how many are in the car. Noticed by: mav@ Modified: head/sys/kern/subr_disk.c Modified: head/sys/kern/subr_disk.c ============================================================================== --- head/sys/kern/subr_disk.c Tue Mar 12 04:57:05 2019 (r345051) +++ head/sys/kern/subr_disk.c Tue Mar 12 05:10:41 2019 (r345052) @@ -201,6 +201,7 @@ bioq_insert_tail(struct bio_queue_head *head, struct b TAILQ_INSERT_TAIL(&head->queue, bp, bio_queue); head->total++; + head->batched = 0; head->insert_point = bp; head->last_offset = bp->bio_offset; } From owner-svn-src-all@freebsd.org Tue Mar 12 05:15:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17E821544DF5; Tue, 12 Mar 2019 05:15:43 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 5D72474682; Tue, 12 Mar 2019 05:15:41 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2C5Fbnu013486; Mon, 11 Mar 2019 22:15:37 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2C5Fbtw013485; Mon, 11 Mar 2019 22:15:37 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903120515.x2C5Fbtw013485@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345050 - head/bin/date In-Reply-To: <201903120449.x2C4nxKQ069719@repo.freebsd.org> To: Warner Losh Date: Mon, 11 Mar 2019 22:15:37 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 5D72474682 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.940,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 05:15:43 -0000 > Author: imp > Date: Tue Mar 12 04:49:59 2019 > New Revision: 345050 > URL: https://svnweb.freebsd.org/changeset/base/345050 > > Log: > Remove now useless -d and -t flags. > > These were used to set dst flag and minutes west of UTC > respectively. These are obsolete and have been removed form the > kernel. These existed primarily to faithfully emulate early > Unix ABIs that have been removed from FreeBSD. > > Reviewed by: jbh@, brooks@ > Differential Revision: https://reviews.freebsd.org/D19550 Can we get a commit to stable/12 that puts out a warning if anyone uses -d or -t to the date command please? > Modified: > head/bin/date/date.c > > Modified: head/bin/date/date.c > ============================================================================== > --- head/bin/date/date.c Tue Mar 12 04:49:47 2019 (r345049) > +++ head/bin/date/date.c Tue Mar 12 04:49:59 2019 (r345050) > @@ -91,14 +91,12 @@ static const char *rfc2822_format = "%a, %d %b %Y %T % > int > main(int argc, char *argv[]) > { > - struct timezone tz; > int ch, rflag; > bool Iflag, jflag, nflag, Rflag; > const char *format; > char buf[1024]; > - char *endptr, *fmt; > + char *fmt; > char *tmp; > - int set_timezone; > struct vary *v; > const struct vary *badv; > struct tm *lt; > @@ -108,18 +106,10 @@ main(int argc, char *argv[]) > v = NULL; > fmt = NULL; > (void) setlocale(LC_TIME, ""); > - tz.tz_dsttime = tz.tz_minuteswest = 0; > rflag = 0; > Iflag = jflag = nflag = Rflag = 0; > - set_timezone = 0; > - while ((ch = getopt(argc, argv, "d:f:I::jnRr:t:uv:")) != -1) > + while ((ch = getopt(argc, argv, "f:I::jnRr:uv:")) != -1) > switch((char)ch) { > - case 'd': /* daylight savings time */ > - tz.tz_dsttime = strtol(optarg, &endptr, 10) ? 1 : 0; > - if (endptr == optarg || *endptr != '\0') > - usage(); > - set_timezone = 1; > - break; > case 'f': > fmt = optarg; > break; > @@ -160,13 +150,6 @@ main(int argc, char *argv[]) > usage(); > } > break; > - case 't': /* minutes west of UTC */ > - /* error check; don't allow "PST" */ > - tz.tz_minuteswest = strtol(optarg, &endptr, 10); > - if (endptr == optarg || *endptr != '\0') > - usage(); > - set_timezone = 1; > - break; > case 'u': /* do everything in UTC */ > (void)setenv("TZ", "UTC0", 1); > break; > @@ -179,13 +162,6 @@ main(int argc, char *argv[]) > argc -= optind; > argv += optind; > > - /* > - * If -d or -t, set the timezone or daylight savings time; this > - * doesn't belong here; the kernel should not know about either. > - */ > - if (set_timezone && settimeofday(NULL, &tz) != 0) > - err(1, "settimeofday (timezone)"); > - > if (!rflag && time(&tval) == -1) > err(1, "time"); > > @@ -411,8 +387,7 @@ static void > usage(void) > { > (void)fprintf(stderr, "%s\n%s\n%s\n", > - "usage: date [-jnRu] [-d dst] [-r seconds|file] [-t west] " > - "[-v[+|-]val[ymwdHMS]]", > + "usage: date [-jnRu] [-r seconds|file] [-v[+|-]val[ymwdHMS]]", > " " > "[-I[date | hours | minutes | seconds]]", > " " > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Mar 12 05:17:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A5761544EDF for ; Tue, 12 Mar 2019 05:17:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1104C748CF for ; Tue, 12 Mar 2019 05:17:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x835.google.com with SMTP id x20so1264105qto.1 for ; Mon, 11 Mar 2019 22:17:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1FJ7Qxfxa3VH748fV7kHno4Js7xGgHhqSpwSQMRizHI=; b=X+HXxA4x9rv2KcP4yrINHSk3hiIM/bpMR9P0pe0efeHUmHwbYX4DkS7xIII2sEq92j c83O3FIJPFhUVek6jzgmkOqiWQs9fVEage7WiJtVzUrVJxPQk2En07V5ENvazDjo/UuM ZanfESWZrlfFd8tqBn0Kdic2NmusxPVgprBqAGdn4AcghbDzVeG04rd7nvnJfSirUoGi 9eKUGXqIXiASErZiiJoWpzFZPks99dDEFjDtIpYAvqlYl59Om1TTx6MXCgsr5+ljlcG9 NcT1iJ2h4sbXEMf03Chw/wQqd6w38NgcCtpEWd7E7wkSe+zjBBkPvsxe4izzemFUmfxu SMsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1FJ7Qxfxa3VH748fV7kHno4Js7xGgHhqSpwSQMRizHI=; b=Dbs92xliHQRcixVhRehHsGdlfZvdo38WbF4pyO1c6MkoI4lBW3CUgl3UI3AI3KaZc+ 19jo7ZZImkrA7485xxok49hvBrR/eRBs+6PB+D9eXPb97vw9c2Y4IEhyvBhCB8dAqyA+ 6NtGnydXNEs0BfTOySgW7kD3tlvcuTpqlEq1qUyJcnj0vY21B/ZAkyQYjHaWMHtXWbae IjMI8vz8XiUKo1/Zz9ovjJ7fVM+tuVp9SDrh8d91jNvJjPLMvoT7MyFokuZVN63rqtYL XlJuUT6AdlLqrSr5aIWn+INlryXM72XSwMUzl55cUHfrkMOaHJbIDGA/ai/tLRNAkJqW m/Gw== X-Gm-Message-State: APjAAAVFZB0GKLt970LYSis9D2ow3c28sYjYoRL+hLKECRcBRgBYRazd BP7Vqu8IbnnBGhnAR7pBXN1kaQ0/snCSg6BdUHc6PQ== X-Google-Smtp-Source: APXvYqw9/WmSgX4wK0QNfwcHuEyT3eysukcerRhduLe0lOBf3tYpQl18r3EPe8ruyh0DQb8/ghJA8RU0wb7G4a8BO9E= X-Received: by 2002:ac8:3616:: with SMTP id m22mr17043595qtb.15.1552367869177; Mon, 11 Mar 2019 22:17:49 -0700 (PDT) MIME-Version: 1.0 References: <201903120510.x2C5Afs9081736@repo.freebsd.org> In-Reply-To: <201903120510.x2C5Afs9081736@repo.freebsd.org> From: Warner Losh Date: Mon, 11 Mar 2019 23:17:37 -0600 Message-ID: Subject: Re: svn commit: r345052 - head/sys/kern To: Warner Losh Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 1104C748CF X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 05:17:50 -0000 On Mon, Mar 11, 2019 at 11:10 PM Warner Losh wrote: > Author: imp > Date: Tue Mar 12 05:10:41 2019 > New Revision: 345052 > URL: https://svnweb.freebsd.org/changeset/base/345052 > > Log: > Fix botched merge with 355066 > It was actually 335066. And since this was before the 12 branch, it should be MFC'd in a week or so. Warner > When merging from Netflix's tree, resetting the carsize was dropped > accidentally. This fix fixes that revision by properly resetting how > many are in the car. > > Noticed by: mav@ > > Modified: > head/sys/kern/subr_disk.c > > Modified: head/sys/kern/subr_disk.c > > ============================================================================== > --- head/sys/kern/subr_disk.c Tue Mar 12 04:57:05 2019 (r345051) > +++ head/sys/kern/subr_disk.c Tue Mar 12 05:10:41 2019 (r345052) > @@ -201,6 +201,7 @@ bioq_insert_tail(struct bio_queue_head *head, struct b > > TAILQ_INSERT_TAIL(&head->queue, bp, bio_queue); > head->total++; > + head->batched = 0; > head->insert_point = bp; > head->last_offset = bp->bio_offset; > } > > From owner-svn-src-all@freebsd.org Tue Mar 12 05:25:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CD7C1545131; Tue, 12 Mar 2019 05:25:20 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 B8A8874E13; Tue, 12 Mar 2019 05:25:19 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2C5PHwv013553; Mon, 11 Mar 2019 22:25:17 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2C5PH7X013552; Mon, 11 Mar 2019 22:25:17 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903120525.x2C5PH7X013552@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345050 - head/bin/date In-Reply-To: <201903120515.x2C5Fbtw013485@gndrsh.dnsmgr.net> To: rgrimes@freebsd.org Date: Mon, 11 Mar 2019 22:25:17 -0700 (PDT) CC: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: B8A8874E13 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.935,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 05:25:20 -0000 > > Author: imp > > Date: Tue Mar 12 04:49:59 2019 > > New Revision: 345050 > > URL: https://svnweb.freebsd.org/changeset/base/345050 > > > > Log: > > Remove now useless -d and -t flags. > > > > These were used to set dst flag and minutes west of UTC > > respectively. These are obsolete and have been removed form the > > kernel. These existed primarily to faithfully emulate early > > Unix ABIs that have been removed from FreeBSD. > > > > Reviewed by: jbh@, brooks@ Nits: jhb@ and I see he did comment in the review, but he did not accept it as a reviewew at the top. > > Differential Revision: https://reviews.freebsd.org/D19550 > > Can we get a commit to stable/12 that puts out a warning if > anyone uses -d or -t to the date command please? And I just noticed you did not fix the man page for this. > > Modified: > > head/bin/date/date.c > > > > Modified: head/bin/date/date.c > > ============================================================================== > > --- head/bin/date/date.c Tue Mar 12 04:49:47 2019 (r345049) > > +++ head/bin/date/date.c Tue Mar 12 04:49:59 2019 (r345050) > > @@ -91,14 +91,12 @@ static const char *rfc2822_format = "%a, %d %b %Y %T % > > int > > main(int argc, char *argv[]) > > { > > - struct timezone tz; > > int ch, rflag; > > bool Iflag, jflag, nflag, Rflag; > > const char *format; > > char buf[1024]; > > - char *endptr, *fmt; > > + char *fmt; > > char *tmp; > > - int set_timezone; > > struct vary *v; > > const struct vary *badv; > > struct tm *lt; > > @@ -108,18 +106,10 @@ main(int argc, char *argv[]) > > v = NULL; > > fmt = NULL; > > (void) setlocale(LC_TIME, ""); > > - tz.tz_dsttime = tz.tz_minuteswest = 0; > > rflag = 0; > > Iflag = jflag = nflag = Rflag = 0; > > - set_timezone = 0; > > - while ((ch = getopt(argc, argv, "d:f:I::jnRr:t:uv:")) != -1) > > + while ((ch = getopt(argc, argv, "f:I::jnRr:uv:")) != -1) > > switch((char)ch) { > > - case 'd': /* daylight savings time */ > > - tz.tz_dsttime = strtol(optarg, &endptr, 10) ? 1 : 0; > > - if (endptr == optarg || *endptr != '\0') > > - usage(); > > - set_timezone = 1; > > - break; > > case 'f': > > fmt = optarg; > > break; > > @@ -160,13 +150,6 @@ main(int argc, char *argv[]) > > usage(); > > } > > break; > > - case 't': /* minutes west of UTC */ > > - /* error check; don't allow "PST" */ > > - tz.tz_minuteswest = strtol(optarg, &endptr, 10); > > - if (endptr == optarg || *endptr != '\0') > > - usage(); > > - set_timezone = 1; > > - break; > > case 'u': /* do everything in UTC */ > > (void)setenv("TZ", "UTC0", 1); > > break; > > @@ -179,13 +162,6 @@ main(int argc, char *argv[]) > > argc -= optind; > > argv += optind; > > > > - /* > > - * If -d or -t, set the timezone or daylight savings time; this > > - * doesn't belong here; the kernel should not know about either. > > - */ > > - if (set_timezone && settimeofday(NULL, &tz) != 0) > > - err(1, "settimeofday (timezone)"); > > - > > if (!rflag && time(&tval) == -1) > > err(1, "time"); > > > > @@ -411,8 +387,7 @@ static void > > usage(void) > > { > > (void)fprintf(stderr, "%s\n%s\n%s\n", > > - "usage: date [-jnRu] [-d dst] [-r seconds|file] [-t west] " > > - "[-v[+|-]val[ymwdHMS]]", > > + "usage: date [-jnRu] [-r seconds|file] [-v[+|-]val[ymwdHMS]]", > > " " > > "[-I[date | hours | minutes | seconds]]", > > " " > > > > > > -- > Rod Grimes rgrimes@freebsd.org > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Mar 12 05:36:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0949715454D0; Tue, 12 Mar 2019 05:36:37 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B88A07552A; Tue, 12 Mar 2019 05:36:35 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id 3a5RhmxIfBEqw3a5She4iO; Mon, 11 Mar 2019 23:36:27 -0600 X-Authority-Analysis: v=2.3 cv=KLsk82No c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=NTGMnVQrEZIA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=cTdznIEMGrY7a0xPgYYA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id EB698644; Mon, 11 Mar 2019 22:36:24 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x2C5aOwQ077065; Mon, 11 Mar 2019 22:36:24 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x2C5aOL5077062; Mon, 11 Mar 2019 22:36:24 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201903120536.x2C5aOL5077062@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Warner Losh cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r345052 - head/sys/kern In-Reply-To: Message from Warner Losh of "Tue, 12 Mar 2019 05:10:41 -0000." <201903120510.x2C5Afs9081736@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 11 Mar 2019 22:36:24 -0700 X-CMAE-Envelope: MS4wfIajubdj2VFnG2Ru9+IKrQ1FQjGzN6Zab0ZeqL6C32e0MsBmX+vXxRI7YAiv7aL0cejiTWF0ZoMv9qt52EEWmxckEwaF+8sZeBtyO/NlWLXoSjRcpmUk 12TPdtTORLMyqTYReO/tknwCla+F3Yr7XvZqG7T+rUKkyjbmY8M8XGA6LzFO5gDy4QEuealVyb4STi83c5hrjmtkSq6qMZoD/M5uTOlL8k2/NaMvhlsnQ/BI ftsbugxYTs7TW/gM7VRbYWqjvP+pRItAsgpXHPfXd5EPgKQY8VimRc1ElybgHsCB X-Rspamd-Queue-Id: B88A07552A X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.58 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; NEURAL_HAM_SHORT(-0.63)[-0.626,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-2.24)[ip: (-6.16), ipnet: 64.59.128.0/20(-2.81), asn: 6327(-2.16), country: CA(-0.09)]; RCVD_IN_DNSWL_LOW(-0.10)[13.134.59.64.list.dnswl.org : 127.0.5.1] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 05:36:37 -0000 In message <201903120510.x2C5Afs9081736@repo.freebsd.org>, Warner Losh writes: > Author: imp > Date: Tue Mar 12 05:10:41 2019 > New Revision: 345052 > URL: https://svnweb.freebsd.org/changeset/base/345052 > > Log: > Fix botched merge with 355066 Should this be 335066? > > When merging from Netflix's tree, resetting the carsize was dropped > accidentally. This fix fixes that revision by properly resetting how > many are in the car. > > Noticed by: mav@ > > Modified: > head/sys/kern/subr_disk.c > > Modified: head/sys/kern/subr_disk.c > ============================================================================= > = > --- head/sys/kern/subr_disk.c Tue Mar 12 04:57:05 2019 (r345051) > +++ head/sys/kern/subr_disk.c Tue Mar 12 05:10:41 2019 (r345052) > @@ -201,6 +201,7 @@ bioq_insert_tail(struct bio_queue_head *head, struct b > > TAILQ_INSERT_TAIL(&head->queue, bp, bio_queue); > head->total++; > + head->batched = 0; > head->insert_point = bp; > head->last_offset = bp->bio_offset; > } > -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Tue Mar 12 05:43:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E23D61545742 for ; Tue, 12 Mar 2019 05:43:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 70EBB7598F for ; Tue, 12 Mar 2019 05:43:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x741.google.com with SMTP id c189so745890qke.6 for ; Mon, 11 Mar 2019 22:43:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DGfOffF212KPOctWRXDIkPY+0USgUZ+gJjnm4Q+ZxBE=; b=0pbPYmwH7GruIqkiHhLi5pzqgQOT6pTQByBKNLvk/1iNfxUY0JX0X6K01fEHhrkIOD avYzljz5v4WZKceghjV1Ste8VCWEnjGHrUVu/x9Xz/t0UNf1f3STb2fIIjgAsT32ne8K lg4agYlDdH7xXSL9QRr5+GrBQLAHvQDJnb9GW1H6bVmS+/+eTXG2i3oW+JKuJrDjSN4a 09YmbwhSoW1t5yUApZv9Nljq71E6H97vxvKDJ+6ottVcdjJxnE4SRF68FokcksYPYGvI QjOoJ5AjMeX3fsSHthSdLKuE+GfP9n7QdpFRd3Xba8tAQIPveLvMpxEeQ4qZ/Ob382fF 0RWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DGfOffF212KPOctWRXDIkPY+0USgUZ+gJjnm4Q+ZxBE=; b=i1XrV3mCVE+TJXaZf62mgGNTm+yrP4A179qm1OLY87ouhe7YhQo0QhB4vIgGJjwHSO hcG8lGbZkMLg90DaitfA4WmYkUwyeOFJgGhzQC6wRLCbxe2RZf0nmB4CpDsqxsA0KA/3 biida3syMOcDAuZpjAk51u3WoyjacCCezvMHXVgQ1SAXWPZz9emaMtotmo64NzEG5gEv eZOyk/6cCohmXuKgM5DtHEQmoJNv6dxB9TGaaz2Odrw22iC41JNuNcIaCyj8TeZ9MBdV xgOGoh4Uv+ukxSmEYN3FXJaL31lFe6ng4wL+kUGc54W/MbRiqxxca6ht+mgt9Z3d6IkB 7w7g== X-Gm-Message-State: APjAAAVxUiU5CC2NH/q6INADL/SU4NwP2wBhbiudXVbdy13+b9DH/cQY TaN8hmjIzHR9GVmN3zzO5pjLFPZraR7N0o4Tpu/Kiw== X-Google-Smtp-Source: APXvYqznmxwtbsxsuqpSqO/sW+GBI9LjEKXnmqECYB+b6kWB7IxiY7rvAS9XHSPOD0b6hIGpTDiISqCktwIK5AnvxI0= X-Received: by 2002:a37:6fc2:: with SMTP id k185mr23658693qkc.175.1552369418682; Mon, 11 Mar 2019 22:43:38 -0700 (PDT) MIME-Version: 1.0 References: <201903120515.x2C5Fbtw013485@gndrsh.dnsmgr.net> <201903120525.x2C5PH7X013552@gndrsh.dnsmgr.net> In-Reply-To: <201903120525.x2C5PH7X013552@gndrsh.dnsmgr.net> From: Warner Losh Date: Mon, 11 Mar 2019 23:43:27 -0600 Message-ID: Subject: Re: svn commit: r345050 - head/bin/date To: "Rodney W. Grimes" Cc: Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 70EBB7598F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 05:43:40 -0000 On Mon, Mar 11, 2019 at 11:25 PM Rodney W. Grimes wrote: > > > Author: imp > > > Date: Tue Mar 12 04:49:59 2019 > > > New Revision: 345050 > > > URL: https://svnweb.freebsd.org/changeset/base/345050 > > > > > > Log: > > > Remove now useless -d and -t flags. > > > > > > These were used to set dst flag and minutes west of UTC > > > respectively. These are obsolete and have been removed form the > > > kernel. These existed primarily to faithfully emulate early > > > Unix ABIs that have been removed from FreeBSD. > > > > > > Reviewed by: jbh@, brooks@ > Nits: jhb@ and I see he did comment in the review, but he did not > accept it as a reviewew at the top. > This is why I think just the reference to the differential revision is perfectly fine. Why duplicate data? Others complained I hadn't included it. He commented, we discussed it on irc (though most of it was about how to use arc better), etc. I thought it warranted it. So please don't nitpick. This level is really annoying and frustrating. Does this really help us produce a better product? > > Differential Revision: https://reviews.freebsd.org/D19550 > > > > Can we get a commit to stable/12 that puts out a warning if > > anyone uses -d or -t to the date command please? > I don't think it's worth it for a feature that's been obsolete for 20 years, but if someone else wants to do so, I'll not object. And I just noticed you did not fix the man page for this. > Ah, yes. I'll fix that. Warner > > > Modified: > > > head/bin/date/date.c > > > > > > Modified: head/bin/date/date.c > > > > ============================================================================== > > > --- head/bin/date/date.c Tue Mar 12 04:49:47 2019 (r345049) > > > +++ head/bin/date/date.c Tue Mar 12 04:49:59 2019 (r345050) > > > @@ -91,14 +91,12 @@ static const char *rfc2822_format = "%a, %d %b %Y > %T % > > > int > > > main(int argc, char *argv[]) > > > { > > > - struct timezone tz; > > > int ch, rflag; > > > bool Iflag, jflag, nflag, Rflag; > > > const char *format; > > > char buf[1024]; > > > - char *endptr, *fmt; > > > + char *fmt; > > > char *tmp; > > > - int set_timezone; > > > struct vary *v; > > > const struct vary *badv; > > > struct tm *lt; > > > @@ -108,18 +106,10 @@ main(int argc, char *argv[]) > > > v = NULL; > > > fmt = NULL; > > > (void) setlocale(LC_TIME, ""); > > > - tz.tz_dsttime = tz.tz_minuteswest = 0; > > > rflag = 0; > > > Iflag = jflag = nflag = Rflag = 0; > > > - set_timezone = 0; > > > - while ((ch = getopt(argc, argv, "d:f:I::jnRr:t:uv:")) != -1) > > > + while ((ch = getopt(argc, argv, "f:I::jnRr:uv:")) != -1) > > > switch((char)ch) { > > > - case 'd': /* daylight savings time */ > > > - tz.tz_dsttime = strtol(optarg, &endptr, 10) ? 1 : > 0; > > > - if (endptr == optarg || *endptr != '\0') > > > - usage(); > > > - set_timezone = 1; > > > - break; > > > case 'f': > > > fmt = optarg; > > > break; > > > @@ -160,13 +150,6 @@ main(int argc, char *argv[]) > > > usage(); > > > } > > > break; > > > - case 't': /* minutes west of UTC */ > > > - /* error check; don't allow "PST" > */ > > > - tz.tz_minuteswest = strtol(optarg, &endptr, 10); > > > - if (endptr == optarg || *endptr != '\0') > > > - usage(); > > > - set_timezone = 1; > > > - break; > > > case 'u': /* do everything in UTC */ > > > (void)setenv("TZ", "UTC0", 1); > > > break; > > > @@ -179,13 +162,6 @@ main(int argc, char *argv[]) > > > argc -= optind; > > > argv += optind; > > > > > > - /* > > > - * If -d or -t, set the timezone or daylight savings time; this > > > - * doesn't belong here; the kernel should not know about either. > > > - */ > > > - if (set_timezone && settimeofday(NULL, &tz) != 0) > > > - err(1, "settimeofday (timezone)"); > > > - > > > if (!rflag && time(&tval) == -1) > > > err(1, "time"); > > > > > > @@ -411,8 +387,7 @@ static void > > > usage(void) > > > { > > > (void)fprintf(stderr, "%s\n%s\n%s\n", > > > - "usage: date [-jnRu] [-d dst] [-r seconds|file] [-t west] " > > > - "[-v[+|-]val[ymwdHMS]]", > > > + "usage: date [-jnRu] [-r seconds|file] [-v[+|-]val[ymwdHMS]]", > > > " " > > > "[-I[date | hours | minutes | seconds]]", > > > " " > > > > > > > > > > -- > > Rod Grimes > rgrimes@freebsd.org > > > > > > -- > Rod Grimes > rgrimes@freebsd.org > From owner-svn-src-all@freebsd.org Tue Mar 12 05:59:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 080A21546326 for ; Tue, 12 Mar 2019 05:59:41 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 92927763F2 for ; Tue, 12 Mar 2019 05:59:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x732.google.com with SMTP id u22so735494qkj.11 for ; Mon, 11 Mar 2019 22:59:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RbabkV9kypsw6MNwU5j0itiHwIwglZUb1UDBU2EYD0w=; b=UMzSBPl74ZhRiYGUf8BUR1gkFQbo6UbqgJNt9T9YFiKh5RknXVeI6b3Z9Mr+b0cKO4 1k3El1k7Su0gM8EJ1KhHZJoyre+9y6VrstRoU5+6EmjAMK9Zg2C/Gmq5fTBoWFrBmjng fveXMhAtiDpffVvOvlQXD/WlZz6ctmFQE/q9knF1YIVaCJpt8TD/aj+7/Ql5b+29ya8+ vQHiCs1rKlOPuFLOhIlwRJy6JprLcV0+5T+ZIQZ6gV/W17X5u03aUWrTe5QHXvx+DJDh JTNFnlbapKMFiLzVINo5KXQgmtSJFUrRv/SoM6o0J7v59StjFmGIrXodTRSN2SXk2gHJ tSIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RbabkV9kypsw6MNwU5j0itiHwIwglZUb1UDBU2EYD0w=; b=EuDqnQ3bDDYaNan7VtuuHHV7DkF4sgRWix4FM49InTmr49rjc06qdTyR5FrPk6l7+E 8wULoqjHyFj+jFaJLrp9Va5J575VZmOQfk9N9EsKZ3B5YvPAkt5WRlvF0YrsBJYls0ZW 2PYpkoNGrySo1inDXoP0fTyYpc0nVQPQbzJ47ct6zbl7gqqdhU4drNzx5+mhsm4lQXJB ykJ9vU3xMrhMaqWu9KSKo30zAGFEf20NQ3iXImK9j3fFGCH5/PNnqRnxyQl2/VwRO6Zc ZX9l8NlNQcFutmaF0dCSdeeRj6R2dwoRrXaMdq6ivPg6wfM5h+d5weqlfGX9+m7+e6+v 8DEA== X-Gm-Message-State: APjAAAVYDv+5RP6Nn1GvBWaPMsKPQ+mzOFNLmhrfbl7NFl4VzIvhPiXK 7/aksU2k4niGRsjyOpaJ6Pjufgdg+QXKyA+r4OMEqw== X-Google-Smtp-Source: APXvYqzooDoaexI7deiOw/00SrOmHqEWqSYqIhQgg+kaVBKNeLDzSD6/yVgXhTxWcnUKJWh7YaWBQ7IqtpnnJVC9JGw= X-Received: by 2002:a05:620a:132b:: with SMTP id p11mr5336603qkj.279.1552370380004; Mon, 11 Mar 2019 22:59:40 -0700 (PDT) MIME-Version: 1.0 References: <201903091717.x29HHjcc069618@repo.freebsd.org> <201903092000.x29K0Rf6002120@gndrsh.dnsmgr.net> <20190310150728.GA97029@FreeBSD.org> <20190311081644.GA87064@server.rulingia.com> In-Reply-To: <20190311081644.GA87064@server.rulingia.com> From: Warner Losh Date: Mon, 11 Mar 2019 23:59:28 -0600 Message-ID: Subject: Re: svn commit: r344970 - head To: Peter Jeremy Cc: Alexey Dokuchaev , "Rodney W. Grimes" , Warner Losh , svn-src-head , svn-src-all , src-committers X-Rspamd-Queue-Id: 92927763F2 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 05:59:41 -0000 On Mon, Mar 11, 2019 at 2:17 AM Peter Jeremy wrote: > On 2019-Mar-10 09:38:53 -0600, Warner Losh wrote: > >On Sun, Mar 10, 2019 at 9:07 AM Alexey Dokuchaev > wrote: > > > >> On Sat, Mar 09, 2019 at 12:00:27PM -0800, Rodney W. Grimes wrote: > >> > > New Revision: 344970 > >> > > binaries). Failure to do so may leave you with a system that is > >> > > hard to boot to recover. A GENERIC kernel will include suitable > >> > > - compatibility options to run binaries from older branches. > >> > > + compatibility options to run binaries from supported older > >> branches. > >> > > >> > This is probably not the best adjective here, supported only goes > back to > >> > 11.x, there are COMPAT options that work all the way back to 4. > >> > >> I concur, this "supported" word sounds like we barely give a fuck. > Being > >> able to run old (very old) binaries had always been one of our > strengths, > >> and we should not suggest that it's not anymore. > >> > > > >It isn't saying we don't support older binaries. It sets the limits on > what > ... > >upgrading from. We can (and do) support additional binaries, and having > the > >clarification here doesn't change that. > > I think the changed wording implies that we no longer provide compatibity > with unsupported branches. I agree that we might in future decide to > remove COMPAT_FREEBSDx for unsupported x but until then, I'd prefer wording > along the lines of: > "A GENERIC kernel will include suitable compatibility options to run > binaries from older branches. Note that the ability to run binaries > from unsupported branches is not guaranteed." > Thanks for the constructive suggestion. I appreciate you taking the time to make this better. Warner > -- > Peter Jeremy > -----BEGIN PGP SIGNATURE----- > > iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAlyGGWxfFIAAAAAALgAo > aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF > QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi > CzQ9/Q//alwnrCnIBEGE8YP4bvmgS/f7toPlTJx5OStjtTK0aG1uoErmO8THKzV0 > jH439z1yrfi9xBhCOZvU91dTYbCFu0P8Hgswp0V741dAfjx6C3kmlmbLYtcFreaL > KJfwa0ogGAy27B8XBlPCZFuqT1K6JqLAQO56KxI6Jl+rakpx2DZ4gePT+RRAofwL > eIwJkEo9SOoj/Hg2avw9019ixOlj6K+JQJSEqVRfvt7BHgGT2cGBy5IvQqkXB62Q > 901QXl3odMGq6j30qxmx/034V9+cEWdUSEYhGaa/41MBN20aVXvPrn5sbjRgPbDF > vnAdzQ/N7lRaT6uDyJDeZbdtdaRTy+Qj5OVM8wocwfxFX3GjBNNWFc92raD3eRow > IHLeCt32JR7krE0qR52byBbb8/x9MJg6qt0ELcUV7JDkSeNGnn9Wj2e5llfH6mtg > KNke/YpWz7p1U/xm3EjUbBwLNA4NMJHNadmRc0jtraQ2v9v+rNb0DMp7nv3DASYp > 7bBHHkEVBUjKtwtnipXa6PparAM4G19X47c0CpZ6zkLezdNGXkvF4x+HWsJlngOG > MoXeyo7EB/7diBMMK9JKo0pqzD2yb+hb9Tsl6WxXdLmJEClPJO9olya+QQMaAVP7 > yTCpYzBhtsnFXPEnzh5LqKaw6kAb4jY0u+qMy9Yl6untCORDoFI= > =nst/ > -----END PGP SIGNATURE----- > From owner-svn-src-all@freebsd.org Tue Mar 12 06:01:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C2CF1546523; Tue, 12 Mar 2019 06:01:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CF2977678B; Tue, 12 Mar 2019 06:01:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C32391E740; Tue, 12 Mar 2019 06:01:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2C61hHR010445; Tue, 12 Mar 2019 06:01:43 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2C61hLe010444; Tue, 12 Mar 2019 06:01:43 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201903120601.x2C61hLe010444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 12 Mar 2019 06:01:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345053 - head X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 345053 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CF2977678B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 06:01:44 -0000 Author: imp Date: Tue Mar 12 06:01:43 2019 New Revision: 345053 URL: https://svnweb.freebsd.org/changeset/base/345053 Log: Tweak wording a little. Submitted by: peterj@ Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Mar 12 05:10:41 2019 (r345052) +++ head/UPDATING Tue Mar 12 06:01:43 2019 (r345053) @@ -1931,13 +1931,14 @@ COMMON ITEMS: can be deleted by "make delete-old-libs", but you have to make sure that no program is using those libraries anymore. - [8] The new kernel must be able to run existing binaries used by - an installworld. When upgrading across major versions, the new - kernel's configuration must include the correct COMPAT_FREEBSD - option for existing binaries (e.g. COMPAT_FREEBSD11 to run 11.x - binaries). Failure to do so may leave you with a system that is - hard to boot to recover. A GENERIC kernel will include suitable - compatibility options to run binaries from supported older branches. + [8] The new kernel must be able to run existing binaries used by an + installworld. When upgrading across major versions, the new kernel's + configuration must include the correct COMPAT_FREEBSD option for + existing binaries (e.g. COMPAT_FREEBSD11 to run 11.x binaries). Failure + to do so may leave you with a system that is hard to boot to recover. A + GENERIC kernel will include suitable compatibility options to run + binaries from older branches. Note that the ability to run binaries + from unsupported branches is not guaranteed. Make sure that you merge any new devices from GENERIC since the last time you updated your kernel config file. Options also From owner-svn-src-all@freebsd.org Tue Mar 12 07:40:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B97341517261; Tue, 12 Mar 2019 07:40:39 +0000 (UTC) (envelope-from wosch@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E6AC81144; Tue, 12 Mar 2019 07:40:39 +0000 (UTC) (envelope-from wosch@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 53B031F7C4; Tue, 12 Mar 2019 07:40:39 +0000 (UTC) (envelope-from wosch@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2C7ed4u060975; Tue, 12 Mar 2019 07:40:39 GMT (envelope-from wosch@FreeBSD.org) Received: (from wosch@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2C7edFM060974; Tue, 12 Mar 2019 07:40:39 GMT (envelope-from wosch@FreeBSD.org) Message-Id: <201903120740.x2C7edFM060974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wosch set sender to wosch@FreeBSD.org using -f From: Wolfram Schneider Date: Tue, 12 Mar 2019 07:40:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345054 - head X-SVN-Group: head X-SVN-Commit-Author: wosch X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 345054 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5E6AC81144 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 07:40:39 -0000 Author: wosch Date: Tue Mar 12 07:40:38 2019 New Revision: 345054 URL: https://svnweb.freebsd.org/changeset/base/345054 Log: `make buildworld' should display the build time in seconds PR: 224433 Reviewed by: emaste, @bdrewery Approved by: cem Differential Revision: https://reviews.freebsd.org/D13911 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Mar 12 06:01:43 2019 (r345053) +++ head/Makefile.inc1 Tue Mar 12 07:40:38 2019 (r345054) @@ -1143,6 +1143,12 @@ WMAKE_TGTS+= everything WMAKE_TGTS+= build${libcompat} .endif +# record buildworld time in seconds +.if make(buildworld) +_BUILDWORLD_START!= date '+%s' +.export _BUILDWORLD_START +.endif + buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue .PHONY .ORDER: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue @@ -1155,6 +1161,9 @@ buildworld_epilogue: .PHONY @echo @echo "--------------------------------------------------------------" @echo ">>> World build completed on `LC_ALL=C date`" + @seconds=$$(($$(date '+%s') - ${_BUILDWORLD_START})); \ + echo -n ">>> World build in $$seconds seconds, "; \ + echo "ncpu: $$(sysctl -n hw.ncpu)${.MAKE.JOBS:S/^/, make -j/}" @echo "--------------------------------------------------------------" # From owner-svn-src-all@freebsd.org Tue Mar 12 08:31:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A48EB152556E; Tue, 12 Mar 2019 08:31:44 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 41A2F831A4; Tue, 12 Mar 2019 08:31:44 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 379A6200AF; Tue, 12 Mar 2019 08:31:44 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2C8VijG090850; Tue, 12 Mar 2019 08:31:44 GMT (envelope-from gahr@FreeBSD.org) Received: (from gahr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2C8Vi0p090849; Tue, 12 Mar 2019 08:31:44 GMT (envelope-from gahr@FreeBSD.org) Message-Id: <201903120831.x2C8Vi0p090849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gahr set sender to gahr@FreeBSD.org using -f From: Pietro Cerutti Date: Tue, 12 Mar 2019 08:31:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345055 - head/usr.sbin/freebsd-update X-SVN-Group: head X-SVN-Commit-Author: gahr X-SVN-Commit-Paths: head/usr.sbin/freebsd-update X-SVN-Commit-Revision: 345055 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 41A2F831A4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 08:31:44 -0000 Author: gahr (ports committer) Date: Tue Mar 12 08:31:43 2019 New Revision: 345055 URL: https://svnweb.freebsd.org/changeset/base/345055 Log: freebsd-update: restore old exit code when no updates are available locally This unbreaks ezjail and iocell, which get into an endless loop trying to figure out how many times "freebsd-update install" needs to be called. PR: 229346 Submitted by: Mike Cole Approved by: bapt MFC after: 1 week Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 12 07:40:38 2019 (r345054) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 12 08:31:43 2019 (r345055) @@ -819,6 +819,7 @@ install_check_params () { echo "No updates are available to install." if [ $ISFETCHED -eq 0 ]; then echo "Run '$0 fetch' first." + exit 1 fi exit 0 fi From owner-svn-src-all@freebsd.org Tue Mar 12 09:24:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 948BC152741A; Tue, 12 Mar 2019 09:24:59 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 353A884FAD; Tue, 12 Mar 2019 09:24:59 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 249AF20ADB; Tue, 12 Mar 2019 09:24:59 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2C9Ow6J017477; Tue, 12 Mar 2019 09:24:58 GMT (envelope-from kadesai@FreeBSD.org) Received: (from kadesai@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2C9Ow52017475; Tue, 12 Mar 2019 09:24:58 GMT (envelope-from kadesai@FreeBSD.org) Message-Id: <201903120924.x2C9Ow52017475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kadesai set sender to kadesai@FreeBSD.org using -f From: Kashyap D Desai Date: Tue, 12 Mar 2019 09:24:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345056 - head/sys/dev/mrsas X-SVN-Group: head X-SVN-Commit-Author: kadesai X-SVN-Commit-Paths: head/sys/dev/mrsas X-SVN-Commit-Revision: 345056 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 353A884FAD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 09:24:59 -0000 Author: kadesai Date: Tue Mar 12 09:24:58 2019 New Revision: 345056 URL: https://svnweb.freebsd.org/changeset/base/345056 Log: fw_outstanding"(outstanding IOs at firmware level) counter gets screwed up when R1 fastpath writes are running. Some of the cases which are not handled properly in driver are: 1. With R1 fastpath supported, single write from CAM layer can consume 2 MPT frames at driver/firmware level for fastpath qualification(if fw_outstanding < controller Queue Depth). Due to this driver has to throttle IOs coming from CAM layer as well as second fastpath write(of R1 write) against Adapter Queue Depth. If "fw_outstanding" reaches to adapter queue depth, driver should return IOs from CAM layer with device busy status.While allocating second MPT frame(corresponding to R1 FP write) also, driver should ensure fw_outstanding should not exceed adapter QD. 2. For R1 fastpath writes completion, driver decrements "fw_oustanding" counter without really returning MPT frame to free pool. It may cause IOs(with heavy IOs running, consuming whole adapter Queue Depth) consuming MPT frames reserved for DCMDs(management commands) and DCMDs(internal and sent by application) not getting MPT frame will start failing. Below is one test case to hit the issue described above- 1. Run heavy IOs (outstanding IOs should hit adapter Queue Depth). 2. Run management tool (Broadcom's storcli tool) querying adapter in loop (run command- "storcli64 /c0 show" in loop). 3. Management tool's requests would start failing due to non-availability of free MPT frames as all frames would be consumed by IOs. Fix: Increment/decrement of "fw_outstanding" counter should be in sync with MPT frame get/return. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai Approved by: Ken MFC after: 3 days Sponsored by: Broadcom Inc Modified: head/sys/dev/mrsas/mrsas.c head/sys/dev/mrsas/mrsas_cam.c Modified: head/sys/dev/mrsas/mrsas.c ============================================================================== --- head/sys/dev/mrsas/mrsas.c Tue Mar 12 08:31:43 2019 (r345055) +++ head/sys/dev/mrsas/mrsas.c Tue Mar 12 09:24:58 2019 (r345056) @@ -1712,6 +1712,7 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M mrsas_map_mpt_cmd_status(cmd_mpt, cmd_mpt->ccb_ptr, status, extStatus, data_length, sense); mrsas_cmd_done(sc, cmd_mpt); + mrsas_atomic_dec(&sc->fw_outstanding); } else { /* * If the peer Raid 1/10 fast path failed, @@ -1735,12 +1736,13 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M r1_cmd->callout_owner = false; } mrsas_release_mpt_cmd(r1_cmd); + mrsas_atomic_dec(&sc->fw_outstanding); mrsas_map_mpt_cmd_status(cmd_mpt, cmd_mpt->ccb_ptr, status, extStatus, data_length, sense); mrsas_cmd_done(sc, cmd_mpt); + mrsas_atomic_dec(&sc->fw_outstanding); } } - mrsas_atomic_dec(&sc->fw_outstanding); break; case MRSAS_MPI2_FUNCTION_PASSTHRU_IO_REQUEST: /* MFI command */ cmd_mfi = sc->mfi_cmd_list[cmd_mpt->sync_cmd_idx]; @@ -2526,6 +2528,9 @@ mrsas_init_fw(struct mrsas_softc *sc) else sc->fast_path_io = 0; } + + device_printf(sc->mrsas_dev, "max_fw_cmds: %u max_scsi_cmds: %u\n", + sc->max_fw_cmds, sc->max_scsi_cmds); return (0); } Modified: head/sys/dev/mrsas/mrsas_cam.c ============================================================================== --- head/sys/dev/mrsas/mrsas_cam.c Tue Mar 12 08:31:43 2019 (r345055) +++ head/sys/dev/mrsas/mrsas_cam.c Tue Mar 12 09:24:58 2019 (r345056) @@ -467,11 +467,20 @@ mrsas_startio(struct mrsas_softc *sc, struct cam_sim * return (0); } ccb_h->status |= CAM_SIM_QUEUED; + + if (mrsas_atomic_inc_return(&sc->fw_outstanding) > sc->max_scsi_cmds) { + ccb_h->status |= CAM_REQUEUE_REQ; + xpt_done(ccb); + mrsas_atomic_dec(&sc->fw_outstanding); + return (0); + } + cmd = mrsas_get_mpt_cmd(sc); if (!cmd) { ccb_h->status |= CAM_REQUEUE_REQ; xpt_done(ccb); + mrsas_atomic_dec(&sc->fw_outstanding); return (0); } @@ -638,7 +647,7 @@ mrsas_startio(struct mrsas_softc *sc, struct cam_sim * mrsas_scsiio_timeout, cmd); #endif - if (mrsas_atomic_inc_return(&sc->fw_outstanding) > sc->io_cmds_highwater) + if (mrsas_atomic_read(&sc->fw_outstanding) > sc->io_cmds_highwater) sc->io_cmds_highwater++; /* @@ -653,7 +662,6 @@ mrsas_startio(struct mrsas_softc *sc, struct cam_sim * * new command */ if (cmd->r1_alt_dev_handle != MR_DEVHANDLE_INVALID) { - mrsas_atomic_inc(&sc->fw_outstanding); mrsas_prepare_secondRaid1_IO(sc, cmd); mrsas_fire_cmd(sc, req_desc->addr.u.low, req_desc->addr.u.high); @@ -669,6 +677,7 @@ mrsas_startio(struct mrsas_softc *sc, struct cam_sim * done: xpt_done(ccb); + mrsas_atomic_dec(&sc->fw_outstanding); return (0); } @@ -1092,14 +1101,20 @@ mrsas_setup_io(struct mrsas_softc *sc, struct mrsas_mp (io_info.r1_alt_dev_handle != MR_DEVHANDLE_INVALID) && (raid->level == 1) && !io_info.isRead) { r1_cmd = mrsas_get_mpt_cmd(sc); - if (!r1_cmd) { + if (mrsas_atomic_inc_return(&sc->fw_outstanding) > sc->max_scsi_cmds) { fp_possible = FALSE; - printf("Avago debug fp disable from %s %d \n", - __func__, __LINE__); + mrsas_atomic_dec(&sc->fw_outstanding); } else { - cmd->peer_cmd = r1_cmd; - r1_cmd->peer_cmd = cmd; - } + r1_cmd = mrsas_get_mpt_cmd(sc); + if (!r1_cmd) { + fp_possible = FALSE; + mrsas_atomic_dec(&sc->fw_outstanding); + } + else { + cmd->peer_cmd = r1_cmd; + r1_cmd->peer_cmd = cmd; + } + } } } From owner-svn-src-all@freebsd.org Tue Mar 12 09:27:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D8B81527705; Tue, 12 Mar 2019 09:27:38 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 44C4385279; Tue, 12 Mar 2019 09:27:38 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3917320AE0; Tue, 12 Mar 2019 09:27:38 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2C9Rcsa017631; Tue, 12 Mar 2019 09:27:38 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2C9Rc1B017630; Tue, 12 Mar 2019 09:27:38 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201903120927.x2C9Rc1B017630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue, 12 Mar 2019 09:27:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345057 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 345057 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 44C4385279 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 09:27:38 -0000 Author: 0mp (ports committer) Date: Tue Mar 12 09:27:37 2019 New Revision: 345057 URL: https://svnweb.freebsd.org/changeset/base/345057 Log: ports.7: Add an example of how to use flavors At the moment the manual page is not documenting how to build a flavored package. Let's start documenting flavors with an example of a typical use case. Reported by: cem, dim Reviewed by: bcr, cem, mat, matthew Approved by: cem (src) Differential Revision: https://reviews.freebsd.org/D19531 Modified: head/share/man/man7/ports.7 Modified: head/share/man/man7/ports.7 ============================================================================== --- head/share/man/man7/ports.7 Tue Mar 12 09:24:58 2019 (r345056) +++ head/share/man/man7/ports.7 Tue Mar 12 09:27:37 2019 (r345057) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 12, 2019 +.Dd March 12, 2019 .Dt PORTS 7 .Os .Sh NAME @@ -587,7 +587,7 @@ The following command builds and installs Emacs. .Ed .It Sy Example 2\&: No Installing Dependencies with Xr pkg 8 .Pp -The following examples shows how to build and install a port without having to +The following example shows how to build and install a port without having to build its dependencies. Instead, the dependencies are downloaded via .Xr pkg 8 . @@ -603,6 +603,16 @@ The drawback is that .Xr pkg 8 offers only packages built with the default set of .Va OPTIONS . +.It Sy Example 3\&: No Building a Non-Default Flavor of a Port +.Pp +The following command builds a non-default flavor of a port. +(In this case +.Pa devel/py-pip +is going to be built with Python 3.7 support.) +.Bd -literal -offset 2n +.Li # Ic cd /usr/ports/devel/py-pip +.Li # Ic env FLAVOR=py37 make build +.Ed .El .Sh SEE ALSO .Xr make 1 , From owner-svn-src-all@freebsd.org Tue Mar 12 09:29:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E894E15277BA; Tue, 12 Mar 2019 09:29:01 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F8BD85421; Tue, 12 Mar 2019 09:29:01 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83CD820AF4; Tue, 12 Mar 2019 09:29:01 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2C9T1uK017730; Tue, 12 Mar 2019 09:29:01 GMT (envelope-from kadesai@FreeBSD.org) Received: (from kadesai@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2C9T1Dp017729; Tue, 12 Mar 2019 09:29:01 GMT (envelope-from kadesai@FreeBSD.org) Message-Id: <201903120929.x2C9T1Dp017729@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kadesai set sender to kadesai@FreeBSD.org using -f From: Kashyap D Desai Date: Tue, 12 Mar 2019 09:29:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345058 - head/sys/dev/mrsas X-SVN-Group: head X-SVN-Commit-Author: kadesai X-SVN-Commit-Paths: head/sys/dev/mrsas X-SVN-Commit-Revision: 345058 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8F8BD85421 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 09:29:02 -0000 Author: kadesai Date: Tue Mar 12 09:29:01 2019 New Revision: 345058 URL: https://svnweb.freebsd.org/changeset/base/345058 Log: Allocated MFI frames should be same as MPT frames reserved for DCMDs Submitted by: Sumit Saxena Reviewed by: Kashyap Desai Approved by: Ken MFC after: 3 days Sponsored by: Broadcom Inc Modified: head/sys/dev/mrsas/mrsas.c Modified: head/sys/dev/mrsas/mrsas.c ============================================================================== --- head/sys/dev/mrsas/mrsas.c Tue Mar 12 09:27:37 2019 (r345057) +++ head/sys/dev/mrsas/mrsas.c Tue Mar 12 09:29:01 2019 (r345058) @@ -2558,8 +2558,7 @@ mrsas_init_adapter(struct mrsas_softc *sc) /* Decrement the max supported by 1, to correlate with FW */ sc->max_fw_cmds = sc->max_fw_cmds - 1; - sc->max_scsi_cmds = sc->max_fw_cmds - - (MRSAS_FUSION_INT_CMDS + MRSAS_MAX_IOCTL_CMDS); + sc->max_scsi_cmds = sc->max_fw_cmds - MRSAS_MAX_MFI_CMDS; /* Determine allocation size of command frames */ sc->reply_q_depth = ((sc->max_fw_cmds + 1 + 15) / 16 * 16) * 2; From owner-svn-src-all@freebsd.org Tue Mar 12 09:29:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6CCF152785C; Tue, 12 Mar 2019 09:29:47 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6CBD585571; Tue, 12 Mar 2019 09:29:47 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 60B8220AF7; Tue, 12 Mar 2019 09:29:47 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2C9TlBC017803; Tue, 12 Mar 2019 09:29:47 GMT (envelope-from kadesai@FreeBSD.org) Received: (from kadesai@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2C9TlqW017802; Tue, 12 Mar 2019 09:29:47 GMT (envelope-from kadesai@FreeBSD.org) Message-Id: <201903120929.x2C9TlqW017802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kadesai set sender to kadesai@FreeBSD.org using -f From: Kashyap D Desai Date: Tue, 12 Mar 2019 09:29:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345059 - head/sys/dev/mrsas X-SVN-Group: head X-SVN-Commit-Author: kadesai X-SVN-Commit-Paths: head/sys/dev/mrsas X-SVN-Commit-Revision: 345059 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6CBD585571 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 09:29:47 -0000 Author: kadesai Date: Tue Mar 12 09:29:46 2019 New Revision: 345059 URL: https://svnweb.freebsd.org/changeset/base/345059 Log: Update driver version to 07.709.04.00-fbsd Submitted by: Sumit Saxena Reviewed by: Kashyap Desai Approved by: Ken MFC after: 3 days Sponsored by: Broadcom Inc Modified: head/sys/dev/mrsas/mrsas.h Modified: head/sys/dev/mrsas/mrsas.h ============================================================================== --- head/sys/dev/mrsas/mrsas.h Tue Mar 12 09:29:01 2019 (r345058) +++ head/sys/dev/mrsas/mrsas.h Tue Mar 12 09:29:46 2019 (r345059) @@ -119,7 +119,7 @@ __FBSDID("$FreeBSD$"); */ #define BYTE_ALIGNMENT 1 #define MRSAS_MAX_NAME_LENGTH 32 -#define MRSAS_VERSION "07.709.01.00-fbsd" +#define MRSAS_VERSION "07.709.04.00-fbsd" #define MRSAS_ULONG_MAX 0xFFFFFFFFFFFFFFFF #define MRSAS_DEFAULT_TIMEOUT 0x14 /* Temporarily set */ #define DONE 0 From owner-svn-src-all@freebsd.org Tue Mar 12 09:43:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 364B51528163; Tue, 12 Mar 2019 09:43:12 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CFD74860EA; Tue, 12 Mar 2019 09:43:11 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C4AFA20E6B; Tue, 12 Mar 2019 09:43:11 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2C9hBZw027676; Tue, 12 Mar 2019 09:43:11 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2C9hBeR027675; Tue, 12 Mar 2019 09:43:11 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201903120943.x2C9hBeR027675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue, 12 Mar 2019 09:43:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345060 - head/sbin/camcontrol X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/sbin/camcontrol X-SVN-Commit-Revision: 345060 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CFD74860EA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 09:43:12 -0000 Author: 0mp (ports committer) Date: Tue Mar 12 09:43:11 2019 New Revision: 345060 URL: https://svnweb.freebsd.org/changeset/base/345060 Log: camcontrol.8: Bump date after r345051 Reviewed by: bcr Approved by: bcr (doc) Approved by: krion (mentor, implicit), mat (mentor, implicit) Differential Revision: https://reviews.freebsd.org/D19555 Modified: head/sbin/camcontrol/camcontrol.8 Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Tue Mar 12 09:29:46 2019 (r345059) +++ head/sbin/camcontrol/camcontrol.8 Tue Mar 12 09:43:11 2019 (r345060) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 3, 2017 +.Dd March 12, 2019 .Dt CAMCONTROL 8 .Os .Sh NAME From owner-svn-src-all@freebsd.org Tue Mar 12 10:18:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DD79152999B; Tue, 12 Mar 2019 10:18:02 +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 E8E538762F; Tue, 12 Mar 2019 10:18:01 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (ezra.dcm1.omnilan.net [IPv6:2a00:e10:2800::a135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id x2CAHxim063427; Tue, 12 Mar 2019 11:17:59 +0100 (CET) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id AE8023DC; Tue, 12 Mar 2019 11:17:58 +0100 (CET) Subject: Re: svn commit: r345057 - head/share/man/man7 To: Mateusz Piotrowski <0mp@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201903120927.x2C9Rc1B017630@repo.freebsd.org> From: Harry Schmalzbauer Organization: OmniLAN Message-ID: <79a9c91f-72c2-ef18-e341-4ed471fb787c@omnilan.de> Date: Tue, 12 Mar 2019 11:17:58 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <201903120927.x2C9Rc1B017630@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]); Tue, 12 Mar 2019 11:17:59 +0100 (CET) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: ; Sender-helo: mh0.gentlemail.de; ) X-Rspamd-Queue-Id: E8E538762F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.966,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 10:18:02 -0000 Am 12.03.2019 um 10:27 schrieb Mateusz Piotrowski: > Author: 0mp (ports committer) > Date: Tue Mar 12 09:27:37 2019 > New Revision: 345057 > URL: https://svnweb.freebsd.org/changeset/base/345057 > > Log: > ports.7: Add an example of how to use flavors > > At the moment the manual page is not documenting how to build > a flavored package. Let's start documenting flavors with > an example of a typical use case. > > Reported by: cem, dim > Reviewed by: bcr, cem, mat, matthew > Approved by: cem (src) > Differential Revision: https://reviews.freebsd.org/D19531 > > Modified: > head/share/man/man7/ports.7 > > Modified: head/share/man/man7/ports.7 > ============================================================================== > --- head/share/man/man7/ports.7 Tue Mar 12 09:24:58 2019 (r345056) > +++ head/share/man/man7/ports.7 Tue Mar 12 09:27:37 2019 (r345057) > @@ -25,7 +25,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd February 12, 2019 > +.Dd March 12, 2019 > .Dt PORTS 7 > .Os > .Sh NAME > @@ -587,7 +587,7 @@ The following command builds and installs Emacs. > .Ed > .It Sy Example 2\&: No Installing Dependencies with Xr pkg 8 > .Pp > -The following examples shows how to build and install a port without having to > +The following example shows how to build and install a port without having to > build its dependencies. > Instead, the dependencies are downloaded via > .Xr pkg 8 . > @@ -603,6 +603,16 @@ The drawback is that > .Xr pkg 8 > offers only packages built with the default set of > .Va OPTIONS . > +.It Sy Example 3\&: No Building a Non-Default Flavor of a Port > +.Pp > +The following command builds a non-default flavor of a port. > +(In this case > +.Pa devel/py-pip > +is going to be built with Python 3.7 support.) > +.Bd -literal -offset 2n > +.Li # Ic cd /usr/ports/devel/py-pip > +.Li # Ic env FLAVOR=py37 make build Since cem and dim seem to stumbled over the missing FLAVOR documentation, I see my main objection against current FLAVOR implementation confirmed:  Build stage must'nt silently chose a default FALVOR, but an OPTIONS-like dialog must inform the user and she _must_ choose one. FLAVOR is a severe regression for ports usage to all FreeBSD users imho. Users can't see if a port makes use of FLAVOR or not. User won't get informed that default FLAVOR is in use. Users can't see what FLAVORs are supported (and/or why, with what consequences...). Port/Package name relation gets lost (also for make(1) variables widley used in my scripts, which I still have to track down...). FLAVOR silently broke $WRKDIRPREFIX. If of any use, it's solely for maintainers, but at the cost of users.  The ports options framework is not really user friendly too, but does a basic job in guiding users.  FLAVOR does the opposite. There was nothing wrong with slave ports.  If maintainers have to spend a fraction more time on slave ports than on FLAVORized ports, it's worth every second, instead of distracting users. The more poudriere optimization the ports tree gets, the more distraction for users/admins/engineers/students comes along and FreeBSD loses one elementary strength of the project, imho. Instructing users to set an environment variable to a value, which they have to lookup from a Makefile, is a very poor usability design, imho. Hope this isn't the completely wrong place to point to ports stuff... Thanks, -harry From owner-svn-src-all@freebsd.org Tue Mar 12 10:50:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82567152ACCA; Tue, 12 Mar 2019 10:50:25 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 24677889A5; Tue, 12 Mar 2019 10:50:25 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 10D8B8AE1; Tue, 12 Mar 2019 10:50:25 +0000 (UTC) Date: Tue, 12 Mar 2019 10:50:25 +0000 From: Alexey Dokuchaev To: Harry Schmalzbauer Cc: Mateusz Piotrowski <0mp@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r345057 - head/share/man/man7 Message-ID: <20190312105025.GA54467@FreeBSD.org> References: <201903120927.x2C9Rc1B017630@repo.freebsd.org> <79a9c91f-72c2-ef18-e341-4ed471fb787c@omnilan.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79a9c91f-72c2-ef18-e341-4ed471fb787c@omnilan.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 24677889A5 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.94)[-0.942,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 10:50:25 -0000 On Tue, Mar 12, 2019 at 11:17:58AM +0100, Harry Schmalzbauer wrote: > Am 12.03.2019 um 10:27 schrieb Mateusz Piotrowski: > > New Revision: 345057 > > URL: https://svnweb.freebsd.org/changeset/base/345057 > > > > Log: > > ports.7: Add an example of how to use flavors > > Since cem and dim seem to stumbled over the missing FLAVOR > documentation, I see my main objection against current FLAVOR > implementation confirmed: build stage must'nt silently chose a > default FLAVOR, but an OPTIONS-like dialog must inform the user > and she _must_ choose one. > > FLAVOR is a severe regression for ports usage to all FreeBSD > users imho. Users can't see if a port makes use of FLAVOR or not. > User won't get informed that default FLAVOR is in use. [...] Users who install packages that are built from a flavorized port are well informed which flavor they're about to install, I don't see how flavors cause a problem -- they must have unique PKGNAMEs. For users that are building ports by themselves, looking into a Makefile can be helpful, but then again -- don't we always do that? It might slip when building the dependencies, so yeah, some extra care is in order. I don't see what's a big deal here, and flavors are certainly less annoying and more flexible than slave ports. If you really want an OPTIONS-like dialog popup then perhaps you should've attached some patches to your complaints. :-) ./danfe From owner-svn-src-all@freebsd.org Tue Mar 12 11:48:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7E9D152E3F6; Tue, 12 Mar 2019 11:48:17 +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 54AD98B052; Tue, 12 Mar 2019 11:48:17 +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 x2CBmFBQ064345; Tue, 12 Mar 2019 12:48:15 +0100 (CET) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id 0449D40F; Tue, 12 Mar 2019 12:48:14 +0100 (CET) Subject: Re: svn commit: r345057 - head/share/man/man7 To: Alexey Dokuchaev Cc: Mateusz Piotrowski <0mp@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201903120927.x2C9Rc1B017630@repo.freebsd.org> <79a9c91f-72c2-ef18-e341-4ed471fb787c@omnilan.de> <20190312105025.GA54467@FreeBSD.org> From: Harry Schmalzbauer Organization: OmniLAN Message-ID: Date: Tue, 12 Mar 2019 12:48:14 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20190312105025.GA54467@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: ACL 130 matched, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [78.138.80.130]); Tue, 12 Mar 2019 12:48:15 +0100 (CET) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: 78.138.80.135; Sender-helo: mh0.gentlemail.de; ) X-Rspamd-Queue-Id: 54AD98B052 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.95)[-0.955,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 11:48:18 -0000 Am 12.03.2019 um 11:50 schrieb Alexey Dokuchaev: > On Tue, Mar 12, 2019 at 11:17:58AM +0100, Harry Schmalzbauer wrote: >> Am 12.03.2019 um 10:27 schrieb Mateusz Piotrowski: >>> New Revision: 345057 >>> URL: https://svnweb.freebsd.org/changeset/base/345057 >>> >>> Log: >>> ports.7: Add an example of how to use flavors >> >> Since cem and dim seem to stumbled over the missing FLAVOR >> documentation, I see my main objection against current FLAVOR >> implementation confirmed: build stage must'nt silently chose a >> default FLAVOR, but an OPTIONS-like dialog must inform the user >> and she _must_ choose one. >> >> FLAVOR is a severe regression for ports usage to all FreeBSD >> users imho. Users can't see if a port makes use of FLAVOR or not. >> User won't get informed that default FLAVOR is in use. [...] > > Users who install packages that are built from a flavorized port > are well informed which flavor they're about to install, I don't > see how flavors cause a problem -- they must have unique PKGNAMEs. > > For users that are building ports by themselves, looking into a > Makefile can be helpful, but then again -- don't we always do that? > It might slip when building the dependencies, so yeah, some extra > care is in order. I don't see what's a big deal here, and flavors > are certainly less annoying and more flexible than slave ports. > > If you really want an OPTIONS-like dialog popup then perhaps you > should've attached some patches to your complaints. :-) You are right, I missed the patches... Here's my local diff which works around some more recent regressions which were breaking local ports tree usage. Abusing IGNORE is not a solution, but helps my avoiding unexpected results. I see no easy way to patch FLAVOR, so I preferred spending time working around USE_PACKAGE_DEPENDS shortcomings. Unfortunately very limited time, but I'm able to smart-compile packages. I don't support teaching users using packages in favour of ports. Ports is great for the ambitious users etc. and often the first "isnsight" for newbies. But it's much more time consuming (wasting) than using packages, due to the brute force compile approach widley used. USE_PACKAGE_DEPENDS virtually always leads to inconsitencies, since only the first dependency is resolved with the ports tree, subsequent dependencys are resolved by pkg - hence, if not in-sync-brute-force-compiled, it's likely that previous built packages have different dependency versions than your fresh built. My tool handles that and generates a _consistent_ iso image repository. Personally need/want that to maintain production environments with sensible ammount of effort (my production environments don't have compilers). I still have to iron out bugs of all categories during usage, but it's in use and saving me really a lot of time. (It also handles OPTIONS mismatches between possibly existing packages and current ports options settings – which can also save a lot of time and points out possibly unwanted current settinges etc..) I was also missing the ability to batch-package everything already compiled in WRKDIRPREFIX, so I wrote a small Makefile, which acts as a harvester. Simly to be called in the wanted PACKAGES directory. Happy to share on request. Index: /usr/ports/Mk/bsd.port.mk =================================================================== --- /usr/ports/Mk/bsd.port.mk (revision 495299) +++ /usr/ports/Mk/bsd.port.mk (working copy) @@ -1051,8 +1051,8 @@ .if empty(FLAVOR) && !empty(.MAKEOVERRIDES:MFLAVOR) .error FLAVOR may not be passed empty as a make argument. .endif -# Store env FLAVOR for later -.if !defined(_FLAVOR) +# Store cli FLAVOR for later +.if !defined(_FLAVOR) && defined(.MAKEOVERRIDES) && !empty(.MAKEOVERRIDES:MFLAVOR) _FLAVOR:= ${FLAVOR} .endif PORTS_FEATURES+= FLAVORS @@ -1492,9 +1492,13 @@ . endif .endif -.if !empty(FLAVORS) && empty(FLAVOR) -FLAVOR= ${FLAVORS:[1]} +.if !empty(FLAVORS) && empty(_FLAVOR) +.if empty(PY_FLAVOR) +IGNORE= Missing FLAVOR definition! Possible flavors: ${FLAVORS} (Usage: 'make FLAVOR=${FLAVORS:[1]} ${.TARGETS}' e.g.) +.else +_FLAVOR:=${PY_FLAVOR} .endif +.endif # Reorder FLAVORS so the default is first if set by the port. .if empty(_FLAVOR) && !empty(FLAVORS) && !empty(FLAVOR) @@ -1675,10 +1679,14 @@ .endif .if empty(FLAVOR) -_WRKDIR= work +.ifdef WRKDIRPREFIX +WRKDIR=${WRKDIRPREFIX}${.CURDIR:S,${PORTSDIR},,}/work +.endif .else -_WRKDIR= work-${FLAVOR} +.ifdef WRKDIRPREFIX +WRKDIR=${WRKDIRPREFIX}${.CURDIR:S,${PORTSDIR},,}/work-${FLAVOR} .endif +.endif WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/${_WRKDIR} BINARY_LINKDIR= ${WRKDIR}/.bin @@ -2578,7 +2586,6 @@ PKGREPOSITORYSUBDIR?= All PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR} .if exists(${PACKAGES}) -PACKAGES:= ${PACKAGES:S/:/\:/g} _HAVE_PACKAGES= yes PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX} .else @@ -3363,19 +3370,19 @@ # Package .if defined(_HAVE_PACKAGES) -_EXTRA_PACKAGE_TARGET_DEP+= ${PKGFILE} -_PORTS_DIRECTORIES+= ${PKGREPOSITORY} +_EXTRA_PACKAGE_TARGET_DEP+= ${PKGFILE:S/:/\:/g} +_PORTS_DIRECTORIES+= ${PKGREPOSITORY:S/:/\:/g} -${PKGFILE}: ${WRKDIR_PKGFILE} ${PKGREPOSITORY} +${PKGFILE:S/:/\:/g}: ${WRKDIR_PKGFILE} ${PKGREPOSITORY:S/:/\:/g} @${LN} -f ${WRKDIR_PKGFILE} ${PKGFILE} 2>/dev/null \ || ${CP} -f ${WRKDIR_PKGFILE} ${PKGFILE} . if ${PKGORIGIN} == "ports-mgmt/pkg" || ${PKGORIGIN} == "ports-mgmt/pkg-devel" -_EXTRA_PACKAGE_TARGET_DEP+= ${PKGLATESTREPOSITORY} -_PORTS_DIRECTORIES+= ${PKGLATESTREPOSITORY} -_EXTRA_PACKAGE_TARGET_DEP+= ${PKGLATESTFILE} +_EXTRA_PACKAGE_TARGET_DEP+= ${PKGLATESTREPOSITORY:S/:/\:/g} +_PORTS_DIRECTORIES+= ${PKGLATESTREPOSITORY:S/:/\:/g} +_EXTRA_PACKAGE_TARGET_DEP+= ${PKGLATESTFILE:S/:/\:/g} -${PKGLATESTFILE}: ${PKGFILE} ${PKGLATESTREPOSITORY} +${PKGLATESTFILE:S/:/\:/g}: ${PKGFILE:S/:/\:/g} ${PKGLATESTREPOSITORY:S/:/\:/g} ${INSTALL} -l rs ${PKGFILE} ${PKGLATESTFILE} . endif Thanks, -harry From owner-svn-src-all@freebsd.org Tue Mar 12 13:33:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D22C1531039; Tue, 12 Mar 2019 13:33:09 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D77ED8E66E; Tue, 12 Mar 2019 13:33:08 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1h3hWc-000N8X-EM; Tue, 12 Mar 2019 16:32:58 +0300 Date: Tue, 12 Mar 2019 16:32:58 +0300 From: Slawa Olhovchenkov To: John Baldwin 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: r345040 - in stable/11: share/man/man4 sys/conf sys/dev/cxgbe sys/dev/cxgbe/crypto sys/dev/cxgbe/firmware sys/modules/cxgbe sys/modules/cxgbe/ccr sys/powerpc/conf Message-ID: <20190312133258.GA6462@zxy.spb.ru> References: <201903112316.x2BNGA4b092507@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201903112316.x2BNGA4b092507@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: D77ED8E66E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.82 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.82)[-0.820,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 13:33:09 -0000 On Mon, Mar 11, 2019 at 11:16:10PM +0000, John Baldwin wrote: > Author: jhb > Date: Mon Mar 11 23:16:10 2019 > New Revision: 345040 > URL: https://svnweb.freebsd.org/changeset/base/345040 > > Log: > MFC 318429,318967,319721,319723,323600,323724,328353-328361,330042,343056: > Add a driver for the Chelsio T6 crypto accelerator engine. Where I can find example/manual of use this engine from userspace? From owner-svn-src-all@freebsd.org Tue Mar 12 14:51:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42A8F1532CD1; Tue, 12 Mar 2019 14:51:32 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f176.google.com (mail-it1-f176.google.com [209.85.166.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C7A596A621; Tue, 12 Mar 2019 14:51:31 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f176.google.com with SMTP id g17so4818935ita.2; Tue, 12 Mar 2019 07:51:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=HWL2Z3g/SwV99UJA4HJzY3fzGRAJT2c+fQGD5jvRdQY=; b=aUZOzAC3hUpdREBf1EJ4dtHC+qMsz1h1w1VkMgKUjZ3pUNh+PGGdFJ9AmDdQibDAUP rEQps+Qc6K5bD1zmxK/DW1YTyJrRM4gA/2OBIlYj3Ai9F5pBO/BH92Ca3PPm3Vd5p9fQ 8gWTThIbpkIjJkDF/WbbgqKAw2W/nIJhmT+lkRXdzjSjqDjlklmCwgz0nuyFV3B5y7cg fb2XV8Qiufd7wMmdPuGnLUTmMDQXPPhi1U33P2Yjab9QDTFD+yak2f5GAhz/scWr8ewJ 9usHm4HJxLQ8EGXkgKpb4AYqk4sZ+DBRbQXcsfzVn1wQfU0B0jdZLi0i6naCudfNt4iG I6yw== X-Gm-Message-State: APjAAAXgp9X4sWS1BU9SzbdKOwIqxr2+NITBOWSfjFNCUX2wzGjoOEXR VVapdXGB9PyxR0Yy8eC4D73vCntw X-Google-Smtp-Source: APXvYqxPTMYRp2xsYc2DKx213tmChIkYHrpjZvi9snpXj3ldV68GLUPNP9j2m2luumQdUDmxj7rYBw== X-Received: by 2002:a24:f709:: with SMTP id x9mr2205469ith.149.1552402288862; Tue, 12 Mar 2019 07:51:28 -0700 (PDT) Received: from mail-io1-f47.google.com (mail-io1-f47.google.com. [209.85.166.47]) by smtp.gmail.com with ESMTPSA id y24sm3201847iol.8.2019.03.12.07.51.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Mar 2019 07:51:28 -0700 (PDT) Received: by mail-io1-f47.google.com with SMTP id p18so2317101ioh.5; Tue, 12 Mar 2019 07:51:27 -0700 (PDT) X-Received: by 2002:a5e:a710:: with SMTP id b16mr4432481iod.233.1552402287817; Tue, 12 Mar 2019 07:51:27 -0700 (PDT) MIME-Version: 1.0 References: <201903120927.x2C9Rc1B017630@repo.freebsd.org> <79a9c91f-72c2-ef18-e341-4ed471fb787c@omnilan.de> In-Reply-To: <79a9c91f-72c2-ef18-e341-4ed471fb787c@omnilan.de> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 12 Mar 2019 07:51:16 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r345057 - head/share/man/man7 To: Harry Schmalzbauer Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: C7A596A621 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.991,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 14:51:32 -0000 On Tue, Mar 12, 2019 at 3:18 AM Harry Schmalzbauer wro= te: > > Am 12.03.2019 um 10:27 schrieb Mateusz Piotrowski: > > URL: https://svnweb.freebsd.org/changeset/base/345057 > > > > Log: > > ports.7: Add an example of how to use flavors > ... Thank you, Mateusz. Hi Harry, > Since cem and dim seem to stumbled over the missing FLAVOR > documentation, I see my main objection against current FLAVOR > implementation confirmed: Build stage must'nt silently chose a default > FALVOR, but an OPTIONS-like dialog must inform the user and she _must_ > choose one. Nah. I don't like OPTIONS, and wouldn't prefer FLAVORS presented in that w= ay. I'm very appreciative of the work that went into FLAVORS. It was a needed step to make ports more maintainable, and it was well executed. Kudos to everyone involved. I ran into one rough edge around documentation, and Mateusz was quick to fix it. > The ports options framework is not really user friendly too, Agree there... > but does a > basic job in guiding users. I'm not sure that's true. > ... > Instructing users to set an environment variable to a value, which they > have to lookup from a Makefile, is a very poor usability design, imho. I agree =E2=80=94 but I think pkg is the right tool for most users, and it doesn't include things like OPTIONS at all. And all flavors are built. I'm only munging around in the ports tree because this last round of pkg builds, the builders decided not to compile a package or two I needed, and we don't have any pkg stability build to build, so they simply weren't installable. Best, Conrad From owner-svn-src-all@freebsd.org Tue Mar 12 14:53:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7088C1532ED7; Tue, 12 Mar 2019 14:53:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 164396AAED; Tue, 12 Mar 2019 14:53:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D19BC244A6; Tue, 12 Mar 2019 14:53:53 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2CErrGW089793; Tue, 12 Mar 2019 14:53:53 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CErr0O089792; Tue, 12 Mar 2019 14:53:53 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201903121453.x2CErr0O089792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 12 Mar 2019 14:53:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345061 - head/sys/fs/nfs X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/fs/nfs X-SVN-Commit-Revision: 345061 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 164396AAED X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 14:53:54 -0000 Author: trasz Date: Tue Mar 12 14:53:53 2019 New Revision: 345061 URL: https://svnweb.freebsd.org/changeset/base/345061 Log: Drop unused 'p' argument to nfsrv_getuser(). Reviewed by: rmacklem MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D19455 Modified: head/sys/fs/nfs/nfs_commonsubs.c Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Tue Mar 12 09:43:11 2019 (r345060) +++ head/sys/fs/nfs/nfs_commonsubs.c Tue Mar 12 14:53:53 2019 (r345061) @@ -198,8 +198,7 @@ static int nfs_bigreply[NFSV41_NPROCS] = { 0, 0, 0, 1, static int nfsrv_skipace(struct nfsrv_descript *nd, int *acesizep); static void nfsv4_wanted(struct nfsv4lock *lp); static int nfsrv_cmpmixedcase(u_char *cp, u_char *cp2, int len); -static int nfsrv_getuser(int procnum, uid_t uid, gid_t gid, char *name, - NFSPROC_T *p); +static int nfsrv_getuser(int procnum, uid_t uid, gid_t gid, char *name); static void nfsrv_removeuser(struct nfsusrgrp *usrp, int isuser); static int nfsrv_getrefstr(struct nfsrv_descript *, u_char **, u_char **, int *, int *); @@ -3087,8 +3086,7 @@ tryagain: } mtx_unlock(&hp->mtx); cnt++; - ret = nfsrv_getuser(RPCNFSUSERD_GETUID, uid, (gid_t)0, - NULL, p); + ret = nfsrv_getuser(RPCNFSUSERD_GETUID, uid, (gid_t)0, NULL); if (ret == 0 && cnt < 2) goto tryagain; } @@ -3151,8 +3149,7 @@ tryagain: } mtx_unlock(&hp->mtx); cnt++; - ret = nfsrv_getuser(RPCNFSUSERD_GETUID, uid, (gid_t)0, - NULL, curthread); + ret = nfsrv_getuser(RPCNFSUSERD_GETUID, uid, (gid_t)0, NULL); if (ret == 0 && cnt < 2) goto tryagain; } @@ -3252,7 +3249,7 @@ tryagain: mtx_unlock(&hp->mtx); cnt++; ret = nfsrv_getuser(RPCNFSUSERD_GETUSER, (uid_t)0, (gid_t)0, - str, p); + str); if (ret == 0 && cnt < 2) goto tryagain; } @@ -3349,8 +3346,7 @@ tryagain: } mtx_unlock(&hp->mtx); cnt++; - ret = nfsrv_getuser(RPCNFSUSERD_GETGID, (uid_t)0, gid, - NULL, p); + ret = nfsrv_getuser(RPCNFSUSERD_GETGID, (uid_t)0, gid, NULL); if (ret == 0 && cnt < 2) goto tryagain; } @@ -3466,7 +3462,7 @@ tryagain: mtx_unlock(&hp->mtx); cnt++; ret = nfsrv_getuser(RPCNFSUSERD_GETGROUP, (uid_t)0, (gid_t)0, - str, p); + str); if (ret == 0 && cnt < 2) goto tryagain; } @@ -3585,7 +3581,7 @@ nfsrv_nfsuserddelport(void) * Returns 0 upon success, non-zero otherwise. */ static int -nfsrv_getuser(int procnum, uid_t uid, gid_t gid, char *name, NFSPROC_T *p) +nfsrv_getuser(int procnum, uid_t uid, gid_t gid, char *name) { u_int32_t *tl; struct nfsrv_descript *nd; From owner-svn-src-all@freebsd.org Tue Mar 12 14:59:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 918561532FF4; Tue, 12 Mar 2019 14:59:09 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 361EF6AD76; Tue, 12 Mar 2019 14:59:09 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 28B04244C8; Tue, 12 Mar 2019 14:59:09 +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 x2CEx9PH090098; Tue, 12 Mar 2019 14:59:09 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CEx8FS090096; Tue, 12 Mar 2019 14:59:08 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201903121459.x2CEx8FS090096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 12 Mar 2019 14:59:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345062 - head/sys/fs/nfs X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/fs/nfs X-SVN-Commit-Revision: 345062 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 361EF6AD76 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 14:59:09 -0000 Author: trasz Date: Tue Mar 12 14:59:08 2019 New Revision: 345062 URL: https://svnweb.freebsd.org/changeset/base/345062 Log: Drop unused 'p' argument to nfsv4_uidtostr(). MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/fs/nfs/nfs_commonacl.c head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfs_var.h Modified: head/sys/fs/nfs/nfs_commonacl.c ============================================================================== --- head/sys/fs/nfs/nfs_commonacl.c Tue Mar 12 14:53:53 2019 (r345061) +++ head/sys/fs/nfs/nfs_commonacl.c Tue Mar 12 14:59:08 2019 (r345062) @@ -424,7 +424,7 @@ nfsrv_buildacl(struct nfsrv_descript *nd, NFSACL_T *ac case ACL_USER: name = namestr; nfsv4_uidtostr(aclp->acl_entry[i].ae_id, &name, - &namelen, p); + &namelen); if (name != namestr) malloced = 1; break; Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Tue Mar 12 14:53:53 2019 (r345061) +++ head/sys/fs/nfs/nfs_commonsubs.c Tue Mar 12 14:59:08 2019 (r345062) @@ -2742,7 +2742,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount break; case NFSATTRBIT_OWNER: cp = namestr; - nfsv4_uidtostr(vap->va_uid, &cp, &siz, p); + nfsv4_uidtostr(vap->va_uid, &cp, &siz); retnum += nfsm_strtom(nd, cp, siz); if (cp != namestr) free(cp, M_NFSSTRING); @@ -3008,7 +3008,7 @@ nfsrv_putattrbit(struct nfsrv_descript *nd, nfsattrbit * retlenp - pointer to length to be returned */ APPLESTATIC void -nfsv4_uidtostr(uid_t uid, u_char **cpp, int *retlenp, NFSPROC_T *p) +nfsv4_uidtostr(uid_t uid, u_char **cpp, int *retlenp) { int i; struct nfsusrgrp *usrp; Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Tue Mar 12 14:53:53 2019 (r345061) +++ head/sys/fs/nfs/nfs_var.h Tue Mar 12 14:59:08 2019 (r345062) @@ -371,7 +371,7 @@ void nfsrv_fillattr(struct nfsrv_descript *, struct nf void nfsrv_adj(mbuf_t, int, int); void nfsrv_postopattr(struct nfsrv_descript *, int, struct nfsvattr *); int nfsd_errmap(struct nfsrv_descript *); -void nfsv4_uidtostr(uid_t, u_char **, int *, NFSPROC_T *); +void nfsv4_uidtostr(uid_t, u_char **, int *); int nfsv4_strtouid(struct nfsrv_descript *, u_char *, int, uid_t *, NFSPROC_T *); void nfsv4_gidtostr(gid_t, u_char **, int *, NFSPROC_T *); From owner-svn-src-all@freebsd.org Tue Mar 12 15:02:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B60A3153332E; Tue, 12 Mar 2019 15:02:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 54E886B368; Tue, 12 Mar 2019 15:02:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 472A02467D; Tue, 12 Mar 2019 15:02:54 +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 x2CF2sh7095584; Tue, 12 Mar 2019 15:02:54 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CF2rv1095578; Tue, 12 Mar 2019 15:02:53 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201903121502.x2CF2rv1095578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 12 Mar 2019 15:02:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345063 - in head/sys/fs: nfs nfsclient nfsserver X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head/sys/fs: nfs nfsclient nfsserver X-SVN-Commit-Revision: 345063 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 54E886B368 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 15:02:55 -0000 Author: trasz Date: Tue Mar 12 15:02:52 2019 New Revision: 345063 URL: https://svnweb.freebsd.org/changeset/base/345063 Log: Drop unused 'p' argument to nfsv4_strtouid(). MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/fs/nfs/nfs_commonacl.c head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfs/nfs_commonacl.c ============================================================================== --- head/sys/fs/nfs/nfs_commonacl.c Tue Mar 12 14:59:08 2019 (r345062) +++ head/sys/fs/nfs/nfs_commonacl.c Tue Mar 12 15:02:52 2019 (r345063) @@ -108,7 +108,7 @@ nfsrv_dissectace(struct nfsrv_descript *nd, struct acl acep->ae_id = (uid_t)gid; } else { acep->ae_tag = ACL_USER; - aceerr = nfsv4_strtouid(nd, name, len, &uid, p); + aceerr = nfsv4_strtouid(nd, name, len, &uid); if (aceerr == 0) acep->ae_id = uid; } Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Tue Mar 12 14:59:08 2019 (r345062) +++ head/sys/fs/nfs/nfs_commonsubs.c Tue Mar 12 15:02:52 2019 (r345063) @@ -1819,12 +1819,12 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, } if (compare) { if (!(*retcmpp)) { - if (nfsv4_strtouid(nd, cp, j, &uid, p) || + if (nfsv4_strtouid(nd, cp, j, &uid) || nap->na_uid != uid) *retcmpp = NFSERR_NOTSAME; } } else if (nap != NULL) { - if (nfsv4_strtouid(nd, cp, j, &uid, p)) + if (nfsv4_strtouid(nd, cp, j, &uid)) nap->na_uid = nfsrv_defaultuid; else nap->na_uid = uid; @@ -3165,8 +3165,7 @@ tryagain: * a number. */ APPLESTATIC int -nfsv4_strtouid(struct nfsrv_descript *nd, u_char *str, int len, uid_t *uidp, - NFSPROC_T *p) +nfsv4_strtouid(struct nfsrv_descript *nd, u_char *str, int len, uid_t *uidp) { int i; char *cp, *endstr, *str0; Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Tue Mar 12 14:59:08 2019 (r345062) +++ head/sys/fs/nfs/nfs_var.h Tue Mar 12 15:02:52 2019 (r345063) @@ -372,8 +372,7 @@ void nfsrv_adj(mbuf_t, int, int); void nfsrv_postopattr(struct nfsrv_descript *, int, struct nfsvattr *); int nfsd_errmap(struct nfsrv_descript *); void nfsv4_uidtostr(uid_t, u_char **, int *); -int nfsv4_strtouid(struct nfsrv_descript *, u_char *, int, uid_t *, - NFSPROC_T *); +int nfsv4_strtouid(struct nfsrv_descript *, u_char *, int, uid_t *); void nfsv4_gidtostr(gid_t, u_char **, int *, NFSPROC_T *); int nfsv4_strtogid(struct nfsrv_descript *, u_char *, int, gid_t *, NFSPROC_T *); Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Tue Mar 12 14:59:08 2019 (r345062) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Tue Mar 12 15:02:52 2019 (r345063) @@ -7029,7 +7029,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp, ui if (dogrp != 0) error = nfsv4_strtogid(nd, str, len, gidp, p); else - error = nfsv4_strtouid(nd, str, len, uidp, p); + error = nfsv4_strtouid(nd, str, len, uidp); nfsmout: if (len > NFSV4_SMALLSTR) free(str, M_TEMP); Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Tue Mar 12 14:59:08 2019 (r345062) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Tue Mar 12 15:02:52 2019 (r345063) @@ -2791,8 +2791,8 @@ nfsv4_sattr(struct nfsrv_descript *nd, vnode_t vp, str goto nfsmout; } if (!nd->nd_repstat) { - nd->nd_repstat = nfsv4_strtouid(nd, cp, j, &uid, - p); + nd->nd_repstat = nfsv4_strtouid(nd, cp, j, + &uid); if (!nd->nd_repstat) nvap->na_uid = uid; } From owner-svn-src-all@freebsd.org Tue Mar 12 15:05:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CCF815333FA; Tue, 12 Mar 2019 15:05:12 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 33E706B4FD; Tue, 12 Mar 2019 15:05:12 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 162992467F; Tue, 12 Mar 2019 15:05:12 +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 x2CF5BW3095734; Tue, 12 Mar 2019 15:05:11 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CF5B0X095731; Tue, 12 Mar 2019 15:05:11 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201903121505.x2CF5B0X095731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 12 Mar 2019 15:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345064 - head/sys/fs/nfs X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/fs/nfs X-SVN-Commit-Revision: 345064 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 33E706B4FD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 15:05:12 -0000 Author: trasz Date: Tue Mar 12 15:05:11 2019 New Revision: 345064 URL: https://svnweb.freebsd.org/changeset/base/345064 Log: Drop unused 'p' argument to nfsv4_gidtostr(). MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/fs/nfs/nfs_commonacl.c head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfs_var.h Modified: head/sys/fs/nfs/nfs_commonacl.c ============================================================================== --- head/sys/fs/nfs/nfs_commonacl.c Tue Mar 12 15:02:52 2019 (r345063) +++ head/sys/fs/nfs/nfs_commonacl.c Tue Mar 12 15:05:11 2019 (r345064) @@ -432,7 +432,7 @@ nfsrv_buildacl(struct nfsrv_descript *nd, NFSACL_T *ac isgroup = 1; name = namestr; nfsv4_gidtostr((gid_t)aclp->acl_entry[i].ae_id, &name, - &namelen, p); + &namelen); if (name != namestr) malloced = 1; break; Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Tue Mar 12 15:02:52 2019 (r345063) +++ head/sys/fs/nfs/nfs_commonsubs.c Tue Mar 12 15:05:11 2019 (r345064) @@ -2749,7 +2749,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount break; case NFSATTRBIT_OWNERGROUP: cp = namestr; - nfsv4_gidtostr(vap->va_gid, &cp, &siz, p); + nfsv4_gidtostr(vap->va_gid, &cp, &siz); retnum += nfsm_strtom(nd, cp, siz); if (cp != namestr) free(cp, M_NFSSTRING); @@ -3267,7 +3267,7 @@ out: * retlenp - pointer to length to be returned */ APPLESTATIC void -nfsv4_gidtostr(gid_t gid, u_char **cpp, int *retlenp, NFSPROC_T *p) +nfsv4_gidtostr(gid_t gid, u_char **cpp, int *retlenp) { int i; struct nfsusrgrp *usrp; Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Tue Mar 12 15:02:52 2019 (r345063) +++ head/sys/fs/nfs/nfs_var.h Tue Mar 12 15:05:11 2019 (r345064) @@ -373,7 +373,7 @@ void nfsrv_postopattr(struct nfsrv_descript *, int, st int nfsd_errmap(struct nfsrv_descript *); void nfsv4_uidtostr(uid_t, u_char **, int *); int nfsv4_strtouid(struct nfsrv_descript *, u_char *, int, uid_t *); -void nfsv4_gidtostr(gid_t, u_char **, int *, NFSPROC_T *); +void nfsv4_gidtostr(gid_t, u_char **, int *); int nfsv4_strtogid(struct nfsrv_descript *, u_char *, int, gid_t *, NFSPROC_T *); int nfsrv_checkuidgid(struct nfsrv_descript *, struct nfsvattr *); From owner-svn-src-all@freebsd.org Tue Mar 12 15:07:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35BC215335A4; Tue, 12 Mar 2019 15:07:49 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B41D6B74D; Tue, 12 Mar 2019 15:07:48 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83F3C24680; Tue, 12 Mar 2019 15:07:48 +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 x2CF7m2f095875; Tue, 12 Mar 2019 15:07:48 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CF7lpT095871; Tue, 12 Mar 2019 15:07:47 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201903121507.x2CF7lpT095871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 12 Mar 2019 15:07:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345065 - in head/sys/fs: nfs nfsclient nfsserver X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head/sys/fs: nfs nfsclient nfsserver X-SVN-Commit-Revision: 345065 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9B41D6B74D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 15:07:49 -0000 Author: trasz Date: Tue Mar 12 15:07:47 2019 New Revision: 345065 URL: https://svnweb.freebsd.org/changeset/base/345065 Log: Drop unused 'p' argument to nfsv4_strtogid(). MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/fs/nfs/nfs_commonacl.c head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfs/nfs_commonacl.c ============================================================================== --- head/sys/fs/nfs/nfs_commonacl.c Tue Mar 12 15:05:11 2019 (r345064) +++ head/sys/fs/nfs/nfs_commonacl.c Tue Mar 12 15:07:47 2019 (r345065) @@ -103,7 +103,7 @@ nfsrv_dissectace(struct nfsrv_descript *nd, struct acl if (gotid == 0) { if (flag & NFSV4ACE_IDENTIFIERGROUP) { acep->ae_tag = ACL_GROUP; - aceerr = nfsv4_strtogid(nd, name, len, &gid, p); + aceerr = nfsv4_strtogid(nd, name, len, &gid); if (aceerr == 0) acep->ae_id = (uid_t)gid; } else { Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Tue Mar 12 15:05:11 2019 (r345064) +++ head/sys/fs/nfs/nfs_commonsubs.c Tue Mar 12 15:07:47 2019 (r345065) @@ -1852,12 +1852,12 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, } if (compare) { if (!(*retcmpp)) { - if (nfsv4_strtogid(nd, cp, j, &gid, p) || + if (nfsv4_strtogid(nd, cp, j, &gid) || nap->na_gid != gid) *retcmpp = NFSERR_NOTSAME; } } else if (nap != NULL) { - if (nfsv4_strtogid(nd, cp, j, &gid, p)) + if (nfsv4_strtogid(nd, cp, j, &gid)) nap->na_gid = nfsrv_defaultgid; else nap->na_gid = gid; @@ -3379,8 +3379,7 @@ tryagain: * a number. */ APPLESTATIC int -nfsv4_strtogid(struct nfsrv_descript *nd, u_char *str, int len, gid_t *gidp, - NFSPROC_T *p) +nfsv4_strtogid(struct nfsrv_descript *nd, u_char *str, int len, gid_t *gidp) { int i; char *cp, *endstr, *str0; Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Tue Mar 12 15:05:11 2019 (r345064) +++ head/sys/fs/nfs/nfs_var.h Tue Mar 12 15:07:47 2019 (r345065) @@ -374,8 +374,7 @@ int nfsd_errmap(struct nfsrv_descript *); void nfsv4_uidtostr(uid_t, u_char **, int *); int nfsv4_strtouid(struct nfsrv_descript *, u_char *, int, uid_t *); void nfsv4_gidtostr(gid_t, u_char **, int *); -int nfsv4_strtogid(struct nfsrv_descript *, u_char *, int, gid_t *, - NFSPROC_T *); +int nfsv4_strtogid(struct nfsrv_descript *, u_char *, int, gid_t *); int nfsrv_checkuidgid(struct nfsrv_descript *, struct nfsvattr *); void nfsrv_fixattr(struct nfsrv_descript *, vnode_t, struct nfsvattr *, NFSACL_T *, NFSPROC_T *, nfsattrbit_t *, Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Tue Mar 12 15:05:11 2019 (r345064) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Tue Mar 12 15:07:47 2019 (r345065) @@ -7027,7 +7027,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp, ui str[len] = '\0'; NFSCL_DEBUG(4, "nfsrv_parseug: str=%s\n", str); if (dogrp != 0) - error = nfsv4_strtogid(nd, str, len, gidp, p); + error = nfsv4_strtogid(nd, str, len, gidp); else error = nfsv4_strtouid(nd, str, len, uidp); nfsmout: Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Tue Mar 12 15:05:11 2019 (r345064) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Tue Mar 12 15:07:47 2019 (r345065) @@ -2818,8 +2818,8 @@ nfsv4_sattr(struct nfsrv_descript *nd, vnode_t vp, str goto nfsmout; } if (!nd->nd_repstat) { - nd->nd_repstat = nfsv4_strtogid(nd, cp, j, &gid, - p); + nd->nd_repstat = nfsv4_strtogid(nd, cp, j, + &gid); if (!nd->nd_repstat) nvap->na_gid = gid; } From owner-svn-src-all@freebsd.org Tue Mar 12 15:43:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81FBC153424F; Tue, 12 Mar 2019 15:43:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C7B36CDD4; Tue, 12 Mar 2019 15:43:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 3A16E1F5F8; Tue, 12 Mar 2019 15:43:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r345050 - head/bin/date To: Warner Losh , "Rodney W. Grimes" Cc: Warner Losh , src-committers , svn-src-all , svn-src-head References: <201903120515.x2C5Fbtw013485@gndrsh.dnsmgr.net> <201903120525.x2C5PH7X013552@gndrsh.dnsmgr.net> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Tue, 12 Mar 2019 08:43:00 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 1C7B36CDD4 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 15:43:04 -0000 On 3/11/19 10:43 PM, Warner Losh wrote: > On Mon, Mar 11, 2019 at 11:25 PM Rodney W. Grimes > wrote: > >>>> Author: imp >>>> Date: Tue Mar 12 04:49:59 2019 >>>> New Revision: 345050 >>>> URL: https://svnweb.freebsd.org/changeset/base/345050 >>>> >>>> Log: >>>> Remove now useless -d and -t flags. >>>> >>>> These were used to set dst flag and minutes west of UTC >>>> respectively. These are obsolete and have been removed form the >>>> kernel. These existed primarily to faithfully emulate early >>>> Unix ABIs that have been removed from FreeBSD. >>>> >>>> Reviewed by: jbh@, brooks@ >> Nits: jhb@ and I see he did comment in the review, but he did not >> accept it as a reviewew at the top. >> > > This is why I think just the reference to the differential revision is > perfectly fine. Why duplicate data? Others complained I hadn't included it. > He commented, we discussed it on irc (though most of it was about how to > use arc better), etc. I thought it warranted it. So please don't nitpick. > This level is really annoying and frustrating. Does this really help us > produce a better product? To be fair, we have been pretty consistent that 'Reviewed by' in the commit means 'Accepted' in phab. I probably would have ended up accepting this anyway and just didn't click the box, so it's ok. However, we have had folks in the past who were tagged in the past and gave feedback, but didn't approve of the change, but were listed as 'Reviewed by' hence the current practice. -- John Baldwin From owner-svn-src-all@freebsd.org Tue Mar 12 15:46:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BFF21534384; Tue, 12 Mar 2019 15:46:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA8A16D0EA; Tue, 12 Mar 2019 15:46:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id E7DBA1F5F9; Tue, 12 Mar 2019 15:46:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r345040 - in stable/11: share/man/man4 sys/conf sys/dev/cxgbe sys/dev/cxgbe/crypto sys/dev/cxgbe/firmware sys/modules/cxgbe sys/modules/cxgbe/ccr sys/powerpc/conf To: Slawa Olhovchenkov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org References: <201903112316.x2BNGA4b092507@repo.freebsd.org> <20190312133258.GA6462@zxy.spb.ru> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Tue, 12 Mar 2019 08:46:36 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: <20190312133258.GA6462@zxy.spb.ru> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: BA8A16D0EA X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.965,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 15:46:39 -0000 On 3/12/19 6:32 AM, Slawa Olhovchenkov wrote: > On Mon, Mar 11, 2019 at 11:16:10PM +0000, John Baldwin wrote: > >> Author: jhb >> Date: Mon Mar 11 23:16:10 2019 >> New Revision: 345040 >> URL: https://svnweb.freebsd.org/changeset/base/345040 >> >> Log: >> MFC 318429,318967,319721,319723,323600,323724,328353-328361,330042,343056: >> Add a driver for the Chelsio T6 crypto accelerator engine. > > Where I can find example/manual of use this engine from userspace? It's hard to use usefully from userspace (even in 12/head). I have some old patches for openssl 1.0.2's cryptodev engine to teach it about more of the algorithms supported by OCF including the TLS variant of AES-GCM, but I found that the overhead of the extra copies made it not very compelling compared to using AES-NI in userland. (I had some extra changes to make /dev/crypto wire the user pages to avoid the copies and that got the /dev/crypto case down to break-even with doing AES-NI in userland.) In the kernel I see better performance where using T6 to offload crypto for IPsec does use less CPU at higher throughput than using CPU instructions though for AES-GCM AES-NI on the CPU is pretty close. -- John Baldwin From owner-svn-src-all@freebsd.org Tue Mar 12 16:21:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3244F15351E6; Tue, 12 Mar 2019 16:21:41 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D0E0F6F030; Tue, 12 Mar 2019 16:21:40 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C4626253EF; Tue, 12 Mar 2019 16:21:40 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2CGLeZ9036046; Tue, 12 Mar 2019 16:21:40 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CGLd1B036041; Tue, 12 Mar 2019 16:21:39 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201903121621.x2CGLd1B036041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 12 Mar 2019 16:21:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345066 - in head/stand: common userboot/userboot X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/stand: common userboot/userboot X-SVN-Commit-Revision: 345066 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D0E0F6F030 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 16:21:41 -0000 Author: kevans Date: Tue Mar 12 16:21:39 2019 New Revision: 345066 URL: https://svnweb.freebsd.org/changeset/base/345066 Log: stand: Improve some debugging experience Some of these files using _DEBUG defined a DEBUG() macro to serve as a debug-printf. -DDEBUG is useful to enable some debugging output across multiple ELF/common parts, so switch the DEBUG-as-printf macros over to something more like DPRINTF that is more commonly used for this kind of thing and less likely to conflict. userboot/elf64_freebsd debugging also assumed %llx for uint64; use PRIx64 instead. MFC after: 1 week Modified: head/stand/common/bcache.c head/stand/common/disk.c head/stand/common/interp_forth.c head/stand/common/part.c head/stand/userboot/userboot/elf64_freebsd.c Modified: head/stand/common/bcache.c ============================================================================== --- head/stand/common/bcache.c Tue Mar 12 15:07:47 2019 (r345065) +++ head/stand/common/bcache.c Tue Mar 12 16:21:39 2019 (r345066) @@ -44,9 +44,9 @@ __FBSDID("$FreeBSD$"); /* #define BCACHE_DEBUG */ #ifdef BCACHE_DEBUG -# define DEBUG(fmt, args...) printf("%s: " fmt "\n" , __func__ , ## args) +# define DPRINTF(fmt, args...) printf("%s: " fmt "\n" , __func__ , ## args) #else -# define DEBUG(fmt, args...) +# define DPRINTF(fmt, args...) #endif struct bcachectl @@ -369,7 +369,7 @@ bcache_strategy(void *devdata, int rw, daddr_t blk, si /* bypass large requests, or when the cache is inactive */ if (bc == NULL || ((size * 2 / bcache_blksize) > bcache_nblks)) { - DEBUG("bypass %zu from %qu", size / bcache_blksize, blk); + DPRINTF("bypass %zu from %qu", size / bcache_blksize, blk); bcache_bypasses++; rw &= F_MASK; return (dd->dv_strategy(dd->dv_devdata, rw, blk, size, buf, rsize)); @@ -444,7 +444,7 @@ bcache_insert(struct bcache *bc, daddr_t blkno) cand = BHASH(bc, blkno); - DEBUG("insert blk %llu -> %u # %d", blkno, cand, bcache_bcount); + DPRINTF("insert blk %llu -> %u # %d", blkno, cand, bcache_bcount); bc->bcache_ctl[cand].bc_blkno = blkno; bc->bcache_ctl[cand].bc_count = bcache_bcount++; } @@ -461,7 +461,7 @@ bcache_invalidate(struct bcache *bc, daddr_t blkno) if (bc->bcache_ctl[i].bc_blkno == blkno) { bc->bcache_ctl[i].bc_count = -1; bc->bcache_ctl[i].bc_blkno = -1; - DEBUG("invalidate blk %llu", blkno); + DPRINTF("invalidate blk %llu", blkno); } } Modified: head/stand/common/disk.c ============================================================================== --- head/stand/common/disk.c Tue Mar 12 15:07:47 2019 (r345065) +++ head/stand/common/disk.c Tue Mar 12 16:21:39 2019 (r345066) @@ -38,9 +38,9 @@ __FBSDID("$FreeBSD$"); #include "disk.h" #ifdef DISK_DEBUG -# define DEBUG(fmt, args...) printf("%s: " fmt "\n" , __func__ , ## args) +# define DPRINTF(fmt, args...) printf("%s: " fmt "\n" , __func__ , ## args) #else -# define DEBUG(fmt, args...) +# define DPRINTF(fmt, args...) #endif struct open_disk { @@ -231,7 +231,7 @@ disk_open(struct disk_devdesc *dev, uint64_t mediasize rc = 0; od = (struct open_disk *)malloc(sizeof(struct open_disk)); if (od == NULL) { - DEBUG("no memory"); + DPRINTF("no memory"); return (ENOMEM); } dev->dd.d_opendata = od; @@ -252,14 +252,14 @@ disk_open(struct disk_devdesc *dev, uint64_t mediasize slice = dev->d_slice; partition = dev->d_partition; - DEBUG("%s unit %d, slice %d, partition %d => %p", + DPRINTF("%s unit %d, slice %d, partition %d => %p", disk_fmtdev(dev), dev->dd.d_unit, dev->d_slice, dev->d_partition, od); /* Determine disk layout. */ od->table = ptable_open(&partdev, mediasize / sectorsize, sectorsize, ptblread); if (od->table == NULL) { - DEBUG("Can't read partition table"); + DPRINTF("Can't read partition table"); rc = ENXIO; goto out; } @@ -315,7 +315,7 @@ disk_open(struct disk_devdesc *dev, uint64_t mediasize table = ptable_open(dev, part.end - part.start + 1, od->sectorsize, ptblread); if (table == NULL) { - DEBUG("Can't read BSD label"); + DPRINTF("Can't read BSD label"); rc = ENXIO; goto out; } @@ -343,12 +343,12 @@ out: if (od->table != NULL) ptable_close(od->table); free(od); - DEBUG("%s could not open", disk_fmtdev(dev)); + DPRINTF("%s could not open", disk_fmtdev(dev)); } else { /* Save the slice and partition number to the dev */ dev->d_slice = slice; dev->d_partition = partition; - DEBUG("%s offset %lld => %p", disk_fmtdev(dev), + DPRINTF("%s offset %lld => %p", disk_fmtdev(dev), (long long)dev->d_offset, od); } return (rc); @@ -360,7 +360,7 @@ disk_close(struct disk_devdesc *dev) struct open_disk *od; od = (struct open_disk *)dev->dd.d_opendata; - DEBUG("%s closed => %p", disk_fmtdev(dev), od); + DPRINTF("%s closed => %p", disk_fmtdev(dev), od); ptable_close(od->table); free(od); return (0); Modified: head/stand/common/interp_forth.c ============================================================================== --- head/stand/common/interp_forth.c Tue Mar 12 15:07:47 2019 (r345065) +++ head/stand/common/interp_forth.c Tue Mar 12 16:21:39 2019 (r345066) @@ -39,9 +39,9 @@ INTERP_DEFINE("4th"); /* #define BFORTH_DEBUG */ #ifdef BFORTH_DEBUG -#define DEBUG(fmt, args...) printf("%s: " fmt "\n" , __func__ , ## args) +#define DPRINTF(fmt, args...) printf("%s: " fmt "\n" , __func__ , ## args) #else -#define DEBUG(fmt, args...) +#define DPRINTF(fmt, args...) #endif /* @@ -128,7 +128,7 @@ bf_command(FICL_VM *vm) vmUpdateTib(vm, tail + len); } } - DEBUG("cmd '%s'", line); + DPRINTF("cmd '%s'", line); command_errmsg = command_errbuf; command_errbuf[0] = 0; @@ -305,7 +305,7 @@ bf_run(const char *line) */ result = ficlExec(bf_vm, __DECONST(char *, line)); - DEBUG("ficlExec '%s' = %d", line, result); + DPRINTF("ficlExec '%s' = %d", line, result); switch (result) { case VM_OUTOFTEXT: case VM_ABORTQ: Modified: head/stand/common/part.c ============================================================================== --- head/stand/common/part.c Tue Mar 12 15:07:47 2019 (r345065) +++ head/stand/common/part.c Tue Mar 12 16:21:39 2019 (r345066) @@ -44,9 +44,9 @@ __FBSDID("$FreeBSD$"); #include #ifdef PART_DEBUG -#define DEBUG(fmt, args...) printf("%s: " fmt "\n", __func__, ## args) +#define DPRINTF(fmt, args...) printf("%s: " fmt "\n", __func__, ## args) #else -#define DEBUG(fmt, args...) +#define DPRINTF(fmt, args...) #endif #ifdef LOADER_GPT_SUPPORT @@ -155,34 +155,34 @@ gpt_checkhdr(struct gpt_hdr *hdr, uint64_t lba_self, u uint32_t sz, crc; if (memcmp(hdr->hdr_sig, GPT_HDR_SIG, sizeof(hdr->hdr_sig)) != 0) { - DEBUG("no GPT signature"); + DPRINTF("no GPT signature"); return (NULL); } sz = le32toh(hdr->hdr_size); if (sz < 92 || sz > sectorsize) { - DEBUG("invalid GPT header size: %d", sz); + DPRINTF("invalid GPT header size: %d", sz); return (NULL); } crc = le32toh(hdr->hdr_crc_self); hdr->hdr_crc_self = 0; if (crc32(hdr, sz) != crc) { - DEBUG("GPT header's CRC doesn't match"); + DPRINTF("GPT header's CRC doesn't match"); return (NULL); } hdr->hdr_crc_self = crc; hdr->hdr_revision = le32toh(hdr->hdr_revision); if (hdr->hdr_revision < GPT_HDR_REVISION) { - DEBUG("unsupported GPT revision %d", hdr->hdr_revision); + DPRINTF("unsupported GPT revision %d", hdr->hdr_revision); return (NULL); } hdr->hdr_lba_self = le64toh(hdr->hdr_lba_self); if (hdr->hdr_lba_self != lba_self) { - DEBUG("self LBA doesn't match"); + DPRINTF("self LBA doesn't match"); return (NULL); } hdr->hdr_lba_alt = le64toh(hdr->hdr_lba_alt); if (hdr->hdr_lba_alt == hdr->hdr_lba_self) { - DEBUG("invalid alternate LBA"); + DPRINTF("invalid alternate LBA"); return (NULL); } hdr->hdr_entries = le32toh(hdr->hdr_entries); @@ -190,7 +190,7 @@ gpt_checkhdr(struct gpt_hdr *hdr, uint64_t lba_self, u if (hdr->hdr_entries == 0 || hdr->hdr_entsz < sizeof(struct gpt_ent) || sectorsize % hdr->hdr_entsz != 0) { - DEBUG("invalid entry size or number of entries"); + DPRINTF("invalid entry size or number of entries"); return (NULL); } hdr->hdr_lba_start = le64toh(hdr->hdr_lba_start); @@ -214,7 +214,7 @@ gpt_checktbl(const struct gpt_hdr *hdr, uint8_t *tbl, /* Check CRC only when buffer size is enough for table. */ if (hdr->hdr_crc_table != crc32(tbl, hdr->hdr_entries * hdr->hdr_entsz)) { - DEBUG("GPT table's CRC doesn't match"); + DPRINTF("GPT table's CRC doesn't match"); return (-1); } } @@ -310,7 +310,7 @@ ptable_gptread(struct ptable *table, void *dev, diskre table->type = PTABLE_NONE; goto out; } - DEBUG("GPT detected"); + DPRINTF("GPT detected"); size = MIN(hdr.hdr_entries * hdr.hdr_entsz, MAXTBLSZ * table->sectorsize); @@ -346,7 +346,7 @@ ptable_gptread(struct ptable *table, void *dev, diskre entry->flags = le64toh(ent->ent_attr); memcpy(&entry->type.gpt, &ent->ent_type, sizeof(uuid_t)); STAILQ_INSERT_TAIL(&table->entries, entry, entry); - DEBUG("new GPT partition added"); + DPRINTF("new GPT partition added"); } out: free(buf); @@ -402,7 +402,7 @@ ptable_ebrread(struct ptable *table, void *dev, diskre buf = malloc(table->sectorsize); if (buf == NULL) return (table); - DEBUG("EBR detected"); + DPRINTF("EBR detected"); for (i = 0; i < MAXEBRENTRIES; i++) { #if 0 /* Some BIOSes return an incorrect number of sectors */ if (offset >= table->sectors) @@ -430,7 +430,7 @@ ptable_ebrread(struct ptable *table, void *dev, diskre entry->flags = dp[0].dp_flag; entry->type.mbr = dp[0].dp_typ; STAILQ_INSERT_TAIL(&table->entries, entry, entry); - DEBUG("new EBR partition added"); + DPRINTF("new EBR partition added"); if (dp[1].dp_typ == 0) break; offset = e1->part.start + le32toh(dp[1].dp_start); @@ -470,14 +470,14 @@ ptable_bsdread(struct ptable *table, void *dev, diskre int i; if (table->sectorsize < sizeof(struct disklabel)) { - DEBUG("Too small sectorsize"); + DPRINTF("Too small sectorsize"); return (table); } buf = malloc(table->sectorsize); if (buf == NULL) return (table); if (dread(dev, buf, 1, 1) != 0) { - DEBUG("read failed"); + DPRINTF("read failed"); ptable_close(table); table = NULL; goto out; @@ -487,15 +487,15 @@ ptable_bsdread(struct ptable *table, void *dev, diskre le32toh(dl->d_magic2) != DISKMAGIC) goto out; if (le32toh(dl->d_secsize) != table->sectorsize) { - DEBUG("unsupported sector size"); + DPRINTF("unsupported sector size"); goto out; } dl->d_npartitions = le16toh(dl->d_npartitions); if (dl->d_npartitions > 20 || dl->d_npartitions < 8) { - DEBUG("invalid number of partitions"); + DPRINTF("invalid number of partitions"); goto out; } - DEBUG("BSD detected"); + DPRINTF("BSD detected"); part = &dl->d_partitions[0]; raw_offset = le32toh(part[RAW_PART].p_offset); for (i = 0; i < dl->d_npartitions; i++, part++) { @@ -513,7 +513,7 @@ ptable_bsdread(struct ptable *table, void *dev, diskre entry->part.index = i; /* starts from zero */ entry->type.bsd = part->p_fstype; STAILQ_INSERT_TAIL(&table->entries, entry, entry); - DEBUG("new BSD partition added"); + DPRINTF("new BSD partition added"); } table->type = PTABLE_BSD; out: @@ -556,7 +556,7 @@ ptable_vtoc8read(struct ptable *table, void *dev, disk if (buf == NULL) return (table); if (dread(dev, buf, 1, 0) != 0) { - DEBUG("read failed"); + DPRINTF("read failed"); ptable_close(table); table = NULL; goto out; @@ -566,20 +566,20 @@ ptable_vtoc8read(struct ptable *table, void *dev, disk for (i = sum = 0; i < sizeof(struct vtoc8); i += sizeof(sum)) sum ^= be16dec(buf + i); if (sum != 0) { - DEBUG("incorrect checksum"); + DPRINTF("incorrect checksum"); goto out; } if (be16toh(dl->nparts) != VTOC8_NPARTS) { - DEBUG("invalid number of entries"); + DPRINTF("invalid number of entries"); goto out; } sectors = be16toh(dl->nsecs); heads = be16toh(dl->nheads); if (sectors * heads == 0) { - DEBUG("invalid geometry"); + DPRINTF("invalid geometry"); goto out; } - DEBUG("VTOC8 detected"); + DPRINTF("VTOC8 detected"); for (i = 0; i < VTOC8_NPARTS; i++) { dl->part[i].tag = be16toh(dl->part[i].tag); if (i == VTOC_RAW_PART || @@ -595,7 +595,7 @@ ptable_vtoc8read(struct ptable *table, void *dev, disk entry->part.index = i; /* starts from zero */ entry->type.vtoc8 = dl->part[i].tag; STAILQ_INSERT_TAIL(&table->entries, entry, entry); - DEBUG("new VTOC8 partition added"); + DPRINTF("new VTOC8 partition added"); } table->type = PTABLE_VTOC8; out: @@ -619,7 +619,7 @@ ptable_iso9660read(struct ptable *table, void *dev, di return (table); if (dread(dev, buf, 1, cdb2devb(16)) != 0) { - DEBUG("read failed"); + DPRINTF("read failed"); ptable_close(table); table = NULL; goto out; @@ -663,7 +663,7 @@ ptable_open(void *dev, uint64_t sectors, uint16_t sect return (NULL); /* First, read the MBR. */ if (dread(dev, buf, 1, DOSBBSECTOR) != 0) { - DEBUG("read failed"); + DPRINTF("read failed"); goto out; } @@ -703,7 +703,7 @@ ptable_open(void *dev, uint64_t sectors, uint16_t sect /* Check the MBR magic. */ if (buf[DOSMAGICOFFSET] != 0x55 || buf[DOSMAGICOFFSET + 1] != 0xaa) { - DEBUG("magic sequence not found"); + DPRINTF("magic sequence not found"); #if defined(LOADER_GPT_SUPPORT) /* There is no PMBR, check that we have backup GPT */ table->type = PTABLE_GPT; @@ -715,13 +715,13 @@ ptable_open(void *dev, uint64_t sectors, uint16_t sect dp = (struct dos_partition *)(buf + DOSPARTOFF); for (i = 0, count = 0; i < NDOSPART; i++) { if (dp[i].dp_flag != 0 && dp[i].dp_flag != 0x80) { - DEBUG("invalid partition flag %x", dp[i].dp_flag); + DPRINTF("invalid partition flag %x", dp[i].dp_flag); goto out; } #ifdef LOADER_GPT_SUPPORT if (dp[i].dp_typ == DOSPTYP_PMBR) { table->type = PTABLE_GPT; - DEBUG("PMBR detected"); + DPRINTF("PMBR detected"); } #endif if (dp[i].dp_typ != 0) @@ -731,9 +731,9 @@ ptable_open(void *dev, uint64_t sectors, uint16_t sect if (table->type == PTABLE_GPT && count > 1) { if (dp[1].dp_typ != DOSPTYP_HFS) { table->type = PTABLE_NONE; - DEBUG("Incorrect PMBR, ignore it"); + DPRINTF("Incorrect PMBR, ignore it"); } else { - DEBUG("Bootcamp detected"); + DPRINTF("Bootcamp detected"); } } #ifdef LOADER_GPT_SUPPORT @@ -744,7 +744,7 @@ ptable_open(void *dev, uint64_t sectors, uint16_t sect #endif #ifdef LOADER_MBR_SUPPORT /* Read MBR. */ - DEBUG("MBR detected"); + DPRINTF("MBR detected"); table->type = PTABLE_MBR; for (i = has_ext = 0; i < NDOSPART; i++) { if (dp[i].dp_typ == 0) @@ -770,7 +770,7 @@ ptable_open(void *dev, uint64_t sectors, uint16_t sect entry->flags = dp[i].dp_flag; entry->type.mbr = dp[i].dp_typ; STAILQ_INSERT_TAIL(&table->entries, entry, entry); - DEBUG("new MBR partition added"); + DPRINTF("new MBR partition added"); } if (has_ext) { table = ptable_ebrread(table, dev, dread); Modified: head/stand/userboot/userboot/elf64_freebsd.c ============================================================================== --- head/stand/userboot/userboot/elf64_freebsd.c Tue Mar 12 15:07:47 2019 (r345065) +++ head/stand/userboot/userboot/elf64_freebsd.c Tue Mar 12 16:21:39 2019 (r345066) @@ -31,6 +31,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef DEBUG +#include +#endif #include #include #include @@ -136,7 +139,7 @@ elf64_exec(struct preloaded_file *fp) } #ifdef DEBUG - printf("Start @ %#llx ...\n", ehdr->e_entry); + printf("Start @ %#"PRIx64" ...\n", ehdr->e_entry); #endif dev_cleanup(); From owner-svn-src-all@freebsd.org Tue Mar 12 16:33:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65C5D1535B72; Tue, 12 Mar 2019 16:33:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EDF956FAF9; Tue, 12 Mar 2019 16:33:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D9092255FE; Tue, 12 Mar 2019 16:33:49 +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 x2CGXn7Q043807; Tue, 12 Mar 2019 16:33:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CGXjll043779; Tue, 12 Mar 2019 16:33:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903121633.x2CGXjll043779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 12 Mar 2019 16:33:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345067 - in stable/12: lib/libc/sys sys/amd64/amd64 sys/arm/arm sys/arm64/arm64 sys/compat/freebsd32 sys/compat/ia32 sys/i386/i386 sys/kern sys/mips/mips sys/powerpc/powerpc sys/riscv/... X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12: lib/libc/sys sys/amd64/amd64 sys/arm/arm sys/arm64/arm64 sys/compat/freebsd32 sys/compat/ia32 sys/i386/i386 sys/kern sys/mips/mips sys/powerpc/powerpc sys/riscv/riscv sys/sparc64/sparc64... X-SVN-Commit-Revision: 345067 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EDF956FAF9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.943,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 16:33:50 -0000 Author: kib Date: Tue Mar 12 16:33:44 2019 New Revision: 345067 URL: https://svnweb.freebsd.org/changeset/base/345067 Log: MFC r343964, r344121, r344128, r344593, r344594: ASLR. Added: stable/12/usr.bin/proccontrol/proccontrol.1 - copied unchanged from r344594, head/usr.bin/proccontrol/proccontrol.1 Modified: stable/12/lib/libc/sys/procctl.2 stable/12/sys/amd64/amd64/elf_machdep.c stable/12/sys/arm/arm/elf_machdep.c stable/12/sys/arm64/arm64/elf_machdep.c stable/12/sys/compat/freebsd32/freebsd32_misc.c stable/12/sys/compat/ia32/ia32_sysvec.c stable/12/sys/i386/i386/elf_machdep.c stable/12/sys/kern/imgact_elf.c stable/12/sys/kern/kern_exec.c stable/12/sys/kern/kern_fork.c stable/12/sys/kern/kern_procctl.c stable/12/sys/mips/mips/elf_machdep.c stable/12/sys/powerpc/powerpc/elf32_machdep.c stable/12/sys/powerpc/powerpc/elf64_machdep.c stable/12/sys/riscv/riscv/elf_machdep.c stable/12/sys/sparc64/sparc64/elf_machdep.c stable/12/sys/sys/imgact.h stable/12/sys/sys/proc.h stable/12/sys/sys/procctl.h stable/12/sys/sys/sysent.h stable/12/sys/vm/vm_map.c stable/12/sys/vm/vm_map.h stable/12/usr.bin/proccontrol/Makefile stable/12/usr.bin/proccontrol/proccontrol.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/procctl.2 ============================================================================== --- stable/12/lib/libc/sys/procctl.2 Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/lib/libc/sys/procctl.2 Tue Mar 12 16:33:44 2019 (r345067) @@ -72,6 +72,46 @@ The control request to perform is specified by the argument. The following commands are supported: .Bl -tag -width PROC_TRAPCAP_STATUS +.It Dv PROC_ASLR_CTL +Controls the Address Space Layout Randomization (ASLR) in the program +images created +by +.Xr execve 2 +in the specified process or its descendants that did not changed +the control nor modified it by other means. +The +.Va arg +parameter must point to the integer variable holding one of the following +values: +.Bl -tag -width PROC_ASLR_FORCE_DISABLE +.It Dv PROC_ASLR_FORCE_ENABLE +Request that ASLR is enabled after execution, even if it is disabled +system-wide. +The image flag and set-uid might prevent ASLR enablement still. +.It Dv PROC_ASLR_FORCE_DISABLE +Request that ASLR is disabled after execution. +Same notes as for +.Dv PROC_ASKR_FORCE_ENABLE +apply. +.It Dv PROC_ASLR_NOFORCE +Use system-wide configured policy for ASLR. +.El +.It Dv PROC_ASLR_STATUS +Returns the current status of ASLR enablement for the target process. +The +.Va arg +parameter must point to the integer variable, where one of the +following values is written: +.Bl -tag -width PROC_ASLR_FORCE_DISABLE +.It Dv PROC_ASLR_FORCE_ENABLE +.It Dv PROC_ASLR_FORCE_DISABLE +.It Dv PROC_ASLR_NOFORCE +.El +.Pp +If the currently executed image in the process itself has ASLR enabled, +the +.Dv PROC_ASLR_ACTIVE +flag is or-ed with the value listed above. .It Dv PROC_SPROTECT Set process protection state. This is used to mark a process as protected from being killed if the system @@ -543,11 +583,16 @@ The .Fn procctl function appeared in .Fx 10.0 . +.Pp The reaper facility is based on a similar feature of Linux and DragonflyBSD, and first appeared in .Fx 10.2 . +.Pp The .Dv PROC_PDEATHSIG_CTL facility is based on the prctl(PR_SET_PDEATHSIG, ...) feature of Linux, and first appeared in .Fx 11.2 . +.Pp +The ASLR support was added to system for the checklists compliance in +.Fx 13.0 . Modified: stable/12/sys/amd64/amd64/elf_machdep.c ============================================================================== --- stable/12/sys/amd64/amd64/elf_machdep.c Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/amd64/amd64/elf_machdep.c Tue Mar 12 16:33:44 2019 (r345067) @@ -74,7 +74,8 @@ struct sysentvec elf64_freebsd_sysvec = { .sv_setregs = exec_setregs, .sv_fixlimit = NULL, .sv_maxssiz = NULL, - .sv_flags = SV_ABI_FREEBSD | SV_LP64 | SV_SHP | SV_TIMEKEEP, + .sv_flags = SV_ABI_FREEBSD | SV_ASLR | SV_LP64 | SV_SHP | + SV_TIMEKEEP, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, Modified: stable/12/sys/arm/arm/elf_machdep.c ============================================================================== --- stable/12/sys/arm/arm/elf_machdep.c Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/arm/arm/elf_machdep.c Tue Mar 12 16:33:44 2019 (r345067) @@ -83,9 +83,9 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_maxssiz = NULL, .sv_flags = #if __ARM_ARCH >= 6 - SV_SHP | SV_TIMEKEEP | + SV_ASLR | SV_SHP | SV_TIMEKEEP | #endif - SV_ABI_FREEBSD | SV_ILP32, + SV_ABI_FREEBSD | SV_ILP32 | SV_ASLR, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, Modified: stable/12/sys/arm64/arm64/elf_machdep.c ============================================================================== --- stable/12/sys/arm64/arm64/elf_machdep.c Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/arm64/arm64/elf_machdep.c Tue Mar 12 16:33:44 2019 (r345067) @@ -80,7 +80,8 @@ static struct sysentvec elf64_freebsd_sysvec = { .sv_setregs = exec_setregs, .sv_fixlimit = NULL, .sv_maxssiz = NULL, - .sv_flags = SV_SHP | SV_TIMEKEEP | SV_ABI_FREEBSD | SV_LP64, + .sv_flags = SV_SHP | SV_TIMEKEEP | SV_ABI_FREEBSD | SV_LP64 | + SV_ASLR, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, Modified: stable/12/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/12/sys/compat/freebsd32/freebsd32_misc.c Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/compat/freebsd32/freebsd32_misc.c Tue Mar 12 16:33:44 2019 (r345067) @@ -3351,6 +3351,7 @@ freebsd32_procctl(struct thread *td, struct freebsd32_ int error, error1, flags, signum; switch (uap->com) { + case PROC_ASLR_CTL: case PROC_SPROTECT: case PROC_TRACE_CTL: case PROC_TRAPCAP_CTL: @@ -3382,6 +3383,7 @@ freebsd32_procctl(struct thread *td, struct freebsd32_ return (error); data = &x.rk; break; + case PROC_ASLR_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: data = &flags; @@ -3410,6 +3412,7 @@ freebsd32_procctl(struct thread *td, struct freebsd32_ if (error == 0) error = error1; break; + case PROC_ASLR_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: if (error == 0) Modified: stable/12/sys/compat/ia32/ia32_sysvec.c ============================================================================== --- stable/12/sys/compat/ia32/ia32_sysvec.c Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/compat/ia32/ia32_sysvec.c Tue Mar 12 16:33:44 2019 (r345067) @@ -120,7 +120,7 @@ struct sysentvec ia32_freebsd_sysvec = { .sv_setregs = ia32_setregs, .sv_fixlimit = ia32_fixlimit, .sv_maxssiz = &ia32_maxssiz, - .sv_flags = SV_ABI_FREEBSD | SV_IA32 | SV_ILP32 | + .sv_flags = SV_ABI_FREEBSD | SV_ASLR | SV_IA32 | SV_ILP32 | SV_SHP | SV_TIMEKEEP, .sv_set_syscall_retval = ia32_set_syscall_retval, .sv_fetch_syscall_args = ia32_fetch_syscall_args, Modified: stable/12/sys/i386/i386/elf_machdep.c ============================================================================== --- stable/12/sys/i386/i386/elf_machdep.c Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/i386/i386/elf_machdep.c Tue Mar 12 16:33:44 2019 (r345067) @@ -76,8 +76,8 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_setregs = exec_setregs, .sv_fixlimit = NULL, .sv_maxssiz = NULL, - .sv_flags = SV_ABI_FREEBSD | SV_IA32 | SV_ILP32 | SV_SHP | - SV_TIMEKEEP, + .sv_flags = SV_ABI_FREEBSD | SV_ASLR | SV_IA32 | SV_ILP32 | + SV_SHP | SV_TIMEKEEP, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, Modified: stable/12/sys/kern/imgact_elf.c ============================================================================== --- stable/12/sys/kern/imgact_elf.c Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/kern/imgact_elf.c Tue Mar 12 16:33:44 2019 (r345067) @@ -137,6 +137,27 @@ SYSCTL_INT(_kern_elf32, OID_AUTO, read_exec, CTLFLAG_R #endif #endif +SYSCTL_NODE(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO, aslr, CTLFLAG_RW, 0, + ""); +#define ASLR_NODE_OID __CONCAT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), _aslr) + +static int __elfN(aslr_enabled) = 0; +SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, enable, CTLFLAG_RWTUN, + &__elfN(aslr_enabled), 0, + __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) + ": enable address map randomization"); + +static int __elfN(pie_aslr_enabled) = 0; +SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, pie_enable, CTLFLAG_RWTUN, + &__elfN(pie_aslr_enabled), 0, + __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) + ": enable address map randomization for PIE binaries"); + +static int __elfN(aslr_honor_sbrk) = 1; +SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, honor_sbrk, CTLFLAG_RW, + &__elfN(aslr_honor_sbrk), 0, + __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": assume sbrk is used"); + static Elf_Brandinfo *elf_brand_list[MAX_BRANDS]; #define trunc_page_ps(va, ps) rounddown2(va, ps) @@ -774,6 +795,36 @@ fail: return (error); } +static u_long +__CONCAT(rnd_, __elfN(base))(vm_map_t map __unused, u_long minv, u_long maxv, + u_int align) +{ + u_long rbase, res; + + MPASS(vm_map_min(map) <= minv); + MPASS(maxv <= vm_map_max(map)); + MPASS(minv < maxv); + MPASS(minv + align < maxv); + arc4rand(&rbase, sizeof(rbase), 0); + res = roundup(minv, (u_long)align) + rbase % (maxv - minv); + res &= ~((u_long)align - 1); + if (res >= maxv) + res -= align; + KASSERT(res >= minv, + ("res %#lx < minv %#lx, maxv %#lx rbase %#lx", + res, minv, maxv, rbase)); + KASSERT(res < maxv, + ("res %#lx > maxv %#lx, minv %#lx rbase %#lx", + res, maxv, minv, rbase)); + return (res); +} + +/* + * Impossible et_dyn_addr initial value indicating that the real base + * must be calculated later with some randomization applied. + */ +#define ET_DYN_ADDR_RAND 1 + static int __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) { @@ -782,6 +833,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *i const Elf_Phdr *phdr; Elf_Auxargs *elf_auxargs; struct vmspace *vmspace; + vm_map_t map; const char *err_str, *newinterp; char *interp, *interp_buf, *path; Elf_Brandinfo *brand_info; @@ -789,6 +841,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *i vm_prot_t prot; u_long text_size, data_size, total_size, text_addr, data_addr; u_long seg_size, seg_addr, addr, baddr, et_dyn_addr, entry, proghdr; + u_long maxalign, mapsz, maxv, maxv1; uint32_t fctl0; int32_t osrel; int error, i, n, interp_name_len, have_interp; @@ -832,12 +885,17 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *i err_str = newinterp = NULL; interp = interp_buf = NULL; td = curthread; + maxalign = PAGE_SIZE; + mapsz = 0; for (i = 0; i < hdr->e_phnum; i++) { switch (phdr[i].p_type) { case PT_LOAD: if (n == 0) baddr = phdr[i].p_vaddr; + if (phdr[i].p_align > maxalign) + maxalign = phdr[i].p_align; + mapsz += phdr[i].p_memsz; n++; break; case PT_INTERP: @@ -898,6 +956,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *i error = ENOEXEC; goto ret; } + sv = brand_info->sysvec; et_dyn_addr = 0; if (hdr->e_type == ET_DYN) { if ((brand_info->flags & BI_CAN_EXEC_DYN) == 0) { @@ -909,10 +968,18 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *i * Honour the base load address from the dso if it is * non-zero for some reason. */ - if (baddr == 0) - et_dyn_addr = ET_DYN_LOAD_ADDR; + if (baddr == 0) { + if ((sv->sv_flags & SV_ASLR) == 0 || + (fctl0 & NT_FREEBSD_FCTL_ASLR_DISABLE) != 0) + et_dyn_addr = ET_DYN_LOAD_ADDR; + else if ((__elfN(pie_aslr_enabled) && + (imgp->proc->p_flag2 & P2_ASLR_DISABLE) == 0) || + (imgp->proc->p_flag2 & P2_ASLR_ENABLE) != 0) + et_dyn_addr = ET_DYN_ADDR_RAND; + else + et_dyn_addr = ET_DYN_LOAD_ADDR; + } } - sv = brand_info->sysvec; if (interp != NULL && brand_info->interp_newpath != NULL) newinterp = brand_info->interp_newpath; @@ -929,9 +996,54 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *i */ VOP_UNLOCK(imgp->vp, 0); + /* + * Decide whether to enable randomization of user mappings. + * First, reset user preferences for the setid binaries. + * Then, account for the support of the randomization by the + * ABI, by user preferences, and make special treatment for + * PIE binaries. + */ + if (imgp->credential_setid) { + PROC_LOCK(imgp->proc); + imgp->proc->p_flag2 &= ~(P2_ASLR_ENABLE | P2_ASLR_DISABLE); + PROC_UNLOCK(imgp->proc); + } + if ((sv->sv_flags & SV_ASLR) == 0 || + (imgp->proc->p_flag2 & P2_ASLR_DISABLE) != 0 || + (fctl0 & NT_FREEBSD_FCTL_ASLR_DISABLE) != 0) { + KASSERT(et_dyn_addr != ET_DYN_ADDR_RAND, + ("et_dyn_addr == RAND and !ASLR")); + } else if ((imgp->proc->p_flag2 & P2_ASLR_ENABLE) != 0 || + (__elfN(aslr_enabled) && hdr->e_type == ET_EXEC) || + et_dyn_addr == ET_DYN_ADDR_RAND) { + imgp->map_flags |= MAP_ASLR; + /* + * If user does not care about sbrk, utilize the bss + * grow region for mappings as well. We can select + * the base for the image anywere and still not suffer + * from the fragmentation. + */ + if (!__elfN(aslr_honor_sbrk) || + (imgp->proc->p_flag2 & P2_ASLR_IGNSTART) != 0) + imgp->map_flags |= MAP_ASLR_IGNSTART; + } + error = exec_new_vmspace(imgp, sv); + vmspace = imgp->proc->p_vmspace; + map = &vmspace->vm_map; + imgp->proc->p_sysent = sv; + maxv = vm_map_max(map) - lim_max(td, RLIMIT_STACK); + if (et_dyn_addr == ET_DYN_ADDR_RAND) { + KASSERT((map->flags & MAP_ASLR) != 0, + ("ET_DYN_ADDR_RAND but !MAP_ASLR")); + et_dyn_addr = __CONCAT(rnd_, __elfN(base))(map, + vm_map_min(map) + mapsz + lim_max(td, RLIMIT_DATA), + /* reserve half of the address space to interpreter */ + maxv / 2, 1UL << flsl(maxalign)); + } + vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); if (error != 0) goto ret; @@ -1023,7 +1135,6 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *i goto ret; } - vmspace = imgp->proc->p_vmspace; vmspace->vm_tsize = text_size >> PAGE_SHIFT; vmspace->vm_taddr = (caddr_t)(uintptr_t)text_addr; vmspace->vm_dsize = data_size >> PAGE_SHIFT; @@ -1037,6 +1148,14 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *i */ addr = round_page((vm_offset_t)vmspace->vm_daddr + lim_max(td, RLIMIT_DATA)); + if ((map->flags & MAP_ASLR) != 0) { + maxv1 = maxv / 2 + addr / 2; + MPASS(maxv1 >= addr); /* No overflow */ + map->anon_loc = __CONCAT(rnd_, __elfN(base))(map, addr, maxv1, + MAXPAGESIZES > 1 ? pagesizes[1] : pagesizes[0]); + } else { + map->anon_loc = addr; + } PROC_UNLOCK(imgp->proc); imgp->entry_addr = entry; @@ -1044,6 +1163,13 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *i if (interp != NULL) { have_interp = FALSE; VOP_UNLOCK(imgp->vp, 0); + if ((map->flags & MAP_ASLR) != 0) { + /* Assume that interpeter fits into 1/4 of AS */ + maxv1 = maxv / 2 + addr / 2; + MPASS(maxv1 >= addr); /* No overflow */ + addr = __CONCAT(rnd_, __elfN(base))(map, addr, + maxv1, PAGE_SIZE); + } if (brand_info->emul_path != NULL && brand_info->emul_path[0] != '\0') { path = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); Modified: stable/12/sys/kern/kern_exec.c ============================================================================== --- stable/12/sys/kern/kern_exec.c Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/kern/kern_exec.c Tue Mar 12 16:33:44 2019 (r345067) @@ -1104,9 +1104,13 @@ exec_new_vmspace(struct image_params *imgp, struct sys shmexit(vmspace); pmap_remove_pages(vmspace_pmap(vmspace)); vm_map_remove(map, vm_map_min(map), vm_map_max(map)); - /* An exec terminates mlockall(MCL_FUTURE). */ + /* + * An exec terminates mlockall(MCL_FUTURE), ASLR state + * must be re-evaluated. + */ vm_map_lock(map); - vm_map_modflags(map, 0, MAP_WIREFUTURE); + vm_map_modflags(map, 0, MAP_WIREFUTURE | MAP_ASLR | + MAP_ASLR_IGNSTART); vm_map_unlock(map); } else { error = vmspace_exec(p, sv_minuser, sv->sv_maxuser); @@ -1115,6 +1119,7 @@ exec_new_vmspace(struct image_params *imgp, struct sys vmspace = p->p_vmspace; map = &vmspace->vm_map; } + map->flags |= imgp->map_flags; /* Map a shared page */ obj = sv->sv_shared_page_obj; Modified: stable/12/sys/kern/kern_fork.c ============================================================================== --- stable/12/sys/kern/kern_fork.c Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/kern/kern_fork.c Tue Mar 12 16:33:44 2019 (r345067) @@ -507,7 +507,8 @@ do_fork(struct thread *td, struct fork_req *fr, struct * Increase reference counts on shared objects. */ p2->p_flag = P_INMEM; - p2->p_flag2 = p1->p_flag2 & (P2_NOTRACE | P2_NOTRACE_EXEC | P2_TRAPCAP); + p2->p_flag2 = p1->p_flag2 & (P2_ASLR_DISABLE | P2_ASLR_ENABLE | + P2_ASLR_IGNSTART | P2_NOTRACE | P2_NOTRACE_EXEC | P2_TRAPCAP); p2->p_swtick = ticks; if (p1->p_flag & P_PROFIL) startprofclock(p2); Modified: stable/12/sys/kern/kern_procctl.c ============================================================================== --- stable/12/sys/kern/kern_procctl.c Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/kern/kern_procctl.c Tue Mar 12 16:33:44 2019 (r345067) @@ -43,6 +43,11 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include +#include + static int protect_setchild(struct thread *td, struct proc *p, int flags) { @@ -413,6 +418,62 @@ trapcap_status(struct thread *td, struct proc *p, int return (0); } +static int +aslr_ctl(struct thread *td, struct proc *p, int state) +{ + + PROC_LOCK_ASSERT(p, MA_OWNED); + + switch (state) { + case PROC_ASLR_FORCE_ENABLE: + p->p_flag2 &= ~P2_ASLR_DISABLE; + p->p_flag2 |= P2_ASLR_ENABLE; + break; + case PROC_ASLR_FORCE_DISABLE: + p->p_flag2 |= P2_ASLR_DISABLE; + p->p_flag2 &= ~P2_ASLR_ENABLE; + break; + case PROC_ASLR_NOFORCE: + p->p_flag2 &= ~(P2_ASLR_ENABLE | P2_ASLR_DISABLE); + break; + default: + return (EINVAL); + } + return (0); +} + +static int +aslr_status(struct thread *td, struct proc *p, int *data) +{ + struct vmspace *vm; + int d; + + switch (p->p_flag2 & (P2_ASLR_ENABLE | P2_ASLR_DISABLE)) { + case 0: + d = PROC_ASLR_NOFORCE; + break; + case P2_ASLR_ENABLE: + d = PROC_ASLR_FORCE_ENABLE; + break; + case P2_ASLR_DISABLE: + d = PROC_ASLR_FORCE_DISABLE; + break; + } + if ((p->p_flag & P_WEXIT) == 0) { + _PHOLD(p); + PROC_UNLOCK(p); + vm = vmspace_acquire_ref(p); + if (vm != NULL && (vm->vm_map.flags & MAP_ASLR) != 0) { + d |= PROC_ASLR_ACTIVE; + vmspace_free(vm); + } + PROC_LOCK(p); + _PRELE(p); + } + *data = d; + return (0); +} + #ifndef _SYS_SYSPROTO_H_ struct procctl_args { idtype_t idtype; @@ -434,6 +495,7 @@ sys_procctl(struct thread *td, struct procctl_args *ua int error, error1, flags, signum; switch (uap->com) { + case PROC_ASLR_CTL: case PROC_SPROTECT: case PROC_TRACE_CTL: case PROC_TRAPCAP_CTL: @@ -463,6 +525,7 @@ sys_procctl(struct thread *td, struct procctl_args *ua return (error); data = &x.rk; break; + case PROC_ASLR_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: data = &flags; @@ -490,6 +553,7 @@ sys_procctl(struct thread *td, struct procctl_args *ua if (error == 0) error = error1; break; + case PROC_ASLR_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: if (error == 0) @@ -509,6 +573,10 @@ kern_procctl_single(struct thread *td, struct proc *p, PROC_LOCK_ASSERT(p, MA_OWNED); switch (com) { + case PROC_ASLR_CTL: + return (aslr_ctl(td, p, *(int *)data)); + case PROC_ASLR_STATUS: + return (aslr_status(td, p, data)); case PROC_SPROTECT: return (protect_set(td, p, *(int *)data)); case PROC_REAP_ACQUIRE: @@ -544,6 +612,8 @@ kern_procctl(struct thread *td, idtype_t idtype, id_t bool tree_locked; switch (com) { + case PROC_ASLR_CTL: + case PROC_ASLR_STATUS: case PROC_REAP_ACQUIRE: case PROC_REAP_RELEASE: case PROC_REAP_STATUS: @@ -593,6 +663,8 @@ kern_procctl(struct thread *td, idtype_t idtype, id_t sx_xlock(&proctree_lock); tree_locked = true; break; + case PROC_ASLR_CTL: + case PROC_ASLR_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: tree_locked = false; Modified: stable/12/sys/mips/mips/elf_machdep.c ============================================================================== --- stable/12/sys/mips/mips/elf_machdep.c Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/mips/mips/elf_machdep.c Tue Mar 12 16:33:44 2019 (r345067) @@ -77,7 +77,7 @@ struct sysentvec elf64_freebsd_sysvec = { .sv_setregs = exec_setregs, .sv_fixlimit = NULL, .sv_maxssiz = NULL, - .sv_flags = SV_ABI_FREEBSD | SV_LP64, + .sv_flags = SV_ABI_FREEBSD | SV_LP64 | SV_ASLR, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, @@ -133,7 +133,7 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_setregs = exec_setregs, .sv_fixlimit = NULL, .sv_maxssiz = NULL, - .sv_flags = SV_ABI_FREEBSD | SV_ILP32, + .sv_flags = SV_ABI_FREEBSD | SV_ILP32 | SV_ASLR, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, Modified: stable/12/sys/powerpc/powerpc/elf32_machdep.c ============================================================================== --- stable/12/sys/powerpc/powerpc/elf32_machdep.c Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/powerpc/powerpc/elf32_machdep.c Tue Mar 12 16:33:44 2019 (r345067) @@ -116,7 +116,7 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_fixlimit = NULL, #endif .sv_maxssiz = NULL, - .sv_flags = SV_ABI_FREEBSD | SV_ILP32 | SV_SHP, + .sv_flags = SV_ABI_FREEBSD | SV_ILP32 | SV_SHP | SV_ASLR, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_shared_page_base = FREEBSD32_SHAREDPAGE, Modified: stable/12/sys/powerpc/powerpc/elf64_machdep.c ============================================================================== --- stable/12/sys/powerpc/powerpc/elf64_machdep.c Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/powerpc/powerpc/elf64_machdep.c Tue Mar 12 16:33:44 2019 (r345067) @@ -80,7 +80,7 @@ struct sysentvec elf64_freebsd_sysvec_v1 = { .sv_setregs = exec_setregs_funcdesc, .sv_fixlimit = NULL, .sv_maxssiz = NULL, - .sv_flags = SV_ABI_FREEBSD | SV_LP64 | SV_SHP, + .sv_flags = SV_ABI_FREEBSD | SV_LP64 | SV_SHP | SV_ASLR, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, Modified: stable/12/sys/riscv/riscv/elf_machdep.c ============================================================================== --- stable/12/sys/riscv/riscv/elf_machdep.c Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/riscv/riscv/elf_machdep.c Tue Mar 12 16:33:44 2019 (r345067) @@ -83,7 +83,7 @@ struct sysentvec elf64_freebsd_sysvec = { .sv_setregs = exec_setregs, .sv_fixlimit = NULL, .sv_maxssiz = NULL, - .sv_flags = SV_ABI_FREEBSD | SV_LP64, + .sv_flags = SV_ABI_FREEBSD | SV_LP64 | SV_ASLR, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, Modified: stable/12/sys/sparc64/sparc64/elf_machdep.c ============================================================================== --- stable/12/sys/sparc64/sparc64/elf_machdep.c Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/sparc64/sparc64/elf_machdep.c Tue Mar 12 16:33:44 2019 (r345067) @@ -81,7 +81,7 @@ static struct sysentvec elf64_freebsd_sysvec = { .sv_setregs = exec_setregs, .sv_fixlimit = NULL, .sv_maxssiz = NULL, - .sv_flags = SV_ABI_FREEBSD | SV_LP64, + .sv_flags = SV_ABI_FREEBSD | SV_LP64 | SV_ASLR, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, Modified: stable/12/sys/sys/imgact.h ============================================================================== --- stable/12/sys/sys/imgact.h Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/sys/imgact.h Tue Mar 12 16:33:44 2019 (r345067) @@ -88,6 +88,7 @@ struct image_params { u_long stack_sz; struct ucred *newcred; /* new credentials if changing */ bool credential_setid; /* true if becoming setid */ + u_int map_flags; }; #ifdef _KERNEL Modified: stable/12/sys/sys/proc.h ============================================================================== --- stable/12/sys/sys/proc.h Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/sys/proc.h Tue Mar 12 16:33:44 2019 (r345067) @@ -752,6 +752,9 @@ struct proc { #define P2_AST_SU 0x00000008 /* Handles SU ast for kthreads. */ #define P2_PTRACE_FSTP 0x00000010 /* SIGSTOP from PT_ATTACH not yet handled. */ #define P2_TRAPCAP 0x00000020 /* SIGTRAP on ENOTCAPABLE */ +#define P2_ASLR_ENABLE 0x00000040 /* Force enable ASLR. */ +#define P2_ASLR_DISABLE 0x00000080 /* Force disable ASLR. */ +#define P2_ASLR_IGNSTART 0x00000100 /* Enable ASLR to consume sbrk area. */ /* Flags protected by proctree_lock, kept in p_treeflags. */ #define P_TREE_ORPHANED 0x00000001 /* Reparented, on orphan list */ Modified: stable/12/sys/sys/procctl.h ============================================================================== --- stable/12/sys/sys/procctl.h Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/sys/procctl.h Tue Mar 12 16:33:44 2019 (r345067) @@ -53,6 +53,8 @@ #define PROC_TRAPCAP_STATUS 10 /* query trap capability status */ #define PROC_PDEATHSIG_CTL 11 /* set parent death signal */ #define PROC_PDEATHSIG_STATUS 12 /* get parent death signal */ +#define PROC_ASLR_CTL 13 /* en/dis ASLR */ +#define PROC_ASLR_STATUS 14 /* query ASLR status */ /* Operations for PROC_SPROTECT (passed in integer arg). */ #define PPROT_OP(x) ((x) & 0xf) @@ -115,6 +117,11 @@ struct procctl_reaper_kill { #define PROC_TRAPCAP_CTL_ENABLE 1 #define PROC_TRAPCAP_CTL_DISABLE 2 + +#define PROC_ASLR_FORCE_ENABLE 1 +#define PROC_ASLR_FORCE_DISABLE 2 +#define PROC_ASLR_NOFORCE 3 +#define PROC_ASLR_ACTIVE 0x80000000 #ifndef _KERNEL __BEGIN_DECLS Modified: stable/12/sys/sys/sysent.h ============================================================================== --- stable/12/sys/sys/sysent.h Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/sys/sysent.h Tue Mar 12 16:33:44 2019 (r345067) @@ -145,6 +145,7 @@ struct sysentvec { #define SV_SHP 0x010000 /* Shared page. */ #define SV_CAPSICUM 0x020000 /* Force cap_enter() on startup. */ #define SV_TIMEKEEP 0x040000 /* Shared page timehands. */ +#define SV_ASLR 0x080000 /* ASLR allowed. */ #define SV_ABI_MASK 0xff #define SV_ABI_ERRNO(p, e) ((p)->p_sysent->sv_errsize <= 0 ? e : \ Modified: stable/12/sys/vm/vm_map.c ============================================================================== --- stable/12/sys/vm/vm_map.c Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/vm/vm_map.c Tue Mar 12 16:33:44 2019 (r345067) @@ -801,6 +801,7 @@ _vm_map_init(vm_map_t map, pmap_t pmap, vm_offset_t mi map->root = NULL; map->timestamp = 0; map->busy = 0; + map->anon_loc = 0; } void @@ -1480,6 +1481,36 @@ vm_map_fixed(vm_map_t map, vm_object_t object, vm_ooff return (result); } +static const int aslr_pages_rnd_64[2] = {0x1000, 0x10}; +static const int aslr_pages_rnd_32[2] = {0x100, 0x4}; + +static int cluster_anon = 1; +SYSCTL_INT(_vm, OID_AUTO, cluster_anon, CTLFLAG_RW, + &cluster_anon, 0, + "Cluster anonymous mappings: 0 = no, 1 = yes if no hint, 2 = always"); + +static bool +clustering_anon_allowed(vm_offset_t addr) +{ + + switch (cluster_anon) { + case 0: + return (false); + case 1: + return (addr == 0); + case 2: + default: + return (true); + } +} + +static long aslr_restarts; +SYSCTL_LONG(_vm, OID_AUTO, aslr_restarts, CTLFLAG_RD, + &aslr_restarts, 0, + "Number of aslr failures"); + +#define MAP_32BIT_MAX_ADDR ((vm_offset_t)1 << 31) + /* * Searches for the specified amount of free space in the given map with the * specified alignment. Performs an address-ordered, first-fit search from @@ -1559,8 +1590,9 @@ vm_map_find(vm_map_t map, vm_object_t object, vm_ooffs vm_size_t length, vm_offset_t max_addr, int find_space, vm_prot_t prot, vm_prot_t max, int cow) { - vm_offset_t alignment, min_addr; - int rv; + vm_offset_t alignment, curr_min_addr, min_addr; + int gap, pidx, rv, try; + bool cluster, en_aslr, update_anon; KASSERT((cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) == 0 || object == NULL, @@ -1575,24 +1607,96 @@ vm_map_find(vm_map_t map, vm_object_t object, vm_ooffs alignment = (vm_offset_t)1 << (find_space >> 8); } else alignment = 0; + en_aslr = (map->flags & MAP_ASLR) != 0; + update_anon = cluster = clustering_anon_allowed(*addr) && + (map->flags & MAP_IS_SUB_MAP) == 0 && max_addr == 0 && + find_space != VMFS_NO_SPACE && object == NULL && + (cow & (MAP_INHERIT_SHARE | MAP_STACK_GROWS_UP | + MAP_STACK_GROWS_DOWN)) == 0 && prot != PROT_NONE; + curr_min_addr = min_addr = *addr; + if (en_aslr && min_addr == 0 && !cluster && + find_space != VMFS_NO_SPACE && + (map->flags & MAP_ASLR_IGNSTART) != 0) + curr_min_addr = min_addr = vm_map_min(map); + try = 0; vm_map_lock(map); + if (cluster) { + curr_min_addr = map->anon_loc; + if (curr_min_addr == 0) + cluster = false; + } if (find_space != VMFS_NO_SPACE) { KASSERT(find_space == VMFS_ANY_SPACE || find_space == VMFS_OPTIMAL_SPACE || find_space == VMFS_SUPER_SPACE || alignment != 0, ("unexpected VMFS flag")); - min_addr = *addr; again: - if (vm_map_findspace(map, min_addr, length, addr) || + /* + * When creating an anonymous mapping, try clustering + * with an existing anonymous mapping first. + * + * We make up to two attempts to find address space + * for a given find_space value. The first attempt may + * apply randomization or may cluster with an existing + * anonymous mapping. If this first attempt fails, + * perform a first-fit search of the available address + * space. + * + * If all tries failed, and find_space is + * VMFS_OPTIMAL_SPACE, fallback to VMFS_ANY_SPACE. + * Again enable clustering and randomization. + */ + try++; + MPASS(try <= 2); + + if (try == 2) { + /* + * Second try: we failed either to find a + * suitable region for randomizing the + * allocation, or to cluster with an existing + * mapping. Retry with free run. + */ + curr_min_addr = (map->flags & MAP_ASLR_IGNSTART) != 0 ? + vm_map_min(map) : min_addr; + atomic_add_long(&aslr_restarts, 1); + } + + if (try == 1 && en_aslr && !cluster) { + /* + * Find space for allocation, including + * gap needed for later randomization. + */ + pidx = MAXPAGESIZES > 1 && pagesizes[1] != 0 && + (find_space == VMFS_SUPER_SPACE || find_space == + VMFS_OPTIMAL_SPACE) ? 1 : 0; + gap = vm_map_max(map) > MAP_32BIT_MAX_ADDR && + (max_addr == 0 || max_addr > MAP_32BIT_MAX_ADDR) ? + aslr_pages_rnd_64[pidx] : aslr_pages_rnd_32[pidx]; + if (vm_map_findspace(map, curr_min_addr, length + + gap * pagesizes[pidx], addr) || + (max_addr != 0 && *addr + length > max_addr)) + goto again; + /* And randomize the start address. */ + *addr += (arc4random() % gap) * pagesizes[pidx]; + } else if (vm_map_findspace(map, curr_min_addr, length, addr) || (max_addr != 0 && *addr + length > max_addr)) { + if (cluster) { + cluster = false; + MPASS(try == 1); + goto again; + } rv = KERN_NO_SPACE; goto done; } + if (find_space != VMFS_ANY_SPACE && (rv = vm_map_alignspace(map, object, offset, addr, length, max_addr, alignment)) != KERN_SUCCESS) { if (find_space == VMFS_OPTIMAL_SPACE) { find_space = VMFS_ANY_SPACE; + curr_min_addr = min_addr; + cluster = update_anon; + try = 0; goto again; } goto done; @@ -1613,6 +1717,8 @@ again: rv = vm_map_insert(map, object, offset, *addr, *addr + length, prot, max, cow); } + if (rv == KERN_SUCCESS && update_anon) + map->anon_loc = *addr + length; done: vm_map_unlock(map); return (rv); @@ -1922,8 +2028,14 @@ vm_map_submap( vm_map_t submap) { vm_map_entry_t entry; - int result = KERN_INVALID_ARGUMENT; + int result; + result = KERN_INVALID_ARGUMENT; + + vm_map_lock(submap); + submap->flags |= MAP_IS_SUB_MAP; + vm_map_unlock(submap); + vm_map_lock(map); VM_MAP_RANGE_CHECK(map, start, end); @@ -1944,6 +2056,11 @@ vm_map_submap( } vm_map_unlock(map); + if (result != KERN_SUCCESS) { + vm_map_lock(submap); + submap->flags &= ~MAP_IS_SUB_MAP; + vm_map_unlock(submap); + } return (result); } @@ -3170,6 +3287,9 @@ vm_map_delete(vm_map_t map, vm_offset_t start, vm_offs entry->object.vm_object != NULL) pmap_remove(map->pmap, entry->start, entry->end); + if (entry->end == map->anon_loc) + map->anon_loc = entry->start; + /* * Delete the entry only after removing all pmap * entries pointing to its pages. (Otherwise, its @@ -3452,6 +3572,8 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_c vmspace_free(vm2); return (NULL); } + + new_map->anon_loc = old_map->anon_loc; old_entry = old_map->header.next; Modified: stable/12/sys/vm/vm_map.h ============================================================================== --- stable/12/sys/vm/vm_map.h Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/sys/vm/vm_map.h Tue Mar 12 16:33:44 2019 (r345067) @@ -202,6 +202,7 @@ struct vm_map { vm_flags_t flags; /* flags for this vm_map */ vm_map_entry_t root; /* Root of a binary search tree */ pmap_t pmap; /* (c) Physical map */ + vm_offset_t anon_loc; int busy; }; @@ -210,6 +211,9 @@ struct vm_map { */ #define MAP_WIREFUTURE 0x01 /* wire all future pages */ #define MAP_BUSY_WAKEUP 0x02 +#define MAP_IS_SUB_MAP 0x04 /* has parent */ +#define MAP_ASLR 0x08 /* enabled ASLR */ +#define MAP_ASLR_IGNSTART 0x10 #ifdef _KERNEL #if defined(KLD_MODULE) && !defined(KLD_TIED) Modified: stable/12/usr.bin/proccontrol/Makefile ============================================================================== --- stable/12/usr.bin/proccontrol/Makefile Tue Mar 12 16:21:39 2019 (r345066) +++ stable/12/usr.bin/proccontrol/Makefile Tue Mar 12 16:33:44 2019 (r345067) @@ -2,6 +2,5 @@ PROG= proccontrol WARNS?= 6 -MAN= .include Copied: stable/12/usr.bin/proccontrol/proccontrol.1 (from r344594, head/usr.bin/proccontrol/proccontrol.1) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/proccontrol/proccontrol.1 Tue Mar 12 16:33:44 2019 (r345067, copy of r344594, head/usr.bin/proccontrol/proccontrol.1) @@ -0,0 +1,123 @@ +.\" Copyright (c) 2019 The FreeBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This documentation was written by +.\" Konstantin Belousov under sponsorship +.\" from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd February 22, 2019 +.Dt PROCCONTROL 1 +.Os +.Sh NAME +.Nm proccontrol +.Nd Control some process execution aspects +.Sh SYNOPSIS +.Nm +.Fl m Ar mode +.Op Fl s Ar control +.Op Fl q +.Fl p Ar pid | command +.Sh DESCRIPTION +The +.Nm +command modifies the execution parameter of existing process +specified by the +.Ar pid +argument, or starts execution of the new program +.Ar command +with the execution parameter set for it. +.Pp +Which execution parameter is changed, selected by the mandatory +parameter +.Ar mode . +Possible values for +.Ar mode +are: +.Bl -tag -width trapcap +.It Ar aslr +Control the Address Space Layout Randomization. +Only applicable to the new process spawned. +.It Ar trace +Control the permission for debuggers to attach. +.It Ar trapcap +Controls the signalling of capability mode access violations. +.El +.Pp +The +Ar control +specifies if the selected +.Ar mode +should be enabled or disabled. +Possible values are +.Ar enable +and +.Ar disable , +with the default value being +.Ar enable +if not specified. +See +.Xr procctl 2 +for detailed description of each mode effects and interaction with other +process control facilities. +.Pp +The +.Op Fl q +switch makes the utility query and print the current setting for +the selected mode. +.Sh EXIT STATUS *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Mar 12 16:41:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 305781535F67; Tue, 12 Mar 2019 16:41:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E8B46FF7C; Tue, 12 Mar 2019 16:41:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51AFA2574E; Tue, 12 Mar 2019 16:41:18 +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 x2CGfICL044210; Tue, 12 Mar 2019 16:41:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CGfIat044209; Tue, 12 Mar 2019 16:41:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903121641.x2CGfIat044209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 12 Mar 2019 16:41:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345068 - in head: contrib/llvm/projects lib/libgcc_eh X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: contrib/llvm/projects lib/libgcc_eh X-SVN-Commit-Revision: 345068 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5E8B46FF7C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.94)[-0.939,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 16:41:19 -0000 Author: jhb Date: Tue Mar 12 16:41:17 2019 New Revision: 345068 URL: https://svnweb.freebsd.org/changeset/base/345068 Log: Move libunwind out of contrib/llvm/projects. Move LLVM's libunwind to its own contrib/ directory similar to other runtime libraries like libc++ and libcxxrt. Reviewed by: dim, emaste Differential Revision: https://reviews.freebsd.org/D19534 Added: - copied from r345067, head/contrib/llvm/projects/libunwind/ Directory Properties: head/contrib/libunwind/ (props changed) Deleted: head/contrib/llvm/projects/ Modified: head/lib/libgcc_eh/Makefile.inc Modified: head/lib/libgcc_eh/Makefile.inc ============================================================================== --- head/lib/libgcc_eh/Makefile.inc Tue Mar 12 16:33:44 2019 (r345067) +++ head/lib/libgcc_eh/Makefile.inc Tue Mar 12 16:41:17 2019 (r345068) @@ -1,8 +1,8 @@ # $FreeBSD$ COMPILERRTDIR= ${SRCTOP}/contrib/compiler-rt -UNWINDINCDIR= ${SRCTOP}/contrib/llvm/projects/libunwind/include -UNWINDSRCDIR= ${SRCTOP}/contrib/llvm/projects/libunwind/src +UNWINDINCDIR= ${SRCTOP}/contrib/libunwind/include +UNWINDSRCDIR= ${SRCTOP}/contrib/libunwind/src STATIC_CFLAGS+=${PICFLAG} -fvisibility=hidden -DVISIBILITY_HIDDEN From owner-svn-src-all@freebsd.org Tue Mar 12 16:46:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86D1515362BA; Tue, 12 Mar 2019 16:46:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E6EE7063E; Tue, 12 Mar 2019 16:46:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 01302257AC; Tue, 12 Mar 2019 16:46:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2CGkYPM049230; Tue, 12 Mar 2019 16:46:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CGkYbn049229; Tue, 12 Mar 2019 16:46:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903121646.x2CGkYbn049229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 12 Mar 2019 16:46: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: r345069 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 345069 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2E6EE7063E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.93)[-0.935,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 16:46:35 -0000 Author: mav Date: Tue Mar 12 16:46:34 2019 New Revision: 345069 URL: https://svnweb.freebsd.org/changeset/base/345069 Log: MFC r339299: Pull in a follow-on commit to resolve a deadlock in ZFS sequential resilver (r334844) MFV/ZoL: Fix deadlock in IO pipeline commit a76f3d0437e5e974f0f748f8735af3539443b388 Author: Brian Behlendorf Date: Fri Mar 16 16:46:06 2018 -0700 Fix deadlock in IO pipeline In vdev_queue_aggregate() the zio_execute() bypass should not be called under the vdev queue lock. This can result in a deadlock as shown in the stack traces below. Drop the vdev queue lock then walk the parents of the aggregate IO to determine the list of component IOs to be bypassed. This can be done safely without holding the io_lock since the new aggregate IO has not yet been returned and its parents cannot change. --- THREAD 1 --- arc_read() zio_nowait() zio_vdev_io_start() vdev_queue_io() <--- mutex_enter(vq->vq_lock) vdev_queue_io_to_issue() vdev_queue_aggregate() zio_execute() vdev_queue_io_to_issue() vdev_queue_aggregate() zio_execute() zio_vdev_io_assess() zio_wait_for_children() <- mutex_enter(zio->io_lock) --- THREAD 2 --- (inverse order) arc_read() zio_change_priority() <- mutex_enter(zio->zio_lock) vdev_queue_change_io_priority() <- mutex_enter(vq->vq_lock) Reviewed-by: Tom Caputi Reviewed-by: Don Brady Signed-off-by: Brian Behlendorf Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Tue Mar 12 16:41:17 2019 (r345068) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Tue Mar 12 16:46:34 2019 (r345069) @@ -666,6 +666,7 @@ static zio_t * vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) { zio_t *first, *last, *aio, *dio, *mandatory, *nio; + zio_link_t *zl = NULL; uint64_t maxgap = 0; uint64_t size; boolean_t stretch; @@ -809,9 +810,18 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) zio_add_child(dio, aio); vdev_queue_io_remove(vq, dio); + } while (dio != last); + + /* + * We need to drop the vdev queue's lock to avoid a deadlock that we + * could encounter since this I/O will complete immediately. + */ + mutex_exit(&vq->vq_lock); + while ((dio = zio_walk_parents(aio, &zl)) != NULL) { zio_vdev_io_bypass(dio); zio_execute(dio); - } while (dio != last); + } + mutex_enter(&vq->vq_lock); return (aio); } From owner-svn-src-all@freebsd.org Tue Mar 12 16:49:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A39F153643B; Tue, 12 Mar 2019 16:49:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 21D7A7088E; Tue, 12 Mar 2019 16:49:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 12763257AE; Tue, 12 Mar 2019 16:49:09 +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 x2CGn8F2049384; Tue, 12 Mar 2019 16:49:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CGn8TK049381; Tue, 12 Mar 2019 16:49:08 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903121649.x2CGn8TK049381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 12 Mar 2019 16:49:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345070 - head/sys/dev/isci X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/isci X-SVN-Commit-Revision: 345070 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 21D7A7088E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.942,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 16:49:09 -0000 Author: kib Date: Tue Mar 12 16:49:08 2019 New Revision: 345070 URL: https://svnweb.freebsd.org/changeset/base/345070 Log: isci(4): Use controller->lock for busdma tags. isci(4) uses deferred loading. Typically on amd64 and i386 non-PAE the tag does not create any restrictions, but on i386 PAE-tables but non-PAE configs callbacks might be used. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/dev/isci/isci.c head/sys/dev/isci/isci.h head/sys/dev/isci/isci_controller.c Modified: head/sys/dev/isci/isci.c ============================================================================== --- head/sys/dev/isci/isci.c Tue Mar 12 16:46:34 2019 (r345069) +++ head/sys/dev/isci/isci.c Tue Mar 12 16:49:08 2019 (r345070) @@ -408,7 +408,8 @@ isci_allocate_dma_buffer_callback(void *arg, bus_dma_s } int -isci_allocate_dma_buffer(device_t device, struct ISCI_MEMORY *memory) +isci_allocate_dma_buffer(device_t device, struct ISCI_CONTROLLER *controller, + struct ISCI_MEMORY *memory) { uint32_t status; @@ -416,7 +417,8 @@ isci_allocate_dma_buffer(device_t device, struct ISCI_ 0x40 /* cacheline alignment */, 0x0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, memory->size, 0x1 /* we want physically contiguous */, - memory->size, 0, NULL, NULL, &memory->dma_tag); + memory->size, 0, busdma_lock_mutex, &controller->lock, + &memory->dma_tag); if(status == ENOMEM) { isci_log_message(0, "ISCI", "bus_dma_tag_create failed\n"); Modified: head/sys/dev/isci/isci.h ============================================================================== --- head/sys/dev/isci/isci.h Tue Mar 12 16:46:34 2019 (r345069) +++ head/sys/dev/isci/isci.h Tue Mar 12 16:49:08 2019 (r345070) @@ -253,7 +253,8 @@ struct isci_softc { int isci_allocate_resources(device_t device); -int isci_allocate_dma_buffer(device_t device, struct ISCI_MEMORY *memory); +int isci_allocate_dma_buffer(device_t device, struct ISCI_CONTROLLER *lock, + struct ISCI_MEMORY *memory); void isci_remote_device_reset(struct ISCI_REMOTE_DEVICE *remote_device, union ccb *ccb); Modified: head/sys/dev/isci/isci_controller.c ============================================================================== --- head/sys/dev/isci/isci_controller.c Tue Mar 12 16:46:34 2019 (r345069) +++ head/sys/dev/isci/isci_controller.c Tue Mar 12 16:49:08 2019 (r345070) @@ -428,7 +428,8 @@ int isci_controller_allocate_memory(struct ISCI_CONTRO uncached_controller_memory->size = sci_mdl_decorator_get_memory_size( controller->mdl, SCI_MDE_ATTRIBUTE_PHYSICALLY_CONTIGUOUS); - error = isci_allocate_dma_buffer(device, uncached_controller_memory); + error = isci_allocate_dma_buffer(device, controller, + uncached_controller_memory); if (error != 0) return (error); @@ -443,7 +444,8 @@ int isci_controller_allocate_memory(struct ISCI_CONTRO SCI_MDE_ATTRIBUTE_CACHEABLE | SCI_MDE_ATTRIBUTE_PHYSICALLY_CONTIGUOUS ); - error = isci_allocate_dma_buffer(device, cached_controller_memory); + error = isci_allocate_dma_buffer(device, controller, + cached_controller_memory); if (error != 0) return (error); @@ -456,7 +458,7 @@ int isci_controller_allocate_memory(struct ISCI_CONTRO request_memory->size = controller->queue_depth * isci_io_request_get_object_size(); - error = isci_allocate_dma_buffer(device, request_memory); + error = isci_allocate_dma_buffer(device, controller, request_memory); if (error != 0) return (error); @@ -478,7 +480,8 @@ int isci_controller_allocate_memory(struct ISCI_CONTRO status = bus_dma_tag_create(bus_get_dma_tag(device), 0x1, 0x0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, isci_io_request_get_max_io_size(), - SCI_MAX_SCATTER_GATHER_ELEMENTS, max_segment_size, 0, NULL, NULL, + SCI_MAX_SCATTER_GATHER_ELEMENTS, max_segment_size, 0, + busdma_lock_mutex, &controller->lock, &controller->buffer_dma_tag); sci_pool_initialize(controller->request_pool); From owner-svn-src-all@freebsd.org Tue Mar 12 16:57:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C3CF1536995 for ; Tue, 12 Mar 2019 16:57:42 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 33F6F7117D for ; Tue, 12 Mar 2019 16:57:42 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72f.google.com with SMTP id n6so1896393qkf.1 for ; Tue, 12 Mar 2019 09:57:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FBEWqA5PDPvuVAUL+O2i6EfVdtDNr4YvbJDAtQPza0A=; b=PXnmv3ASDlI0emPsKIs7NfUHY9MQ5U4Lkxa1mtBDE+caxetsKMOMGsYM/o8z55uUPK q2lVuqNa6/SEKDNbS0yKZSPOCALxH42qaZEQW+g1lbe+xZAt0miVSRWEjhQG9lQ1KxHH 8+/PvJazg9AxAN1jz7nZHtCQ3tV6M48mcT+O/JTPoQBibF1ZM+DL2ejlg6rxpaY7Ca2i r2ZX4YgzGD+he1l43N1vfzcEom/SquNey67fPXb/BSSaK1cXk6g7X9QHaa8arEEcfcrQ +4Ik0wbsE0VuwX89ieGOst+LysYHg3mENZNIW9Rji2UfzaNfaJDEkRjsVNj8HfMFajer s+ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FBEWqA5PDPvuVAUL+O2i6EfVdtDNr4YvbJDAtQPza0A=; b=fogCe+qINJn2Rs8LoBknEdtGHBrVshwBlHR1tqUV2/mAKUhNexR/v2Jk3DRXdo7kvH 7aQ5bTIeGdqnfp67+0Ue7cCoZNGxWrmNsvQaQ/5fNuU+p+S0sYwfLcQIKtVHNISZSU8O fLamk7ODwgfiQ3pqggyPrAy2y+XrHCJvoHu/l810enAuZzFqeKpRZqe7Ct2crnQvGukg eOO+SjpYs9PA3bOWDhJqXWlTHF/CooPR6wYRO4fHsGOQ4rwPei+euejM2Ws2BTlI5j2K igwUYWpCsQoRVS2CUdLcuzWnKNABvsBEfh5EoJWD2c50PkQSS5H17D0IYNHs7SWRufhC b4GQ== X-Gm-Message-State: APjAAAXr9y/ZKoycIX7mnAmz/vUjb39CNX5AAmHiWMnrhjPdqGztSQ7l SW8YDbUcV9mkyIMRqMdhzXeFhDTHpIPSgx0xD8p8Vg== X-Google-Smtp-Source: APXvYqyM1/uXgy0EJpUs6NZbHyxOSWy87ssn98sUEwSDHASukOBx/bAv9tvpXcFtJWQ05eX6DQMqGO2j25zAbHYfzjw= X-Received: by 2002:a37:a34f:: with SMTP id m76mr5698309qke.245.1552409861393; Tue, 12 Mar 2019 09:57:41 -0700 (PDT) MIME-Version: 1.0 References: <201903120515.x2C5Fbtw013485@gndrsh.dnsmgr.net> <201903120525.x2C5PH7X013552@gndrsh.dnsmgr.net> In-Reply-To: From: Warner Losh Date: Tue, 12 Mar 2019 10:57:30 -0600 Message-ID: Subject: Re: svn commit: r345050 - head/bin/date To: John Baldwin Cc: "Rodney W. Grimes" , Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 33F6F7117D X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 16:57:42 -0000 On Tue, Mar 12, 2019, 9:43 AM John Baldwin wrote: > On 3/11/19 10:43 PM, Warner Losh wrote: > > On Mon, Mar 11, 2019 at 11:25 PM Rodney W. Grimes < > freebsd@gndrsh.dnsmgr.net> > > wrote: > > > >>>> Author: imp > >>>> Date: Tue Mar 12 04:49:59 2019 > >>>> New Revision: 345050 > >>>> URL: https://svnweb.freebsd.org/changeset/base/345050 > >>>> > >>>> Log: > >>>> Remove now useless -d and -t flags. > >>>> > >>>> These were used to set dst flag and minutes west of UTC > >>>> respectively. These are obsolete and have been removed form the > >>>> kernel. These existed primarily to faithfully emulate early > >>>> Unix ABIs that have been removed from FreeBSD. > >>>> > >>>> Reviewed by: jbh@, brooks@ > >> Nits: jhb@ and I see he did comment in the review, but he did not > >> accept it as a reviewew at the top. > >> > > > > This is why I think just the reference to the differential revision is > > perfectly fine. Why duplicate data? Others complained I hadn't included > it. > > He commented, we discussed it on irc (though most of it was about how to > > use arc better), etc. I thought it warranted it. So please don't nitpick. > > This level is really annoying and frustrating. Does this really help us > > produce a better product? > > To be fair, we have been pretty consistent that 'Reviewed by' in the commit > means 'Accepted' in phab. I probably would have ended up accepting this > anyway and just didn't click the box, so it's ok. However, we have had > folks in the past who were tagged in the past and gave feedback, but didn't > approve of the change, but were listed as 'Reviewed by' hence the current > practice. > But we talked about it outside phab, which to my mind puts it under the old rules. And it's not Rod's job to police this detail. It would be up to you to hassle me if I misinterpreted that extra communication wrong. Warner > From owner-svn-src-all@freebsd.org Tue Mar 12 17:03:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87A661536DE2; Tue, 12 Mar 2019 17:03:59 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 29BE3717A9; Tue, 12 Mar 2019 17:03:59 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DDF725B14; Tue, 12 Mar 2019 17:03:59 +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 x2CH3wqQ059652; Tue, 12 Mar 2019 17:03:58 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CH3wix059651; Tue, 12 Mar 2019 17:03:58 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903121703.x2CH3wix059651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 12 Mar 2019 17:03:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345071 - stable/12/usr.sbin/freebsd-update X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/usr.sbin/freebsd-update X-SVN-Commit-Revision: 345071 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 29BE3717A9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 17:03:59 -0000 Author: emaste Date: Tue Mar 12 17:03:58 2019 New Revision: 345071 URL: https://svnweb.freebsd.org/changeset/base/345071 Log: MFC r344818: freebsd-update.8: update example to contemporary versions PR: 235761 Reported by: linimon Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.8 ============================================================================== --- stable/12/usr.sbin/freebsd-update/freebsd-update.8 Tue Mar 12 16:49:08 2019 (r345070) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.8 Tue Mar 12 17:03:58 2019 (r345071) @@ -59,13 +59,13 @@ by the .Fx Release Engineering Team, e.g., .Fx -10.3-RELEASE and +11.2-RELEASE and .Fx -11.0-RELEASE, but not +12.0-RELEASE, but not .Fx -10.3-STABLE or +11.2-STABLE or .Fx -12-CURRENT. +13.0-CURRENT. .Sh OPTIONS The following options are supported: .Bl -tag -width "-r newrelease" From owner-svn-src-all@freebsd.org Tue Mar 12 17:04:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AF841536EBA; Tue, 12 Mar 2019 17:04:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E79A571994; Tue, 12 Mar 2019 17:04:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B6BC725B16; Tue, 12 Mar 2019 17:04:48 +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 x2CH4mAn059752; Tue, 12 Mar 2019 17:04:48 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CH4mAu059751; Tue, 12 Mar 2019 17:04:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903121704.x2CH4mAu059751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 12 Mar 2019 17:04: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: r345072 - stable/11/usr.sbin/freebsd-update X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/usr.sbin/freebsd-update X-SVN-Commit-Revision: 345072 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E79A571994 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 17:04:49 -0000 Author: emaste Date: Tue Mar 12 17:04:48 2019 New Revision: 345072 URL: https://svnweb.freebsd.org/changeset/base/345072 Log: MFC r344818: freebsd-update.8: update example to contemporary versions PR: 235761 Reported by: linimon Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.8 ============================================================================== --- stable/11/usr.sbin/freebsd-update/freebsd-update.8 Tue Mar 12 17:03:58 2019 (r345071) +++ stable/11/usr.sbin/freebsd-update/freebsd-update.8 Tue Mar 12 17:04:48 2019 (r345072) @@ -59,13 +59,13 @@ by the .Fx Release Engineering Team, e.g., .Fx -10.3-RELEASE and +11.2-RELEASE and .Fx -11.0-RELEASE, but not +12.0-RELEASE, but not .Fx -10.3-STABLE or +11.2-STABLE or .Fx -12-CURRENT. +13.0-CURRENT. .Sh OPTIONS The following options are supported: .Bl -tag -width "-r newrelease" From owner-svn-src-all@freebsd.org Tue Mar 12 17:21:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C13BF15378D9; Tue, 12 Mar 2019 17:21:12 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 149FB726B7; Tue, 12 Mar 2019 17:21:11 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2CHL92P016000; Tue, 12 Mar 2019 10:21:09 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2CHL9O2015999; Tue, 12 Mar 2019 10:21:09 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903121721.x2CHL9O2015999@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345056 - head/sys/dev/mrsas In-Reply-To: <201903120924.x2C9Ow52017475@repo.freebsd.org> To: Kashyap D Desai Date: Tue, 12 Mar 2019 10:21:09 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 149FB726B7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 17:21:12 -0000 > Author: kadesai > Date: Tue Mar 12 09:24:58 2019 > New Revision: 345056 > URL: https://svnweb.freebsd.org/changeset/base/345056 > > Log: > fw_outstanding"(outstanding IOs at firmware level) counter gets screwed up when R1 fastpath > writes are running. Some of the cases which are not handled properly in driver are: > > 1. With R1 fastpath supported, single write from CAM layer can consume 2 MPT frames > at driver/firmware level for fastpath qualification(if fw_outstanding < controller Queue Depth). > Due to this driver has to throttle IOs coming from CAM layer as well as second fastpath > write(of R1 write) against Adapter Queue Depth. > If "fw_outstanding" reaches to adapter queue depth, driver should return IOs from CAM layer with > device busy status.While allocating second MPT frame(corresponding to R1 FP write) also, driver > should ensure fw_outstanding should not exceed adapter QD. > > 2. For R1 fastpath writes completion, driver decrements "fw_oustanding" counter without > really returning MPT frame to free pool. It may cause IOs(with heavy IOs running, consuming whole > adapter Queue Depth) consuming MPT frames reserved for DCMDs(management commands) and > DCMDs(internal and sent by application) not getting MPT frame will start failing. > > Below is one test case to hit the issue described above- > 1. Run heavy IOs (outstanding IOs should hit adapter Queue Depth). > 2. Run management tool (Broadcom's storcli tool) querying adapter in loop (run command- "storcli64 /c0 show" in loop). > 3. Management tool's requests would start failing due to non-availability of free MPT frames as all frames would be consumed by IOs. > > Fix: Increment/decrement of "fw_outstanding" counter should be in sync with MPT frame get/return. > > Submitted by: Sumit Saxena > Reviewed by: Kashyap Desai > Approved by: Ken > MFC after: 3 days > Sponsored by: Broadcom Inc > Can we please keep commit messages formatted to <80 columns? Thanks, Rod -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Mar 12 18:19:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91008153A270; Tue, 12 Mar 2019 18:19:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 385BA7793D; Tue, 12 Mar 2019 18:19:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B2032674D; Tue, 12 Mar 2019 18:19:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2CIJjnc002590; Tue, 12 Mar 2019 18:19:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CIJjpZ002589; Tue, 12 Mar 2019 18:19:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903121819.x2CIJjpZ002589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 12 Mar 2019 18:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345073 - head/contrib/llvm/lib/Target/X86 X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/llvm/lib/Target/X86 X-SVN-Commit-Revision: 345073 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 385BA7793D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 18:19:45 -0000 Author: dim Date: Tue Mar 12 18:19:44 2019 New Revision: 345073 URL: https://svnweb.freebsd.org/changeset/base/345073 Log: Revert r308867 (which was originally committed in the clang390-import project branch): Work around LLVM PR30879, which is about a bad interaction between X86 Call Frame Optimization on i386 and libunwind, by disallowing the optimization for i386-freebsd12. This should fix some instances of broken exception handling when frame pointers are omitted, in particular some unittests run during the build of editors/libreoffice. This hack will be removed as soon as upstream has implemented a more permanent fix for this problem. And indeed, after r345018 and r345019, which updated LLVM libunwind to the most recent version, the above workaround is no longer needed. The upstream commit which fixed this is: https://llvm.org/viewvc/llvm-project?view=revision&revision=292723 Specifically, 32 bit (i386-freebsd) executables optimized with omitted frame pointers and Call Frame Optimization should now behave correctly when a C++ exception is thrown, and the stack is unwound. Upstream PR: https://llvm.org/bugs/show_bug.cgi?id=30879 PR: 236062 MFC after: 1 month X-MFC-With: r344779 Modified: head/contrib/llvm/lib/Target/X86/X86CallFrameOptimization.cpp Directory Properties: head/ (props changed) head/contrib/llvm/ (props changed) Modified: head/contrib/llvm/lib/Target/X86/X86CallFrameOptimization.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86CallFrameOptimization.cpp Tue Mar 12 17:04:48 2019 (r345072) +++ head/contrib/llvm/lib/Target/X86/X86CallFrameOptimization.cpp Tue Mar 12 18:19:44 2019 (r345073) @@ -139,11 +139,6 @@ bool X86CallFrameOptimization::isLegal(MachineFunction if (NoX86CFOpt.getValue()) return false; - // Work around LLVM PR30879 (bad interaction between CFO and libunwind) - if (STI->isTargetFreeBSD() && STI->is32Bit() && - STI->getTargetTriple().getOSMajorVersion() >= 12) - return false; - // We can't encode multiple DW_CFA_GNU_args_size or DW_CFA_def_cfa_offset // in the compact unwind encoding that Darwin uses. So, bail if there // is a danger of that being generated. From owner-svn-src-all@freebsd.org Tue Mar 12 18:57:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65344153B22F; Tue, 12 Mar 2019 18:57:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 02EFF80E0C; Tue, 12 Mar 2019 18:57:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC45626E45; Tue, 12 Mar 2019 18:57:11 +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 x2CIvB3j023337; Tue, 12 Mar 2019 18:57:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CIvBJL023336; Tue, 12 Mar 2019 18:57:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903121857.x2CIvBJL023336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 12 Mar 2019 18:57:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345074 - head/sys/dev/hwpmc X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/hwpmc X-SVN-Commit-Revision: 345074 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 02EFF80E0C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 18:57:12 -0000 Author: kib Date: Tue Mar 12 18:57:11 2019 New Revision: 345074 URL: https://svnweb.freebsd.org/changeset/base/345074 Log: Remove useless version check. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/dev/hwpmc/hwpmc_core.c Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Tue Mar 12 18:19:44 2019 (r345073) +++ head/sys/dev/hwpmc/hwpmc_core.c Tue Mar 12 18:57:11 2019 (r345074) @@ -40,11 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include -#if (__FreeBSD_version >= 1100000) #include -#else -#include -#endif #include #include #include From owner-svn-src-all@freebsd.org Tue Mar 12 18:59:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28D24153B2C1; Tue, 12 Mar 2019 18:59:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C3EBB80FA0; Tue, 12 Mar 2019 18:59:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B192326E46; Tue, 12 Mar 2019 18:59:02 +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 x2CIx2dg023466; Tue, 12 Mar 2019 18:59:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CIx2Y5023464; Tue, 12 Mar 2019 18:59:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903121859.x2CIx2Y5023464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 12 Mar 2019 18:59:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345075 - in head/sys/x86: include x86 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys/x86: include x86 X-SVN-Commit-Revision: 345075 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C3EBB80FA0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 18:59:03 -0000 Author: kib Date: Tue Mar 12 18:59:01 2019 New Revision: 345075 URL: https://svnweb.freebsd.org/changeset/base/345075 Log: Add register number, CPUID bits, and print identification for TSX force abort errata. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/x86/include/specialreg.h head/sys/x86/x86/identcpu.c Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Tue Mar 12 18:57:11 2019 (r345074) +++ head/sys/x86/include/specialreg.h Tue Mar 12 18:59:01 2019 (r345075) @@ -448,6 +448,7 @@ /* * CPUID instruction 7 Structured Extended Features, leaf 0 edx info */ +#define CPUID_STDEXT3_TSXFA 0x00002000 #define CPUID_STDEXT3_IBPB 0x04000000 #define CPUID_STDEXT3_STIBP 0x08000000 #define CPUID_STDEXT3_L1D_FLUSH 0x10000000 @@ -506,6 +507,7 @@ #define MSR_MTRRcap 0x0fe #define MSR_IA32_ARCH_CAP 0x10a #define MSR_IA32_FLUSH_CMD 0x10b +#define MSR_TSX_FORCE_ABORT 0x10f #define MSR_BBL_CR_ADDR 0x116 #define MSR_BBL_CR_DECC 0x118 #define MSR_BBL_CR_CTL 0x119 Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Tue Mar 12 18:57:11 2019 (r345074) +++ head/sys/x86/x86/identcpu.c Tue Mar 12 18:59:01 2019 (r345075) @@ -995,6 +995,7 @@ printcpuinfo(void) printf("\n Structured Extended Features3=0x%b", cpu_stdext_feature3, "\020" + "\016TSXFA" "\033IBPB" "\034STIBP" "\035L1DFL" From owner-svn-src-all@freebsd.org Tue Mar 12 19:03:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8874F153B516; Tue, 12 Mar 2019 19:03:48 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2BFA781404; Tue, 12 Mar 2019 19:03:48 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B3E526FE9; Tue, 12 Mar 2019 19:03:48 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2CJ3lgr028287; Tue, 12 Mar 2019 19:03:47 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CJ3lj1028286; Tue, 12 Mar 2019 19:03:47 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201903121903.x2CJ3lj1028286@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Tue, 12 Mar 2019 19:03:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345076 - stable/12/tests/sys/netpfil/pf X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/12/tests/sys/netpfil/pf X-SVN-Commit-Revision: 345076 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2BFA781404 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 19:03:48 -0000 Author: kp Date: Tue Mar 12 19:03:47 2019 New Revision: 345076 URL: https://svnweb.freebsd.org/changeset/base/345076 Log: pf tests: Disable noalias test Direct commit to stable/12 to disable the noalias test. The noalias feature has not been merged to stable/12 as it is a (small) behaviour change. This means this test will fail. Disable it. Modified: stable/12/tests/sys/netpfil/pf/pass_block.sh Modified: stable/12/tests/sys/netpfil/pf/pass_block.sh ============================================================================== --- stable/12/tests/sys/netpfil/pf/pass_block.sh Tue Mar 12 18:59:01 2019 (r345075) +++ stable/12/tests/sys/netpfil/pf/pass_block.sh Tue Mar 12 19:03:47 2019 (r345076) @@ -168,6 +168,6 @@ atf_init_test_cases() { atf_add_test_case "v4" atf_add_test_case "v6" - atf_add_test_case "noalias" + #atf_add_test_case "noalias" atf_add_test_case "nested_inline" } From owner-svn-src-all@freebsd.org Tue Mar 12 19:08:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B77E153B62E; Tue, 12 Mar 2019 19:08:42 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C0EF815D8; Tue, 12 Mar 2019 19:08:42 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D90926FF5; Tue, 12 Mar 2019 19:08:42 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2CJ8f2H028562; Tue, 12 Mar 2019 19:08:41 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CJ8fCI028561; Tue, 12 Mar 2019 19:08:41 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201903121908.x2CJ8fCI028561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Tue, 12 Mar 2019 19:08:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345077 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 345077 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2C0EF815D8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 19:08:42 -0000 Author: mckusick Date: Tue Mar 12 19:08:41 2019 New Revision: 345077 URL: https://svnweb.freebsd.org/changeset/base/345077 Log: This is an additional fix for bug report 230962. When using extended attributes, the kernel can panic with either "ffs_truncate3" or with "softdep_deallocate_dependencies: dangling deps". The problem arises because the flushbuflist() function which is called to clear out buffers is passed either the V_NORMAL flag to indicate that it should flush buffer associated with the contents of the file or the V_ALT flag to indicate that it should flush the buffers associated with the extended attribute data. The buffers containing the extended attribute data are identified by having their BX_ALTDATA flag set in the buffer's b_xflags field. The BX_ALTDATA flag is set on the buffer when the extended attribute block is first allocated or when its contents are read in from the disk. On a busy system, a buffer may be reused for another purpose, but the contents of the block that it contained continues to be held in the main page cache. Each physical page is identified as holding the contents of a logical block within a specified file (identified by a vnode). When a request is made to read a file, the kernel first looks for the block in the existing buffers. If it is not found there, it checks the page cache to see if it is still there. If it is found in the page cache, then it is remapped into a new buffer thus avoiding the need to read it in from the disk. The bug is that when a buffer request made for an extended attribute is fulfilled by reconstituting a buffer from the page cache rather than reading it in from disk, the BX_ALTDATA flag was not being set. Thus the flushbuflist() function would never clear it out and the "ffs_truncate3" panic would occur because the vnode being cleared still had buffers on its clean-buffer list. If the extended attribute was being updated, it is first read, then updated, and finally written. If the read is fulfilled by reconstituting the buffer from the page cache the BX_ALTDATA flag was not set and thus the dirty buffer would never be flushed by flushbuflist(). Eventually the buffer would be recycled. Since it was never written it would have an unfinished dependency which would trigger the "softdep_deallocate_dependencies: dangling deps" panic. The fix is to ensure that the BX_ALTDATA flag is set when a buffer has been reconstituted from the page cache. PR: 230962 Reported by: 2t8mr7kx9f@protonmail.com Reviewed by: kib Tested by: Peter Holm MFC after: 1 week Sponsored by: Netflix Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Tue Mar 12 19:03:47 2019 (r345076) +++ head/sys/kern/vfs_bio.c Tue Mar 12 19:08:41 2019 (r345077) @@ -4842,6 +4842,8 @@ b_io_dismiss(struct buf *bp, int ioflag, bool release) if ((ioflag & IO_DIRECT) != 0) bp->b_flags |= B_DIRECT; + if ((ioflag & IO_EXT) != 0) + bp->b_xflags |= BX_ALTDATA; if ((ioflag & (IO_VMIO | IO_DIRECT)) != 0 && LIST_EMPTY(&bp->b_dep)) { bp->b_flags |= B_RELBUF; if ((ioflag & IO_NOREUSE) != 0) From owner-svn-src-all@freebsd.org Tue Mar 12 19:33:26 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13372153C112; Tue, 12 Mar 2019 19:33:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB3CA825B6; Tue, 12 Mar 2019 19:33:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 972E927501; Tue, 12 Mar 2019 19:33:25 +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 x2CJXPch044127; Tue, 12 Mar 2019 19:33:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CJXPTN044126; Tue, 12 Mar 2019 19:33:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903121933.x2CJXPTN044126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 12 Mar 2019 19:33:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345078 - head/sys/dev/hwpmc X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/hwpmc X-SVN-Commit-Revision: 345078 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AB3CA825B6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 19:33:26 -0000 Author: kib Date: Tue Mar 12 19:33:25 2019 New Revision: 345078 URL: https://svnweb.freebsd.org/changeset/base/345078 Log: hwpmc/core: Adopt to upcoming Skylake TSX errata. The forthcoming microcode update will fix a TSX bug by clobbering PMC3 when TSX instructions are executed (even speculatively). There is an alternate mode where CPU executes all TSX instructions by aborting them, in which case PMC3 is still available to OS. Any code that correctly uses TSX must be ready to handle abort anyway. Since it is believed that FreeBSD population of hwpmc(4) users is significantly larger than the population of TSX users, switch the microcode into TSX abort mode whenever a pmc is allocated, and back to bug avoidance mode when the last pmc is deallocated. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/dev/hwpmc/hwpmc_core.c Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Tue Mar 12 19:08:41 2019 (r345077) +++ head/sys/dev/hwpmc/hwpmc_core.c Tue Mar 12 19:33:25 2019 (r345078) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -103,6 +104,9 @@ static int core_iap_width; static int core_iap_npmc; static int core_iap_wroffset; +static u_int pmc_alloc_refs; +static bool pmc_tsx_force_abort_set; + static int core_pcpu_noop(struct pmc_mdep *md, int cpu) { @@ -216,6 +220,15 @@ iaf_reload_count_to_perfctr_value(pmc_value_t rlc) return (1ULL << core_iaf_width) - rlc; } +static void +tweak_tsx_force_abort(void *arg) +{ + u_int val; + + val = (uintptr_t)arg; + wrmsr(MSR_TSX_FORCE_ABORT, val); +} + static int iaf_allocate_pmc(int cpu, int ri, struct pmc *pm, const struct pmc_op_pmcallocate *a) @@ -253,6 +266,12 @@ iaf_allocate_pmc(int cpu, int ri, struct pmc *pm, if (ev == 0x0 && umask == 0x3 && ri != 2) return (EINVAL); + pmc_alloc_refs++; + if ((cpu_stdext_feature3 & CPUID_STDEXT3_TSXFA) != 0 && + !pmc_tsx_force_abort_set) { + pmc_tsx_force_abort_set = true; + smp_rendezvous(NULL, tweak_tsx_force_abort, NULL, (void *)1); + } flags = 0; if (config & IAP_OS) @@ -388,6 +407,12 @@ iaf_release_pmc(int cpu, int ri, struct pmc *pmc) KASSERT(core_pcpu[cpu]->pc_corepmcs[ri + core_iaf_ri].phw_pmc == NULL, ("[core,%d] PHW pmc non-NULL", __LINE__)); + + MPASS(pmc_alloc_refs > 0); + if (pmc_alloc_refs-- == 1 && pmc_tsx_force_abort_set) { + pmc_tsx_force_abort_set = false; + smp_rendezvous(NULL, tweak_tsx_force_abort, NULL, (void *)0); + } return (0); } From owner-svn-src-all@freebsd.org Tue Mar 12 19:34:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DC76153C1E2; Tue, 12 Mar 2019 19:34:34 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2405C82786; Tue, 12 Mar 2019 19:34:34 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1594327504; Tue, 12 Mar 2019 19:34:34 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2CJYX44044237; Tue, 12 Mar 2019 19:34:33 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CJYXXr044235; Tue, 12 Mar 2019 19:34:33 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201903121934.x2CJYXXr044235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 12 Mar 2019 19:34:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345079 - in head: libexec/rc/rc.d tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head: libexec/rc/rc.d tools/build/mk X-SVN-Commit-Revision: 345079 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2405C82786 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 19:34:34 -0000 Author: cy Date: Tue Mar 12 19:34:33 2019 New Revision: 345079 URL: https://svnweb.freebsd.org/changeset/base/345079 Log: Fix still installing ipfilter rc.d files even when WITHOUT_IPFILTER is specified. When WITHOUT_IPFILTER is specified, delete-old-files fails to delete the optional rc.d files from above. Fix this. WITHOUT_IPFILTER fails to delete the ipfilter.5 optional file during delete-old-files. Fix this. Reported by: Dmitry Luhtionov MFC after: 1 week Modified: head/libexec/rc/rc.d/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/libexec/rc/rc.d/Makefile ============================================================================== --- head/libexec/rc/rc.d/Makefile Tue Mar 12 19:33:25 2019 (r345078) +++ head/libexec/rc/rc.d/Makefile Tue Mar 12 19:34:33 2019 (r345079) @@ -46,10 +46,6 @@ CONFS= DAEMON \ hostname \ iovctl \ ip6addrctl \ - ipfilter \ - ipfs \ - ipmon \ - ipnat \ ipsec \ ${_kadmind} \ ${_kdc} \ @@ -213,6 +209,13 @@ HASTPACKAGE= hast .if ${MK_INETD} != "no" CONFS+= inetd +.endif + +.if ${MK_IPFILTER} != "no" +CONFS+= ipfilter \ + ipfs \ + ipmon \ + ipnat .endif .if ${MK_IPFW} != "no" Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 12 19:33:25 2019 (r345078) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 12 19:34:33 2019 (r345079) @@ -3127,6 +3127,10 @@ OLD_FILES+=usr/share/man/man8/inetd.8.gz .if ${MK_IPFILTER} == no OLD_FILES+=etc/periodic/security/510.ipfdenied OLD_FILES+=etc/periodic/security/610.ipf6denied +OLD_FILES+=etc/rc.d/ipfilter +OLD_FILES+=etc/rc.d/ipfs +OLD_FILES+=etc/rc.d/ipmon +OLD_FILES+=etc/rc.d/ipnat OLD_FILES+=rescue/ipf OLD_FILES+=sbin/ipf OLD_FILES+=sbin/ipfs @@ -3196,6 +3200,7 @@ OLD_FILES+=usr/share/man/man4/ipnat.4.gz OLD_FILES+=usr/share/man/man5/ipf.5.gz OLD_FILES+=usr/share/man/man5/ipf.conf.5.gz OLD_FILES+=usr/share/man/man5/ipf6.conf.5.gz +OLD_FILES+=usr/share/man/man5/ipfilter.5.gz OLD_FILES+=usr/share/man/man5/ipnat.5.gz OLD_FILES+=usr/share/man/man5/ipnat.conf.5.gz OLD_FILES+=usr/share/man/man5/ippool.5.gz From owner-svn-src-all@freebsd.org Tue Mar 12 20:08:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8642153D004; Tue, 12 Mar 2019 20:08:38 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B51E838F2; Tue, 12 Mar 2019 20:08:38 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 32F4E27A5A; Tue, 12 Mar 2019 20:08:38 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2CK8cKA060301; Tue, 12 Mar 2019 20:08:38 GMT (envelope-from bcr@FreeBSD.org) Received: (from bcr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CK8b5p060298; Tue, 12 Mar 2019 20:08:37 GMT (envelope-from bcr@FreeBSD.org) Message-Id: <201903122008.x2CK8b5p060298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bcr set sender to bcr@FreeBSD.org using -f From: Benedict Reuschling Date: Tue, 12 Mar 2019 20:08:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345080 - in head: libexec/rc share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: bcr X-SVN-Commit-Paths: in head: libexec/rc share/man/man5 X-SVN-Commit-Revision: 345080 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5B51E838F2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 20:08:39 -0000 Author: bcr (doc committer) Date: Tue Mar 12 20:08:37 2019 New Revision: 345080 URL: https://svnweb.freebsd.org/changeset/base/345080 Log: Extend descriptions and comments about the need to create /etc/pf.conf. FreeBSD removed the default /etc/pf.conf file in previous releases, but the documentation kept mentioning it like any other file present in the system. Change pf.conf(5) to mention in the description of the default ruleset location that this file needs to be created manually. Also, the default rc.conf file had it's comment extended a bit to let people know that this file does not exist by default. PR: 231977 Submitted by: koobs@ Reviewed by: kp@, 0mp@ Approved by: kp@ MFC after: 10 days Differential Revision: https://reviews.freebsd.org/D19530 Modified: head/libexec/rc/rc.conf head/share/man/man5/pf.conf.5 Modified: head/libexec/rc/rc.conf ============================================================================== --- head/libexec/rc/rc.conf Tue Mar 12 19:34:33 2019 (r345079) +++ head/libexec/rc/rc.conf Tue Mar 12 20:08:37 2019 (r345080) @@ -208,7 +208,8 @@ ipfs_enable="NO" # Set to YES to enable saving and re ipfs_program="/sbin/ipfs" # where the ipfs program lives ipfs_flags="" # additional flags for ipfs pf_enable="NO" # Set to YES to enable packet filter (pf) -pf_rules="/etc/pf.conf" # rules definition file for pf +pf_rules="/etc/pf.conf" # rules definition file for pf (nonexistent + # by default) pf_program="/sbin/pfctl" # where the pfctl program lives pf_flags="" # additional flags for pfctl pflog_enable="NO" # Set to YES to enable packet filter logging Modified: head/share/man/man5/pf.conf.5 ============================================================================== --- head/share/man/man5/pf.conf.5 Tue Mar 12 19:34:33 2019 (r345079) +++ head/share/man/man5/pf.conf.5 Tue Mar 12 20:08:37 2019 (r345080) @@ -28,7 +28,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 5, 2019 +.Dd March 10, 2019 .Dt PF.CONF 5 .Os .Sh NAME @@ -3053,6 +3053,8 @@ include = "include" filename Host name database. .It Pa /etc/pf.conf Default location of the ruleset file. +The file has to be created manually as it is not installed with a +standard installation. .It Pa /etc/pf.os Default location of OS fingerprints. .It Pa /etc/protocols From owner-svn-src-all@freebsd.org Tue Mar 12 21:03:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABE5E153E858; Tue, 12 Mar 2019 21:03:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 257D485C17; Tue, 12 Mar 2019 21:03:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14D9B55B; Tue, 12 Mar 2019 21:03:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2CL3uqx092134; Tue, 12 Mar 2019 21:03:56 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CL3uhe092133; Tue, 12 Mar 2019 21:03:56 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201903122103.x2CL3uhe092133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 12 Mar 2019 21:03:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345081 - head/bin/date X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/bin/date X-SVN-Commit-Revision: 345081 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 257D485C17 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 21:03:57 -0000 Author: imp Date: Tue Mar 12 21:03:56 2019 New Revision: 345081 URL: https://svnweb.freebsd.org/changeset/base/345081 Log: Remove the -d and -t flags from the man page Remove -d and -t flags that were removed in r345050. Noticed by: rgrimes@ Modified: head/bin/date/date.1 Modified: head/bin/date/date.1 ============================================================================== --- head/bin/date/date.1 Tue Mar 12 20:08:37 2019 (r345080) +++ head/bin/date/date.1 Tue Mar 12 21:03:56 2019 (r345081) @@ -32,7 +32,7 @@ .\" @(#)date.1 8.3 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd August 4, 2018 +.Dd March 12, 2019 .Dt DATE 1 .Os .Sh NAME @@ -62,9 +62,6 @@ .Fl f Ar input_fmt new_date .Op Cm + Ns Ar output_fmt .Nm -.Op Fl d Ar dst -.Op Fl t Ar minutes_west -.Nm .Op Fl jnu .Op Fl I Ns Op Ar FMT .Op Fl f Ar input_fmt @@ -93,15 +90,6 @@ the time may not be changed by more than 1 second. .Pp The options are as follows: .Bl -tag -width Ds -.It Fl d Ar dst -Set the kernel's value for daylight saving time. -If -.Ar dst -is non-zero, future calls -to -.Xr gettimeofday 2 -will return a non-zero for -.Fa tz_dsttime . .It Fl f Use .Ar input_fmt @@ -188,14 +176,6 @@ and can be specified in decimal, octal, or hex. .It Fl r Ar filename Print the date and time of the last modification of .Ar filename . -.It Fl t Ar minutes_west -Set the system's value for minutes west of -.Tn GMT . -.Ar minutes_west -specifies the number of minutes returned in -.Fa tz_minuteswest -by future calls to -.Xr gettimeofday 2 . .It Fl u Display or set the date in .Tn UTC From owner-svn-src-all@freebsd.org Tue Mar 12 21:33:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA44E153F4E1; Tue, 12 Mar 2019 21:33:17 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 4C0058717C; Tue, 12 Mar 2019 21:33:17 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2CLXFJ9016859; Tue, 12 Mar 2019 14:33:15 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2CLXFbk016858; Tue, 12 Mar 2019 14:33:15 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903122133.x2CLXFbk016858@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345081 - head/bin/date In-Reply-To: <201903122103.x2CL3uhe092133@repo.freebsd.org> To: Warner Losh Date: Tue, 12 Mar 2019 14:33:15 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4C0058717C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 21:33:18 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: imp > Date: Tue Mar 12 21:03:56 2019 > New Revision: 345081 > URL: https://svnweb.freebsd.org/changeset/base/345081 > > Log: > Remove the -d and -t flags from the man page > > Remove -d and -t flags that were removed in r345050. > > Noticed by: rgrimes@ > > Modified: > head/bin/date/date.1 Thank you. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Mar 12 21:58:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97535153FE8E; Tue, 12 Mar 2019 21:58:45 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B7FF6881B4; Tue, 12 Mar 2019 21:58:44 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf1-f44.google.com with SMTP id f16so3220525lfk.12; Tue, 12 Mar 2019 14:58:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eVjWvSMn77a8HlnFiBQIX8OI9g+FjFQRlIW9j/kC+6U=; b=ETmoFUckvGMg/UgXupo9YElwTL7J/tJSceOlRVbWmVNk7rbknqas7yGG+upDGXn/+K WMopGTxzCfMxW4DWsP2flOmzRCw8ZRVA1e4eeXamDUPHVrB+jY7j4EZ6uEK30s4O1m8o w+i1e5gfObQqulBUd4q+QI0FYcNQrt6ZHK9AmrUgdoxCfRqBVDBlT+XcXeWryrFDa4h4 erBn7kWsPj4Aw2ILLxhCvr/74Nc90P2QiUxi+yZyEYPwnksdUv8N9bl1X5uo913n3/UE oAF1j0bWh7LrrraFufT3XkJBXtIXvo5XFRzY+rDsmO+BJ5ykxN/0OYuUnwRXhY94yEVN dLjw== X-Gm-Message-State: APjAAAWPmYRigO1jwShoW+yqnr/GOgR3OKJBnB5BRRCNzVnlMpEMfakw YdIvAl2lcYe3ZSg9nsdu9wrdIJ2jdIoLrd/l3WLmLg== X-Google-Smtp-Source: APXvYqwxU5Snkin3/Y/0wQiaReWQ6CgArc1EcBkaA9W4WEkY2dJ5eivI4+pxolcaUvf2fYHLg/SLdh/0ANRgK4N1bwI= X-Received: by 2002:a19:ce8f:: with SMTP id e137mr23372839lfg.54.1552427922668; Tue, 12 Mar 2019 14:58:42 -0700 (PDT) MIME-Version: 1.0 References: <201705230929.v4N9T5g1028124@repo.freebsd.org> In-Reply-To: <201705230929.v4N9T5g1028124@repo.freebsd.org> From: Alan Somers Date: Tue, 12 Mar 2019 15:58:31 -0600 Message-ID: Subject: Re: svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi... To: Konstantin Belousov Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: B7FF6881B4 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.44 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-4.27 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_TLS_LAST(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.93)[-0.928,0]; RCVD_IN_DNSWL_NONE(0.00)[44.167.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-1.34)[ip: (-0.66), ipnet: 209.85.128.0/17(-3.88), asn: 15169(-2.08), country: US(-0.07)]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 21:58:45 -0000 On Tue, May 23, 2017 at 3:29 AM Konstantin Belousov wrote: > > Author: kib > Date: Tue May 23 09:29:05 2017 > New Revision: 318736 > URL: https://svnweb.freebsd.org/changeset/base/318736 > > Log: > Commit the 64-bit inode project. > > Extend the ino_t, dev_t, nlink_t types to 64-bit ints. Modify > struct dirent layout to add d_off, increase the size of d_fileno > to 64-bits, increase the size of d_namlen to 16-bits, and change > the required alignment. Increase struct statfs f_mntfromname[] and > f_mntonname[] array length MNAMELEN to 1024. > > ABI breakage is mitigated by providing compatibility using versioned > symbols, ingenious use of the existing padding in structures, and > by employing other tricks. Unfortunately, not everything can be > fixed, especially outside the base system. For instance, third-party > APIs which pass struct stat around are broken in backward and > forward incompatible ways. > > Kinfo sysctl MIBs ABI is changed in backward-compatible way, but > there is no general mechanism to handle other sysctl MIBS which > return structures where the layout has changed. It was considered > that the breakage is either in the management interfaces, where we > usually allow ABI slip, or is not important. > > Struct xvnode changed layout, no compat shims are provided. > > For struct xtty, dev_t tty device member was reduced to uint32_t. > It was decided that keeping ABI compat in this case is more useful > than reporting 64-bit dev_t, for the sake of pstat. > > Update note: strictly follow the instructions in UPDATING. Build > and install the new kernel with COMPAT_FREEBSD11 option enabled, > then reboot, and only then install new world. > > Credits: The 64-bit inode project, also known as ino64, started life > many years ago as a project by Gleb Kurtsou (gleb). Kirk McKusick > (mckusick) then picked up and updated the patch, and acted as a > flag-waver. Feedback, suggestions, and discussions were carried > by Ed Maste (emaste), John Baldwin (jhb), Jilles Tjoelker (jilles), > and Rick Macklem (rmacklem). Kris Moore (kris) performed an initial > ports investigation followed by an exp-run by Antoine Brodin (antoine). > Essential and all-embracing testing was done by Peter Holm (pho). > The heavy lifting of coordinating all these efforts and bringing the > project to completion were done by Konstantin Belousov (kib). > > Sponsored by: The FreeBSD Foundation (emaste, kib) > Differential revision: https://reviews.freebsd.org/D10439 What's the purpose of the new dirent.d_off field? I can't find any code that uses it. I'm wondering if the fuse(4) module should set it in order to work properly over NFS, or something. -Alan From owner-svn-src-all@freebsd.org Tue Mar 12 22:20:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA12515406B6; Tue, 12 Mar 2019 22:20:42 +0000 (UTC) (envelope-from kib@freebsd.org) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D39188D4C; Tue, 12 Mar 2019 22:20:42 +0000 (UTC) (envelope-from kib@freebsd.org) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x2CMKZhZ015983 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 13 Mar 2019 00:20:38 +0200 (EET) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x2CMKZhZ015983 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x2CMKZ1x015982; Wed, 13 Mar 2019 00:20:35 +0200 (EET) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Wed, 13 Mar 2019 00:20:35 +0200 From: Konstantin Belousov To: Alan Somers Cc: src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi... Message-ID: <20190312222035.GX2492@kib.kiev.ua> References: <201705230929.v4N9T5g1028124@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 22:20:43 -0000 On Tue, Mar 12, 2019 at 03:58:31PM -0600, Alan Somers wrote: > On Tue, May 23, 2017 at 3:29 AM Konstantin Belousov wrote: > > > > Author: kib > > Date: Tue May 23 09:29:05 2017 > > New Revision: 318736 > > URL: https://svnweb.freebsd.org/changeset/base/318736 > > > > Log: > > Commit the 64-bit inode project. > > > > Extend the ino_t, dev_t, nlink_t types to 64-bit ints. Modify > > struct dirent layout to add d_off, increase the size of d_fileno > > to 64-bits, increase the size of d_namlen to 16-bits, and change > > the required alignment. Increase struct statfs f_mntfromname[] and > > f_mntonname[] array length MNAMELEN to 1024. > > > > ABI breakage is mitigated by providing compatibility using versioned > > symbols, ingenious use of the existing padding in structures, and > > by employing other tricks. Unfortunately, not everything can be > > fixed, especially outside the base system. For instance, third-party > > APIs which pass struct stat around are broken in backward and > > forward incompatible ways. > > > > Kinfo sysctl MIBs ABI is changed in backward-compatible way, but > > there is no general mechanism to handle other sysctl MIBS which > > return structures where the layout has changed. It was considered > > that the breakage is either in the management interfaces, where we > > usually allow ABI slip, or is not important. > > > > Struct xvnode changed layout, no compat shims are provided. > > > > For struct xtty, dev_t tty device member was reduced to uint32_t. > > It was decided that keeping ABI compat in this case is more useful > > than reporting 64-bit dev_t, for the sake of pstat. > > > > Update note: strictly follow the instructions in UPDATING. Build > > and install the new kernel with COMPAT_FREEBSD11 option enabled, > > then reboot, and only then install new world. > > > > Credits: The 64-bit inode project, also known as ino64, started life > > many years ago as a project by Gleb Kurtsou (gleb). Kirk McKusick > > (mckusick) then picked up and updated the patch, and acted as a > > flag-waver. Feedback, suggestions, and discussions were carried > > by Ed Maste (emaste), John Baldwin (jhb), Jilles Tjoelker (jilles), > > and Rick Macklem (rmacklem). Kris Moore (kris) performed an initial > > ports investigation followed by an exp-run by Antoine Brodin (antoine). > > Essential and all-embracing testing was done by Peter Holm (pho). > > The heavy lifting of coordinating all these efforts and bringing the > > project to completion were done by Konstantin Belousov (kib). > > > > Sponsored by: The FreeBSD Foundation (emaste, kib) > > Differential revision: https://reviews.freebsd.org/D10439 > > What's the purpose of the new dirent.d_off field? I can't find any > code that uses it. It is supposed to help NFS server. They are supposed to provide directly the cookies for nfs readdir call. But it is not required, and corresponding code was not committed to FreeBSD fs/nfs yet. > I'm wondering if the fuse(4) module should set it > in order to work properly over NFS, or something. No, it is not strictly required. OTOH, there is userspace implementation of NFS server which seems to make use of it when available. This is why r340431 was done. From owner-svn-src-all@freebsd.org Tue Mar 12 22:22:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6012815408DC; Tue, 12 Mar 2019 22:22:50 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BFDB189002; Tue, 12 Mar 2019 22:22:49 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lj1-f170.google.com with SMTP id a17so3771210ljd.4; Tue, 12 Mar 2019 15:22:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Oa9vDNcxWp4QBdEbSePz3TLdKoM4b8icq3laRXsNI3Y=; b=LWbPD0LN8tGT9sc6vZ4U3jlrtgduG2wETsgUUKDcZK9jPKfbXXmzNaTbOHOsmmkRI+ qcP44Y6H06xbPFyN0P6XZ1c9sBmWMBujh3/T8jag+iyFvTHM4Si9GC14tgT58Ifwpu8y anssf8fCygZYXQgBEcrgmXffzJ559VtnTxcTMQ2TI3z0qIFElCvbLsFaVaehoZJ+AMh1 bNDxPWsGjpeBmPzkvFK4rByrbo7k0ETESqKdWyxAZZ2LJu3bdcO1CwtA33PngBI9T7Kt ITTEtODrbZTmd2e7O/prufn7Rn22J2gBem8Mj0oODRpoDOcJVhibMwmwHat/S1ypjl3K X/bg== X-Gm-Message-State: APjAAAWMFXGMW759FRJZoGdOkUojmin8psZ4Sf9VunJHjNSWhr2inZpd cxxN3Y8AL8GlY5xzbPqKE5myXX4QhPgpYUW2N58r8w== X-Google-Smtp-Source: APXvYqynvnZ8eoKhXNUwVFBw9hamOBr+katx1RXvZm3MqucCkNEiIcNa4RefPmO8KbaAALxiBw4ZGtn5RIzfHKo4mTs= X-Received: by 2002:a2e:870c:: with SMTP id m12mr1836583lji.24.1552429367405; Tue, 12 Mar 2019 15:22:47 -0700 (PDT) MIME-Version: 1.0 References: <201705230929.v4N9T5g1028124@repo.freebsd.org> <20190312222035.GX2492@kib.kiev.ua> In-Reply-To: <20190312222035.GX2492@kib.kiev.ua> From: Alan Somers Date: Tue, 12 Mar 2019 16:22:35 -0600 Message-ID: Subject: Re: svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi... To: Konstantin Belousov Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: BFDB189002 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 22:22:50 -0000 On Tue, Mar 12, 2019 at 4:20 PM Konstantin Belousov wrote: > > On Tue, Mar 12, 2019 at 03:58:31PM -0600, Alan Somers wrote: > > On Tue, May 23, 2017 at 3:29 AM Konstantin Belousov wrote: > > > > > > Author: kib > > > Date: Tue May 23 09:29:05 2017 > > > New Revision: 318736 > > > URL: https://svnweb.freebsd.org/changeset/base/318736 > > > > > > Log: > > > Commit the 64-bit inode project. > > > > > > Extend the ino_t, dev_t, nlink_t types to 64-bit ints. Modify > > > struct dirent layout to add d_off, increase the size of d_fileno > > > to 64-bits, increase the size of d_namlen to 16-bits, and change > > > the required alignment. Increase struct statfs f_mntfromname[] and > > > f_mntonname[] array length MNAMELEN to 1024. > > > > > > ABI breakage is mitigated by providing compatibility using versioned > > > symbols, ingenious use of the existing padding in structures, and > > > by employing other tricks. Unfortunately, not everything can be > > > fixed, especially outside the base system. For instance, third-party > > > APIs which pass struct stat around are broken in backward and > > > forward incompatible ways. > > > > > > Kinfo sysctl MIBs ABI is changed in backward-compatible way, but > > > there is no general mechanism to handle other sysctl MIBS which > > > return structures where the layout has changed. It was considered > > > that the breakage is either in the management interfaces, where we > > > usually allow ABI slip, or is not important. > > > > > > Struct xvnode changed layout, no compat shims are provided. > > > > > > For struct xtty, dev_t tty device member was reduced to uint32_t. > > > It was decided that keeping ABI compat in this case is more useful > > > than reporting 64-bit dev_t, for the sake of pstat. > > > > > > Update note: strictly follow the instructions in UPDATING. Build > > > and install the new kernel with COMPAT_FREEBSD11 option enabled, > > > then reboot, and only then install new world. > > > > > > Credits: The 64-bit inode project, also known as ino64, started life > > > many years ago as a project by Gleb Kurtsou (gleb). Kirk McKusick > > > (mckusick) then picked up and updated the patch, and acted as a > > > flag-waver. Feedback, suggestions, and discussions were carried > > > by Ed Maste (emaste), John Baldwin (jhb), Jilles Tjoelker (jilles), > > > and Rick Macklem (rmacklem). Kris Moore (kris) performed an initial > > > ports investigation followed by an exp-run by Antoine Brodin (antoine). > > > Essential and all-embracing testing was done by Peter Holm (pho). > > > The heavy lifting of coordinating all these efforts and bringing the > > > project to completion were done by Konstantin Belousov (kib). > > > > > > Sponsored by: The FreeBSD Foundation (emaste, kib) > > > Differential revision: https://reviews.freebsd.org/D10439 > > > > What's the purpose of the new dirent.d_off field? I can't find any > > code that uses it. > It is supposed to help NFS server. They are supposed to provide directly the > cookies for nfs readdir call. But it is not required, and corresponding > code was not committed to FreeBSD fs/nfs yet. > > > I'm wondering if the fuse(4) module should set it > > in order to work properly over NFS, or something. > > No, it is not strictly required. OTOH, there is userspace implementation > of NFS server which seems to make use of it when available. This is why > r340431 was done. Would that be unfs3 or nfs-ganesha? I might add it to my list of stuff to test. -Alan From owner-svn-src-all@freebsd.org Tue Mar 12 22:40:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCE101540D71; Tue, 12 Mar 2019 22:40:05 +0000 (UTC) (envelope-from kib@freebsd.org) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BA2B89794; Tue, 12 Mar 2019 22:40:05 +0000 (UTC) (envelope-from kib@freebsd.org) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x2CMdvJp019651 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 13 Mar 2019 00:40:00 +0200 (EET) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x2CMdvJp019651 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x2CMdv5f019650; Wed, 13 Mar 2019 00:39:57 +0200 (EET) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Wed, 13 Mar 2019 00:39:57 +0200 From: Konstantin Belousov To: Alan Somers Cc: src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi... Message-ID: <20190312223957.GY2492@kib.kiev.ua> References: <201705230929.v4N9T5g1028124@repo.freebsd.org> <20190312222035.GX2492@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 22:40:06 -0000 On Tue, Mar 12, 2019 at 04:22:35PM -0600, Alan Somers wrote: > On Tue, Mar 12, 2019 at 4:20 PM Konstantin Belousov wrote: > > > > On Tue, Mar 12, 2019 at 03:58:31PM -0600, Alan Somers wrote: > > > On Tue, May 23, 2017 at 3:29 AM Konstantin Belousov wrote: > > > > > > > > Author: kib > > > > Date: Tue May 23 09:29:05 2017 > > > > New Revision: 318736 > > > > URL: https://svnweb.freebsd.org/changeset/base/318736 > > > > > > > > Log: > > > > Commit the 64-bit inode project. > > > > > > > > Extend the ino_t, dev_t, nlink_t types to 64-bit ints. Modify > > > > struct dirent layout to add d_off, increase the size of d_fileno > > > > to 64-bits, increase the size of d_namlen to 16-bits, and change > > > > the required alignment. Increase struct statfs f_mntfromname[] and > > > > f_mntonname[] array length MNAMELEN to 1024. > > > > > > > > ABI breakage is mitigated by providing compatibility using versioned > > > > symbols, ingenious use of the existing padding in structures, and > > > > by employing other tricks. Unfortunately, not everything can be > > > > fixed, especially outside the base system. For instance, third-party > > > > APIs which pass struct stat around are broken in backward and > > > > forward incompatible ways. > > > > > > > > Kinfo sysctl MIBs ABI is changed in backward-compatible way, but > > > > there is no general mechanism to handle other sysctl MIBS which > > > > return structures where the layout has changed. It was considered > > > > that the breakage is either in the management interfaces, where we > > > > usually allow ABI slip, or is not important. > > > > > > > > Struct xvnode changed layout, no compat shims are provided. > > > > > > > > For struct xtty, dev_t tty device member was reduced to uint32_t. > > > > It was decided that keeping ABI compat in this case is more useful > > > > than reporting 64-bit dev_t, for the sake of pstat. > > > > > > > > Update note: strictly follow the instructions in UPDATING. Build > > > > and install the new kernel with COMPAT_FREEBSD11 option enabled, > > > > then reboot, and only then install new world. > > > > > > > > Credits: The 64-bit inode project, also known as ino64, started life > > > > many years ago as a project by Gleb Kurtsou (gleb). Kirk McKusick > > > > (mckusick) then picked up and updated the patch, and acted as a > > > > flag-waver. Feedback, suggestions, and discussions were carried > > > > by Ed Maste (emaste), John Baldwin (jhb), Jilles Tjoelker (jilles), > > > > and Rick Macklem (rmacklem). Kris Moore (kris) performed an initial > > > > ports investigation followed by an exp-run by Antoine Brodin (antoine). > > > > Essential and all-embracing testing was done by Peter Holm (pho). > > > > The heavy lifting of coordinating all these efforts and bringing the > > > > project to completion were done by Konstantin Belousov (kib). > > > > > > > > Sponsored by: The FreeBSD Foundation (emaste, kib) > > > > Differential revision: https://reviews.freebsd.org/D10439 > > > > > > What's the purpose of the new dirent.d_off field? I can't find any > > > code that uses it. > > It is supposed to help NFS server. They are supposed to provide directly the > > cookies for nfs readdir call. But it is not required, and corresponding > > code was not committed to FreeBSD fs/nfs yet. > > > > > I'm wondering if the fuse(4) module should set it > > > in order to work properly over NFS, or something. > > > > No, it is not strictly required. OTOH, there is userspace implementation > > of NFS server which seems to make use of it when available. This is why > > r340431 was done. > > Would that be unfs3 or nfs-ganesha? I might add it to my list of stuff to test. ganesha. From owner-svn-src-all@freebsd.org Wed Mar 13 00:14:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74C3115445F7; Wed, 13 Mar 2019 00:14:27 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DB2148D576; Wed, 13 Mar 2019 00:14:26 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-lf1-x129.google.com with SMTP id y18so132333lfe.1; Tue, 12 Mar 2019 17:14:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=YSxCtBCFfWyv5wrLLjJhRhZksgaAdA6+hCo5Seh4rco=; b=EJKQUJeuU5Vj8fLuAJ+Hk0fvxjKOjgBE2QC9rSkoRPQAQoPvPDFMUxD9T0Psd8pVRv tdOtT2e8WWCKdsgsEheEOQO59glmcmp5GRqFvZ+sLPTzqvmDenO3BpqWyDxJsrYGsx3+ h21hCgrxAr2ohaUumfaQdYznapX/FAWwFUeQ5rrhDYgRhawKGvkUFKFylzsyGa+pxWSx 6nBOxsq2aLD5NJe8IO0/dNFEYZqSq7pmjs1sPlThYVyasAOHe6rb20AUFSZ4WNZq1f4H Vv3Aez4b+5989uBUIvOQKdCVYNxszmsfqGGvpQ33Pk3d6zI4N1wXfGMOFGnD7mcvbKjZ UtrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=YSxCtBCFfWyv5wrLLjJhRhZksgaAdA6+hCo5Seh4rco=; b=k29mEEpYRGtSc3KoYal1O7olcc1nZwYGct5kVeOHSEinbAA4oUjqp1khUCiLr1zqT+ XBksDPtf2oHX7SJsSqwV/6hQgR4NNJWq2G63m5rGqCj5m1ypZxlWW7Zts7jNpKBiWr7U RkVaN5qisKC2QGiaFd70upEYJDnDjLtHqQX7aasAUTXdtc20HD+3Pw1dMbG1MVNEt4NL AdpKeOOyA4JRB1h3chdHJN1p8KCdOQBJywfFr/f2dklfrrgRD70Pb815E2r1+CIr9I4W evaZso4rj5sOQ8amKjbW3+AduJ34a74/xcx57RrVqLCXuXkd4D6FhnzGjXrFYbaOdW1S Lz0Q== X-Gm-Message-State: APjAAAXBpr0jlHPLkEI1lAuQTRnnRW4n/fjsbOr7SIGCRZeMkG9l7GPK +K086Ravd1lGADTZNTuuAuKX8YG10BXu/1dM1bu1vA== X-Google-Smtp-Source: APXvYqx57ynJWjlZaK99ZsdSMGxnaWDZfOnZlhMV1liL72hhs6Po+2KenhSkXY10AhSUTM3fNJebJGlDH1n4o4LD8VQ= X-Received: by 2002:ac2:43c3:: with SMTP id u3mr7493127lfl.69.1552436064620; Tue, 12 Mar 2019 17:14:24 -0700 (PDT) MIME-Version: 1.0 References: <201903120515.x2C5Fbtw013485@gndrsh.dnsmgr.net> <201903120525.x2C5PH7X013552@gndrsh.dnsmgr.net> In-Reply-To: Reply-To: araujo@freebsd.org From: Marcelo Araujo Date: Wed, 13 Mar 2019 08:14:13 +0800 Message-ID: Subject: Re: svn commit: r345050 - head/bin/date To: Warner Losh Cc: John Baldwin , "Rodney W. Grimes" , Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: DB2148D576 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.940,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 00:14:27 -0000 On Wed, Mar 13, 2019, 12:57 AM Warner Losh > > On Tue, Mar 12, 2019, 9:43 AM John Baldwin wrote: > >> On 3/11/19 10:43 PM, Warner Losh wrote: >> > On Mon, Mar 11, 2019 at 11:25 PM Rodney W. Grimes < >> freebsd@gndrsh.dnsmgr.net> >> > wrote: >> > >> >>>> Author: imp >> >>>> Date: Tue Mar 12 04:49:59 2019 >> >>>> New Revision: 345050 >> >>>> URL: https://svnweb.freebsd.org/changeset/base/345050 >> >>>> >> >>>> Log: >> >>>> Remove now useless -d and -t flags. >> >>>> >> >>>> These were used to set dst flag and minutes west of UTC >> >>>> respectively. These are obsolete and have been removed form the >> >>>> kernel. These existed primarily to faithfully emulate early >> >>>> Unix ABIs that have been removed from FreeBSD. >> >>>> >> >>>> Reviewed by: jbh@, brooks@ >> >> Nits: jhb@ and I see he did comment in the review, but he did not >> >> accept it as a reviewew at the top. >> >> >> > >> > This is why I think just the reference to the differential revision is >> > perfectly fine. Why duplicate data? Others complained I hadn't included >> it. >> > He commented, we discussed it on irc (though most of it was about how to >> > use arc better), etc. I thought it warranted it. So please don't >> nitpick. >> > This level is really annoying and frustrating. Does this really help us >> > produce a better product? >> >> To be fair, we have been pretty consistent that 'Reviewed by' in the >> commit >> means 'Accepted' in phab. I probably would have ended up accepting this >> anyway and just didn't click the box, so it's ok. However, we have had >> folks in the past who were tagged in the past and gave feedback, but >> didn't >> approve of the change, but were listed as 'Reviewed by' hence the current >> practice. >> > > But we talked about it outside phab, which to my mind puts it under the > old rules. And it's not Rod's job to police this detail. It would be up to > you to hassle me if I misinterpreted that extra communication wrong. > > Warner > First of all, I would like to apologize to anyone that might get offended with what I will write, but I can't miss this opportunity! In the past 2 years or so, almost everyday there is a new drama, always something nonsense, always one or another nosy individual looking after other people efforts. Is it what we want for FreeBSD? I have started to question myself where we as community will end up. Is there anybody else concerned? Or perhaps I'm the drama queen and overseeing the situation. We should change freefall message to: "don't make drama, make code!" Best, > From owner-svn-src-all@freebsd.org Wed Mar 13 06:46:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17D81152795A; Wed, 13 Mar 2019 06:46:17 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B64EC6A317; Wed, 13 Mar 2019 06:46:16 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A7BCE6B79; Wed, 13 Mar 2019 06:46:16 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2D6kGjQ000613; Wed, 13 Mar 2019 06:46:16 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2D6kGxG000610; Wed, 13 Mar 2019 06:46:16 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903130646.x2D6kGxG000610@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 13 Mar 2019 06:46:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345083 - in head/sys: conf dev/cxgbe/firmware modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware modules/cxgbe/t6_firmware X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: in head/sys: conf dev/cxgbe/firmware modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware modules/cxgbe/t6_firmware X-SVN-Commit-Revision: 345083 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B64EC6A317 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 06:46:17 -0000 Author: np Date: Wed Mar 13 06:46:15 2019 New Revision: 345083 URL: https://svnweb.freebsd.org/changeset/base/345083 Log: cxgbe(4): Update T4/5/6 firmwares to 1.23.0.0. Obtained from: Chelsio Communications MFC after: 1 month Sponsored by: Chelsio Communications Added: head/sys/dev/cxgbe/firmware/t4fw-1.23.0.0.bin.uu (contents, props changed) head/sys/dev/cxgbe/firmware/t5fw-1.23.0.0.bin.uu (contents, props changed) head/sys/dev/cxgbe/firmware/t6fw-1.23.0.0.bin.uu (contents, props changed) Deleted: head/sys/dev/cxgbe/firmware/t4fw-1.22.0.3.bin.uu head/sys/dev/cxgbe/firmware/t5fw-1.22.0.3.bin.uu head/sys/dev/cxgbe/firmware/t6fw-1.22.0.3.bin.uu Modified: head/sys/conf/files head/sys/dev/cxgbe/firmware/t4fw_interface.h head/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt head/sys/dev/cxgbe/firmware/t6fw_cfg_uwire.txt head/sys/modules/cxgbe/t4_firmware/Makefile head/sys/modules/cxgbe/t5_firmware/Makefile head/sys/modules/cxgbe/t6_firmware/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Mar 12 22:25:59 2019 (r345082) +++ head/sys/conf/files Wed Mar 13 06:46:15 2019 (r345083) @@ -1466,7 +1466,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.22.0.3.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.23.0.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t4fw.fw" @@ -1500,7 +1500,7 @@ t5fw.fwo optional cxgbe \ no-implicit-rule \ clean "t5fw.fwo" t5fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t5fw-1.22.0.3.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.23.0.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t5fw.fw" @@ -1534,7 +1534,7 @@ t6fw.fwo optional cxgbe \ no-implicit-rule \ clean "t6fw.fwo" t6fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t6fw-1.22.0.3.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t6fw-1.23.0.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t6fw.fw" Added: head/sys/dev/cxgbe/firmware/t4fw-1.23.0.0.bin.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/cxgbe/firmware/t4fw-1.23.0.0.bin.uu Wed Mar 13 06:46:15 2019 (r345083) @@ -0,0 +1,9944 @@ +/*- + * Copyright (c) 2018 Chelsio Communications, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE 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. + */ +begin-base64 644 t4fw +AAAEUAEXAAAAAQkEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAABDMEQgRKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAENoZWxzaW8gRlcgUlVOTUVNIERFQlVHPTAgKEJ1aWx0IFR1ZSBKYW4gMTUgMDc6 +NTM6NTUgUFNUIDIwMTkgb24gdm5jNC5hc2ljZGVzaWduZXJzLmNvbTovaG9tZS9maXJtd2FyZS9j +dnMvZnctcmVsZWFzZSksIFZlcnNpb24gVDR4eCAwMS4xNy4wMC4wMAAAAAAAAAAAAAAAABcsdBRg +AMgA4QB78AAQAADhADC4eP///x/84UCAAAAB4QB7cAAAEAAf//yo4QGUcCAAAADhAZwE4QB5AAAC +AEDhAHmAAAYAQAACAAoABgAK4QB5BAAMAACAAAEC4QB7POEAe0ThAHvk4gAAAAABAADhAHuQIAAA +AAAAgADhAHsAAABAAeEAe5wAAEAAREREQuAAAADjAARzREREQOMACAAgAAJcAAAAAB//jjAAAAAA +H/+ONAAAAAAf/444AAAAAB//jjwf/8AAAAAAAAAAAADAABL/zRP/zZMgEv/NE//NhCAEMwGTIBH/ +zBL/zJIQEf/MEv/MkhAR/8wB9DER/8siCv+SEADkMQAFMQECABL/yALnMQIWABH/x4EQAQFfwCEC +EQHJERH/xBL/xJIQEf/EEv/EkhBgAA8R/78S/8OSEBH/vxL/wpIQgRAR/8HAIJIREv/AkhLAIJIT +Ev+/khCCEALyUGUv9xH/vccvkhAR/7ySEBL/vBP/vJMgwDKTIRP/u5MigiIS/7oT/7qTICMiIRT/ +uQQzAck4E/+4gzADgxQIMxEU/7akM5MhE/+qkyJgAAjCMJMhE/+nkyIS/7GQIJAhkCKQI5AkkCWQ +JpAnkCiQKZAqkCuQLJAtkC6QLyAmECAmEYIiEv+kwDAtNzAtNzQtNzgtNzwjPQFyM+0AAgAS/6HA +MC83AC83EC83IC83MCM9AXIz7QACABL/l8AwKDcwKDc0KDc4KDc8Iz0BcjPtEv+VwDAnNwAnNxAn +NyAnNzAjPQFyM+0S/5AV/5AW/5HAMNcgBWYBYAAZAAAAAAAAAAQ2BQACANMP0w8FMwxuOxQHRxQH +BEN2MeYENgUFMwxvO+0AAgAS/4MV/4EjCgACJwIHBEMEPgUFMwwHRxRvO/ADAgAS/33JLoMghCGF +IrwidDsOhlC0VZYwtDN0M/Rj/+YAZT/iZV/fEv9xwDIDLgUDAgAS/2jAMCg3QCg3RCg3SCg3TCM9 +AXIz7QACABL/ay0nAMARAUkxAEgxAQIAwAAU/2gE0jEV/2eUUBT/ZwTTMRX/ZpRQFP9mBNQxFf9m +lFAU/2UE1TEV/2WUUBD/ZQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf/AAA +H/wAAOMACfgf/AAAH/wAAOMACfgf/AAAH/wAAOMACfgf/4AAH/+FsOMACfgf/4WwH/+FsOMAD6gf +/4WwH/+FsOMAD6gf/4WwH/+HQOMAD6gf/4dAH/+OJOMAETgf/44wH/+zkOMAGCgf/7OQH/+zkOMA +PYgf/8AAH//96+MAPYggAAAAIAABauMAe3QgAAF4IAABfOMAfOAgAAF8IAABheMAfOQgAAGYIAAB +nOMAfPAgAAGcIAABpeMAfPQgAAG4IAABvOMAfQAgAAG8IAABxeMAfQQgAAHYIAAB2OMAfRAgAAHc +IAAB4uMAfRAgAAH4IAAB+OMAfRggAAH8IAAB/OMAfRggAAIYIAACGOMAfRggAAIcIAACHOMAfRgg +AAI4IAACOOMAfRggAAI8IAACPOMAfRggAAJYIAACWOMAfRggAAJcIAACYuMAfRggAAJ4IAACeOMA +fSAgAAJ8IAACguMAfSAgAAKYIAITy+MAfSggAwAAIAMXqOMCjlwgAxeoIAMXqOMCpgQgAxeoIAcp +TOMCpgQgBylQIAcswOMGt6wgCAAAIAgTEOMGuxwgCBMQIAkvuuMGziwgCS/AIAkwjOMH6twgCwAA +IAsAAOMH66ggCwAAIAsAAOMH66ggCwAAIAt5yOMH66gAAAAAAAAAAAAAAAAgABQWIAAUCCAAF/Ig +ABQIIAAXbSAAFAggABS6IAAXBSAAFoogABQIIAAWOSAAFfIgABWFIAAT9SAAFS8gABQIIAAUCCAA +FAggABTaAAAAAP///////w/8///w////APz///////8P/P//8P///wD8IADKDiAAy5QgAMvUIADL +iiAAyzUgAMsrIADK+iAAyvAgAMrmIADKkiAAy9IgAMqIIADKXCAAy9QgAMpSIADKQAEQGAEABAAA +AAAAIAAAAEAAAgIFBQgICwsODhERFBQXFxoaHR0gICMjJiYpKSwsLy8yMjU1ODg7OwAAAAAAAAAg +BSocIAHH1CAAPOAgAZLYIAHCuCABvOAgAXhYIARLiB//6TwgALKYIADMsB//3CAgAHWAIABnYAAA +AAAAAAAAIAGUkCAAnUQgAJVQAAAAAB//1KQf/8YoH//CWB//wDAgAFq4IABOFCAAS0AgAL44H//i +6CAG/pgAAAAAAAAAACAAUcggAF30AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIADGpCABrDggANdg +IADWXB//8CAf/89MH//MeCAAksggBbGwIAFDgCABK9ggARB4IAEH0CAA/NQgAO9MIADaWCAFLhAg +Ayk4IAE49CADWCAgAfnEIAB1QAAAAAAgANfIIAYpbCAAyYAgAZ6EIAACmCAAt/gAAAAAAAAAAB// +80ggANd8IAMr6AAAAAAAAAAAIAOxeCAAKjQgA6/AIAAotAAAAAAgADToIAAzHCAAMWQAAAAAIAA8 +hCABPLgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgBBfAIAUpvAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAA5/CADumAgADeYAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAACAAPOAgAK9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsA +AAAgAxT8CAAAACADFQgIAAAAIAMVFAoAAAAgAxUgDAAAACADFSwSAAAAIAMVPA0AAAAgAxVQDgAA +ACADFWATAAAAIAMVcAoAAAAgAxWEDgAAACADFZAYAAAAIAMVoA0AAAAgAxW8DgAAACADFcwQAAAA +IAMV3BIAAAAgAxXwDgAAACADFgQQAAAAIAMWFBEAAAAgAxYoCgAAACADFjwLAAAAIAMWSA0AAAAg +AxZUFAAAACADFmQKAAAAIAMWfA8AAAAgAxaIBgAAACADFpgGAAAAIAMWoAYAAAAgAxaoBgAAACAD +FrAGAAAAIAMWuAkAAAAgAxbABgAAACADFswEAAAAIAMW1AYAAAAgAxbcCwAAACADFuQLAAAAIAMW +8AQAAAAgAxbUBAAAACADFvwJAAAAIAMXBAkAAAAgAxcQAAAAAAAAAAANAAAAIAMXHAoAAAAgAxcs +BgAAACADFzgCAAAAIAMXQAMAAAAgAxDMAQAAACADF0QAAAAAAAAAANdqpHjox7dWJCBw28G9zu71 +fA+vR4fGKqgwRhP9RpUBaYCY2ItE96///1uxiVzXvmuQESL9mHGTpnlDjkm0CCH2HiViwECzQCZe +WlHptseq1i8QXQJEFFPYoeaB59P7yCHhzebDNwfW9NUNh0VaFO2p4+kF/O+j+GdvAtmNKkyK//o5 +Qodx9oFtnWEi/eU4DKS+6kRL3s+p9rtLYL6/vHAom37G6qEn+tTvMIUEiB0F2dTQOebbmeUfonz4 +xKxWZfQpIkRDKv+Xq5Qjp/yToDllW1nDjwzMkv/v9H2FhF3Rb6h+T/4s5uCjAUMUTggRofdTfoK9 +OvI1KtfSu+uG05EHDBEWBwwRFgcMERYHDBEWBQkOFAUJDhQFCQ4UBQkOFAQLEBcECxAXBAsQFwQL +EBcGCg8VBgoPFQYKDxUGCg8VH//AAAAEACAgByzAIAcyMB/83gAf/6kkIAcs8B//qkQf/63QA4AA +AIEAAAAA//gAH/+oiAEAAAAAEAAAgQQBAIEEAAABBAAAAQQBAIAAAAAABf//H/+nzAYAAAAEAQAI +H/+AwAIAAACAEAAAQUAAAEFAAQCDAAAB//+//7////8f/5V4BAAACCADDsiBgAAADAAAAB//j8D/ +/wAA//8A/wABAAAAAP//H/+wwB//pXwP///////QdB//Yzwf/ODoIAcqfP//vwwf/2O8H/+rCB// +m4Qf/OIAAAAIyOD//gDhAZIAH/+V5AD///8f/5osH/+rJARBAAilAAAAwAAAAMAEAAAwAAAAH/+r +wAAA/4AgBylQIAtG4OEALgAf/6u0AAAd4B//p1wf/6xQH/+nwB//q6DgAACg4QAwuOAAAAAAAIAA +4QBgEAAAQADhAhAA4QIwAOECUADhAnAA4QAQCB/84UDhAHtwH/+zIB//sxgf/OAIH/+zHB//s0gf +/7NAH/+zRB//s3Af/7NoH/+zbB//qSQf/7DAIAcs8B/83gAf/6pEH/+pwB//quQf/5o8H/+wPB// +puggCwBgH/+sjAAA/4AAAB7AH/+PwB//rJgf/6yUH/+s+B//rcAqAAAAIAsEYCALBJAEAAAIBQAA +AIP/AACBAAAAABAAACALBNAgCwQwIAAJ+CADDdgf/4TwH/+AwB//rdBnRSMB782riZi63P4QMlR2 +H/+AAAAAPyggAxDMz////yALBfAQAAAAP////wIAAABAAAAAGgAAAB/84HQgoAAAH/+o3CAAHeAg +AB98gAAAAAAAgAD//v//AAAQAABAAAAgAc7YIAAjCCAAAAAgACNwIAsIwP//f///+///D/aAACAL +CPAgCwkgAAEAAAAEAAAf/6lQIAtTACALCbAgADToIAA2OCAAMxwgCwtQIAsKECALCqAgADFkIAsK +8FMAAAAA////UgAAAFEAAAAgAgMYH/+q+CAAOWAgBBOoH/+q8CALC3Af/5o0H/+qyCALDZAUAAAA +gAAAAnxQAACAAAAQgAAABoAAsAAAAAoAAP80kv//8A+AALEA4QGaAAACAAAgCw0gH/+XrAAAfkAg +Cw1gH/+rAAD/wAABAAAAKAAAAOAAAAAmAAAAAAD//x//kJAGAAAABYAAAB//pqgrAAAAIABVMCAL +VeAf/6h0A4AAAAf///8EAQAINQAAAAMAAAAAP///gEAAAAgP//8f////QUAAAEFAAQAABf//AQQB +AAEEAAAAAMAAPQAAAB//liAHAAAAgQQBAIEEAAAf/6q0AAA6mMMAAAAAAA//AEMAAB//qDwAAAgA +BAAAAB//mWwgC1ZAH/+ylB//sOAf/5V4AAYAAOEAegAf/5XgH/+awB//qugf/6skH/+aRB//mjAg +C1ZwAAMHgCALVuAIAAAAH/+YEAAgAAAAAAkAAAAwAv/8+H/AAAAAo/+7AKP/ugANAAAA4AMAAIP/ +tgAP////D//4AP8AAAAgC1cgIAsO0CALDwAgC1ewAA8AAAAKAAD//wAPH/+q7AP/wACD/8AAIAtY +MCALWKAf/6toH/+xUP9g8AAEgAAIH/+OQB//gFAARAAAH/+OgAGAwgAAAIEAH/+PgB//gGD/H/// +AMAAAPAAAACBgAAA/3///x//pXz/v/////8AAACAAAAAAIbdH/+bfB/84gAf/5CA7gAAAAAACcwf +/OIMDwAAACALD0Af/6t0AAAIzB//rIQf/5uEIAsRUCADCEDg//4AIAtMcB//nAAf/5c8H/+AcCAH +KvAAADAAAAAnEB//25AgC2XwIAtlwB//lhQf/6vkAAD//h//miTerb7vNAAAAD8AAAAf/7BYAJkA +AAAAiQYQAAcCAcCAAB//sDSZAAAAH/+xFACIAAiCgAABH/+wqP//8AADFQAAAxEAAAAPA/8f/6rE +IAEELCABCBgpAAAAAACJFCABDOwgAwuUAABAACADDsAMAAAAIAEX4B//sXAAACGwIAMLpB//q0Qf +/694H/+rBP8A/wDw8PDwqqqqqszMzMwf/6bwAAP//wAAJ/8gAwvoIAtmQCABKDgAD0JAIANfQB// +q5gACQAAAABIAIIAAAAgATzAH/+rVDsAAAgOAAAA0AAAAB//gLAAACKaAAAIUAAAH0Af/6sMIAsj +kCALI7AgCyPQ/9///wAJAAgf/7CkMAAAAH8AAAAf/6k4IAsm8AAAD/4gCyYgIAsmgCALJsAAAOAA +///3/yALJ4AgA2bIAACD/yAHMNgVoAAAIAcx0B//sGgAAAgGAACIzB//l8AABAP/CgAAACAHLWgg +By8IIActsIP/tiCD/7cAIAsnsOEAAAAzAAAAH/+xZAP/4AB///8AAD/2kB//sHAAACKoH/+pQAP/ +8AAf/5dgIAtJwCALSYAgC0ngH/+ycB//sGwAD///H/+rCCALaKAf/5pkIAB5qB//qVwgByp4IAAF +iB//pcAf/5WsH/+qNCALKDDABAAAH/+o9B//qOgf/6kAH/+vIB//rpQgA+vIIAsocB//qxwgAw+Q +H/+nACAAeojgAQAAH/+bgCALaWAgCyiwIADDEB//m3ggAMAQH/+RyCALaOAgC2kwH/+X4CALK0Af +/5BUH/+SDCALQKAgC0DQSAAAACAB1LAf/6iIIAHWuB//lmgf/6dcH/+mRB//qTQf/6YMAAAYUAAA +Fkwf/5f8H/+pWCAHLOQf/6acH/+V5OEALgAf/6lk4QBeAOECDgD//7//4QAOAOEBjgD//77/H/+n +MCAB3AAgAeg84AUAAAP/AAAf/6ZkIAMOyB/8v/88AAAAH/+AuIMAAAAf/6ZMDzwAACALSUCCgAAA +IAIKDCACDMAf/6v0IAIQeAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIGAAAAAAAAQAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAgYAAAAAAAAD/////////////////////H//7gB//+4Af//tI +H//7SB//+0gf//tIH//0wB//9/gf//ZQH//2UB//9lAgBwCIAAAAAAAAAAAAAAAAAAAAACAHA9Ag +BwPQAAAAAAAAAAAAAAAAAAAAACAHAIggBwCIH//49B//+PQf//j0H//49B//+PQf//j0AAAAACAB +3RgAAAAAAAAAAAAAAAAAAAAAAgEAAAAAAAAAAAAAAAAAAAEDEREICBAJAwEAAAAAAAAEAAAAAAAA +AIGAAAAAAAAQBQAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAgQAAAAAAABgFAAAAgAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAgCgAR8WsT8WvTDwPmMQECABbxaRfxandrBpBgtGZ3Y/hUDvFV +2hwPFABj//kAAABsEAgoIAWUFSQgB/ZgpBWgGUUA+QANjWFEAQCIIhrxXRfxXO3xXRwLDgAADEkR +p5krkp7A6f9gDPugDKUAKZKdCksKK7LDC5kB6RYEJIyZgACJ2PcgDPiSAJ0AL3KuZPFBH/FOKnKt +L/J/76sBBMP9AAD/QAl+YgCdAJjY/0AJhmIAnQCKFSkgFKqZCQlHKSQU9SALtdIAnQAb8UEvIhct +ISuJFBjxQK/dmJD6Q+gVoA4lAO6WAi7vwoAA/SBmFeAMZQDt8TkdVgKAAAyqAowUmpHrABUEyEEA +APiCaB3gSgUAncbqxgcmSIEAAOvjBQzQBIAACgJhCgJhCgJhCgJhwKTqajYBwEEAAG2pBQgAhgkC +YSghKx/xJfhFRBXgDBUA+QAgFaANBQD6IIgV74gBAAmILvpD6BWviAEA+EVkHaAGBQD2IAYVoB7l +AOYWAixFQoAA6BYBJdmBAABYiyH+gAAXN8UBAPfAAEdwDZUA7eadKAQKgAD5gATBUgCdAMAg0Q8A +AAAAAOokAAnYBIAA7BIFKugEgABYjOvSoNEPAAAAAMCwDJ8079YILfbGAAD6QGgdoBvFAPwAAh2g +DRUAWJNaY//BAADqJAAK2ASAAFiOmNKg0Q8A//m0DaAJBQDqJAACWGEAAPwAAh2gDZUAWJNOY/+R +wKBZ1FId8OeJ2Pk/8riQDKUAY/+k2iBYC1hj/oWKJ40VwMDqrCAu2ASAAFiGe9Kg0Q9sEAgvIhCU +FIYpJyEa/kDwFaAbhQD0IGYV4BzFAO94EQ4oBIAA/QHyDaHuAQAGCULIlAcIQmSCRykgBY0i/r4A +DfAaRQD7IBO9IgCdAObwxh6OlgAAFPDGH/DF5+QAD08CgAD1wA6aEAulAKaZKJKenhD3ABiTUgCd +ACmSnQ/qCiqiwwqZAekWASSSMYAAikj3QBKgkgCdAC5iru3wuxcPqYAALmKtL9LuD+gB6BYCJUv9 +AAD/wA8GYgCdAJlI/8APNmIAnQCLKYoqDAQ+C6oM9UAJ46IAnQAqISgtISaPFPugEMQiAJ0ALiAU +r+4ODkcuJBT1wBDN0gCdALGoKCUoKjAB80ARDpANFQAuIQkrIAcvIST4YCQVoAlVAPlABATwqxEA +4JkRDVKCgAAKmQIa8JcJiAIpIQcb8JYK/wL7BgAMOpkBAOohIizLAoAACe4CiRELqgIb8I+YkIgg +npOflJqS/QAAFDAKZQAKiAKYkS8iEJ+VLiA46PCIHtAEgAD9ISYV4E8VAPUhBhXg7hkADvo5/20A +DDAOBQCelwqIApiWKyIZ6vB0FfgFAAAvJhmem5ua6/BzFPkBAADqABUE0MEAAAoAipyfLjwQ+yHG +FeAKZQAOIIYPAmMOAIYPAmEMfBGmzOrGnSIAqYAAjiktIDik7p4p86AMH5IAnQCPEw8PR/ngCwlS +AJ0AwCDRDwDqJAAKWASAAFiPZP9LkA3gHMUA7BIEKVAEgADtEgMp2ASAAFiMO9Kg0Q+KSPdACoCS +AJ0ADHkRppkokp73AAtDUgCdAC2SnQ94CiiCwwjdAZ0SjRLp1AAGitGAALCvn0jpFgEs8NYAAP4g +BhWgAVIA8//toFIAnQAJdQz0vQAV7/amAADAkJkSjRILrjQPAgDuRggu8RYAAPpAaB2gG8UA/AAi +HaANFQBYkpJj/2QAAOsSAylQBIAAWI3Q0qDRDwCLEPpAaB2gDBUA+2MAFeANZQBYkohj/zrAoFnT +jIpIwcz5X+0YkAulAGP/q4wiwNQNzAL8QEYVr/xyAAAAAAAA6xICKVAEgABYCosqISj/92QNoBzF +AAAAGvAYKyIZiScqoSCJnguqAQpYFAmICv8AiBXkqgEA7iE9LQEKgAAA2RoJ/wLvhgQncAUAAC4l +PfpgMBWv9qIAAIonjRTAwOqsIC7YBIAAWIWc0qDRD9ogWIuuY/54AAAA//PoDaAJBQD+IAYVoAoF +AFnTYIpIjhD/3+YF4BzFAPlf9MiQC6UA//r0DaAJBQAAwND8IEYV7/qSAAuvNP6BBhXv+p4AAAAA +bBAOlRsoIhCOKSchNykgB5MdijL+YIgV4A0VAPxgaB2ntQEA4yEaJdv5AAAL2zn6IYYV4ZkBAOf/ +Ngm3woAA/sJSDeOqAQAODkLxwHAN4tMBAGTUGiYgBcHo+f4ADzAXRQD2wCHVYgCdAIciix304WwN +4A6FACuwAZ8R82Ae3xIAnQCZEJkZmhMY78Pt78QSKA0AAOUWCiyvAoAA6FUIDN+CgACtu+sWCCJw +BQAAiRmeF40a9SAGqhIAnQArUp6GGP1gChviAJ0AL1KdJmLDBv8BZPPwGe+yiZj3IAmYkgCdACqC +rmShUBrvryOCrSqifx3vqwo7AesWBCTb/QAA+mAJ1iIAnQCb2PpgHR4iAJ0AhymGKgwDPgdmDPLA +CZviAJ0AKRoA8yIyDeD69QArIBacEvtgCd0iAJ0AixGGwyogOPfg5hWgBgUA9+EmFaBHBQD74QYV +4KoZAAp2ORfvnJYVLSIYFu+ZnfotIhyd+4nECnY5lhb5YA/C4gCdAIscnh7sFgIljVGAAGABGxnv +hImYapEuixoqUp6PGHujSy1SnS/yww/dAZ0UhhTr730U0/0AAO9kAAMB6YAAmrhl/xNgAwGeHvwg +RhWgCgUAWdLfGe9ziZgY73CMEu4SDiSO2wAA//9cDaAPBQDAoPoghhWv/uYAHe9qwLoLmzT7oQYV +7/72AAAAAP/7GA2gDwUAAJ4enx/8IEYVoAoFAFnSyxnvYIwSjx+JmI4eGO9b+T/1gJIAnQBgAnbA +oJoUixQW71jA2g2dNO1mCC32NgAAYAJdnh6fH5wS6iQACdgEgABYjl6MEo8f7hIOJXXBgABgAhUq +IAeeHp8f+iAABTAMBQBYjjZko24qIAcrIBb8YGgdoaoBAFiOB4wSjx/+IcgVr/puAAAAAAAAixKI +E4wRhhWOFqzdCGYC98YADz+IBQAoJDsMlgyWtC0mHO0iEClQBIAAWIzcjh6MEhjvLypWnYopKSA4 +o6rqJgkk+ZaAACYhN4/EKyEaKSIQ5v82De/CgAB/2woKCkLIpAsNQmTQU/4gJhXgHYUA+f4ADvAK +FQD6IYYVoAY1APYhZhWv9goAiiefH4sd6qwgKmAEgABYiWCPH5oSLSIc+UCIFe/9dgDaIFiKxRjv +EIwSjh76QSgVr/4+AHGeqAq/DP/9ABXv/ooAixOKFS0iEBnvFguqAhvvFgpoAoYcGu8NCYgC6e8M +Gwp+AAAjFhAlFhEmIAeFwCMhB/ZBJBXgZhEA61UBCzKCgAD2pgAKujMBAOYhIimbAoAAA3cCClUC +IyEkCWYClfCFIJfzlvL94KYV45gBAOj2BizKAoAACTkC4xIQIlP5AADp9gQqrgKAAOXlAgZAgQAA +5fYBJ8jBAADlEhEiFDUAAG2pBQgAhgkCYSYgFKRmBgZHJiQU9MAHddIAnQCJFylWnSgiGLGI6CYY +IYCpgACLKSogOKO7mynzQAefkgCdAIwcZcDPwCDRDy0hKGTcIg54AvhARhWgAIYAAAAAAADzH98I +UgCdAA4/DP/9ABXv71oAAAAAAADrEg0pUASAAO0SCypgBIAAWIqt0qDRDwDrEgspUASAAFiMZNKg +0Q8A+kBoHaAbxQD8ACIdoA0VAFiRHGP/wYsQ+kBoHaAMFQDtEgol2GEAAFiRFmP/qQAAJiA7ZGBh +6iQADlgEgAD8ICgVr4kFAOkkOyxwBIAAWIxR+iDmFaALBQArJhz6R2Yd7/wuAAAAAADrEgQpUASA +AFgJFWP/B4on60QACmgEgAD7RAAVoAwFAFiEN9Kg0Q8A2iBYiklj/wgjFhCHwCMgByYhIvrgBAPw +MxEA4yEHKdqCgAALdwIKdwKLJyohCfjGAAt6MwEA6bEVKZsCgAADqgIjISSX8IcgmvOY9u32BSXY +gQAA9+BGFa/NBQD9YAQF82gBAOudCAsyAoAABjMC4/YEK74CgAAH5wLn9gEmYIEAAOMSECbpAQAA +7ctCfkAEgAAsTP4MxhGmhubTOnfIwQAA9J/xqRIAnQBtyQUIAIYJAmFj/iSLEPpAaB2gDBUA+2JA +FeANBQBYkMpj/nkAAPmPAAx//voACNwMDE0UbdkFCCCGCQJj78kIBcEBAADtTAwEyMEAAPWf7wES +AJ0AKsz+bakFCECGCQJlY/3MAABsEAYoIAUmIAf8QEgVoBlFAPkAE11v+zUA9CBGFaAHhQD9YBJY +oAlVAIQnHu5HLCE89IHIFaALFQD+YMgV4WYBAP4gJhXl3B0A5N0KC1cCgAD9oIgV5MwBAO6qCA4B +CoAA7iE9LaAKgAAE3QENvTnkop4uwASAAP1tAAxwDDUA+S0ADjALBQAIezmsu/qAEAPiAJ0AHO4u +KqKdDGwKLMLDDKoB6hYDJQ3JgACJJyQhPImeBFgUCYgK9wCIFeTEAQD7gAQA0AkVAACZGvcgBAfw +DBUAD885/88AD3/89QAMmQMf7iouJT0JdwGXhC/xfpsQ5+4bEiAFAAAE/wEvJTzk7hYWgwmAAPpA +CBXgDBUAWCP+ixCOES8hCS0gByghIikhJP3cNgWg3REA54gCDuqCgAANmQIMmQKZoIwgnqX/QGYV +4A0lAOimAi5mAoAADcwC7KYBJWhhAADkABUFUIEAAA0AiiggBxnuCwgoQAqIEAmIApigjiD3QEYV +4B+FAJ+j/cAAFzAPNQDv7gIFYEEAAO6mASHIIQAACUCIDAiKCSCIDASKCQCI7IMeBUihAAAEAIkJ +AIoa7eQMaRGqmSuWnQULR/lgBoFQCgUALCEoiyKwzPxExBXvzAEA7CUoJfAYgADIxH23aX3LZoon +x8MMuwHrJgIlUMEAAFiPjuPt5hUBEYAAKKAAA4gKiIzsoActWASAAPpAaB2gDUUAC4AAZa/hiSfK +lSqZFMqqipnJrCigAAOICoiM7KAHLVgEgAD6QGgdoA01AAuAAGWv4cAg0Q/SoNEPAAD//0gNoAoF +AIki+iAGFe/6NQB6kDpkv1AFC0doskrAINEPAAAAAAAA6iQACtgEgABYi1jSoNEPAP/4PA2gCgUA +iifqrDAp2ASAAFiPQ2P/I+okAANYYQAA/CAIFeAMFQBYkAqLEGP/rACKJ9sw7BICJVDBAABYh83A +INEPbBAILCIPLyAHKCE2hzf+Q0QVp9UBAPm/wBXgCxUA6bk5CbAEgADrIgkqUASAAPgghhXgBBUA +6Hc2D0/CgAD3IlIN4f8BAAsJQvEgcA3ijgEAZIJvwbTsex8OlHQAACwhKekhJyZgBQAADAxPLCUp +/SAVC6IAnQAsIAX7gBNlYgCdAI0i+iAGFa/7NQD9YA5A4gCdACgiGo4y+cAU/SIAnQApMggY7Xgc +7XTkkilv34KAAJoQmBGsu+jtbxVIDQAAmRPrFgIvpwKAAKhE9eANAhIAnQCLEypCnvtAGzviAJ0A +ihIpQp0qosMKmQHulAAEkqGAAIwpiyoMBT4Muwz1YAnb4gCdAC0aAPWh8g3g+PUAKyAW+WAZpSIA +nQAsISIZ7WooIQcqISQrIQn8QPAV6ogBAOmqAgxDAoAACLsCGe1jGO1VDS1A6cwCDuqCgAAI3QKd +4IkgnOKa5PvAZhXgClUA6+1bHM4CgAAKmQKZ4YgvmOUsIDj3wQYV4A0FAP3A5hXgCiUA/dqmBeBJ +JQD4wIgVoMwZAAyaOZjpDNs5jWWd6h3tTfzAyBWgCQUA7OYLI4fhgAAKnBANzAKc7IwRiWiX75nu +iGko5hCNai3mEewAFQdJIQAACQCKiGf44AvjogCdAB/tMwq9Ag/dAp3mwMX8k6YVoQkFAPUh8g3g ++PUAKyAW+WATxSIAnQAsIhqKKSshKSkgOOWqCAZgBQAA7CYaJdv9AAArJSmaKfMgD8eSAJ0AixRl +sfbAINEPnxWfFp4X6iQACtgEgABYjBuOF+8SBSV1kYAAjBRlz9uKJ9sw7BIAJVDBAABYhzHAINEP +Gu0Diqj3QBDAkgCdAIwTK0Ke/WARe6IAnQCLEilCnSuywx3s+guZAeSSG2Vj/QAAnNjulAAM8nYA +AGAAliggOfEf+A4SAJ0A//vkDaAJFQAAAAAA85/sYFIAnQAJ5wz2/YAV7/YGAIk3ZJ3V8ADYDaAK +FQAAAAAAAADBs3vJFCwgOpoQ/iDGFeAN9QD9gBC9YgCdAOokAArYBIAAWIqC0qDRDwDBrYw3KyEJ +jTiOMuuvEQ3dAoAAD7sC5LsCCVAEgABYimjAINEPAAAA//9YDaAahQDqJAAH2GEAAPwgaBXgDBUA +WI8uY/79AAAKuAKY5sDV/JOmFeEMBQB1yw0rIBYpCv/5YA41YgCdAIoUZKFdi2qMZ4ppq3sHzAyc +Z/dg0g3gDgUAsaqMZZtqi2aaaazqq3t3uwGxqo4pm2aaZS0gOKXuninzoAo3kgCdAIknKJkUyoGL +mcm9Gey+KLAAnxWfFgmICoiMLLAH+kBoHaANNQALgACPFYsix6P7X/JI4gCdACghNodnLiEaii+L +Keh3Ng9nwoAAd8sKCwlCyJQOC0JksLXB1Pr+AA6wDBUA/CCGFa/yogDaIFiIRmP+A4on6qwwK1gE +gABYjijSoNEPAAAA//KQDaAJBQCfFSogB58Wnhf6IAAFMAwFAFiLdo4X7xIFLWW2AADqJAAH2EkA +APwAIh2gDQUAWI7lY/3XKiAH/KBoHaGqAQBYi0Fj/XqfFf4gxhXgCgUAWc/jGux3iqiPFflf7qCS +AJ0A//fEDaAJBQDAkBzsccC6C6s0+4EGFe/3fgAAAAAAAPNf+jBSAJ0ACecM9v2AFe/87gCKJ58V +7xYGKdgEgADsEgAlUMEAAFiGj9ag/iCoFe/6FgCfFe8WBilQBIAAWIgO/iCoFe/6tgAAAMFT+kBo +HaALBQD8AAIdoA01AFiAkCsgBY8WihD1f9pdYgCdAGP9GSogB58Vnxb8oGgdoaoBAFiLEP4gqBXv ++KIAbBAOiC8nIAUuITYpIAeVHPIhZhXgBhUA8oBoHedFAQDtEgsie/kAAA9vOZ8dLyEajNScE+3Q +AS6oBIAA/4EADjGZAQDuIgkvt8KAAPzCUg2grTEADg5C8cBwDeJvAQBkZGnB9AjPjf7gJc1iAJ0A +jiIPAgD1xswN4A+FACwWAfOgIZcSAJ0AmRCZGZoS5uwkEcANAACYGujsIRz/goAApv/vFggs5wKA +AKjM7BYOIegFAACGGZ0Xih70wAYiEgCdAIsaKqKehhgvEg77QAlr4gCdACZiwy/ynQb/AWT0ahns +EYmY9yAI4JIAnQAqgq7k7A4VCbGAAC6CrSRCfxfsCQTrAesWBCSz/QAA9cAI9iIAnQCWePXAIN4i +AJ0AiimJKgwEPgqZDPUgCLuiAJ0AKxoA9WHyDaD89QArIBb9YAkFIgCdAI4RKiA4/AgCHaAHBQD3 +4OYV4QkFAPagiBWgqhkA6pc5C9gEgAAKyzmbFZcW98ASEqIAnQCLHWSx2WABARnr6ImYapEyih6L +GowYKqKeLMLDe6NGix4rsp0MuwGbFI4U6uvgFLP9AADv5AAHAcmAAJaoZf8lYAON/CHmFeAKBQBZ +z0IZ69eJmBjr1O0SDySO2wAA//9sDaAPBQDAoPoghhWv/vYAHOvOwLoLmzT7gQYV7/8GAAAAAP/7 +cA2gDwUAnR/+IgYV4AoFAFnPMBnrxC8SEImYjR8Y68D5P/ZQkgCdAGADCsCgmhSLFB7rvcDKDJw0 +7OYILfcWAABgAvGdHy8WEOokAApYBIAAWIrELxIQ7RIPJXaxgABgAn4AKiAHnR8vFhD6IAAFMAwF +AFiKmy8SEO0SDy12VgAAYAQMAJ0f/CAoFa+JBQDpJDsiuEEAAOcDHgewgQAABgJhjlec+IZUiVau +zgxmDJZUfOsH7RYPJMgFAACeV4YWjhWZVgbuAhbrrIwR7SIPKVAEgADm7gIK2ASAAFiJO40fGOuP +iR77M6YVoQcFAHR7DSsgFioK//tgBC0iAJ0AiikrIDikquomCSgECoAA82AEP5IAnQAvITaMVC4h +Gokv78w2D1/CgAB8uwoKCkLIpA4GQmRgdPwgJhWgH0UA+Z4AD/ALFQD6IaYV4Ao1APohhhWv9Y4A +AAAAAJ0fiicvFhCLG+qsICngBIAAWIW27xIQLSgEgAD8IegV7/wuAAAAKiAH/IBoHaGqAQBYiisY +62T8IegV7/2qANogWIcUGOtgjR/6QSgVr/2+AHGehwrsDP2dgBWv/gYAHOtjGOtnixKOFfoAIh2g +CQUAC6k4B+4CGutc99bSBeAGBQAJhjkG7gKGHRvrXun8ICLAQQAA5+4CCwueAAAmIAeFUAYmQOtV +AQsygoAABlUCClUCKiEHKyEiJyEJ9kHoFaqqAQDsuwINUwKAAAp3AiohJJXwhSCX85vy9+CmFaO+ +AQDu9gYt2gKAAAuqAur2BCquAoAA5dUCAdP9AADl9gEhjDUAAG2pBQgAhgkCYYgeJxIH9xOmFeEG +BQD0wfINoPn1ACsgFvlgCqViAJ0AKiAUo6oKCkcqJBT1QAh90gCdAMhPjCkrIDikzJwp82AJJ5IA +nQCNHWXRAMAg0Q8mIShka8sP6AL4QEYVoACKAAAAAAAAAPMf3JBSAJ0ADvwM/Z2AFa/uHgCEHAQE +R2hCFYYTiFTAkQaWOQhmKPaghhWgAgUA0Q+KJ4sb6qwgKeAEgABYhU6LE4ykwNEL2zkMuyj7QIYV +4AIFANEPAADrEgwpUASAAFiIpNKg0Q8A+kBoHaAbxQD8ACIdoA0VAFiNXGP/lIsQ+kBoHaAMFQDt +Egol2GEAAFiNVmP/fAAAJiA7DwIADwIAZGB4/CAoFa+KBQAqJDsIIIYJAmPs9ggq2ASAAO0iDylQ +BIAAWIiN+iDmFaALBQD6R2Yd7/saAOsSBClQBIAAWAVTY/7miifrNAAJ6ASAAPtEABWgDAUAWIB1 +0qDRDwDaIFiGh2P+1wAAKiAH/IBoHaGqAQBYiZVj/p4AACMWEichB4NQJSAH9kEkFap3AQDrMwEL +uwKAAPpA6BXgVREA52YCCqqCgAAFMwIKMwIqISKHLyWxFQyqAiwhJJPwgyCa8pf1lvPu9gYpngKA +APOmAAnz3gEA4/YBLuoCgADtzAIF2IEAAP3ghhWvzAUADLsBq13jEhIm6QEAAO2LQXxgBIAAsDgM +hhGmxnbTOvR/70iSAJ0AbYkFDECGCQJlY/3YAACLEPpAaB2gDBUA+2JAFeANBQBYjQVj/jcAAAAA +APUPAA5//v4ADN0MDUgUbYkFDGCGCQJn794IBckBAADoPAwHQIEAAPWf7HiSAJ0AsM9t+QUJgIYI +Amlj/XwAAABsEAYoIAUjIAckCgP9D0BEUTMBACggImSAbwIqAlh+MP1MwIDQDRUALCAhGOqBDwIA +7DMRBn1WgACoMykyng8CAG6TRSsynWSwP/pACBWg/uUADs4B/cYADvAPBQD8RCYd4AkFAPggBhXg +DAUA+CAmFeAOlQD4IEYV4A0FAFiEgfRzphWgAgUA0Q/AINEPAABsEAoqIAX4QPAV4AwVAPhgaB2n +tQEA6BYAJdv5AADryzkKGASAAOsWBSwgBIAA/UHABFGZAQDBw/1AH2UiAJ0AjSLv6lgem3YAAOvq +VRGwEQAA5hYELPeCgACv7u4WAyzXAoAAq6rqFgcswASAAIcX9QAEIhIAnQCKFCdynoYTjxf64Adb +ogCdACZiwy/ynQb/Ae8WBieZUYAAJSEbikKHKYYqBaU29U8ADnELBQB8swHVoJgaB2YM9MAF4+IA +nQAqGgD1QjIN4Pz1ACsgFpga/WAF9SIAnQCKQvqgDlKiAJ0AG+pJh0MLdwGLFegWCiWJCYAAYAC4 +ABrqLIqo6BYKJQzfgACLF4wUhhMrsp6PFyZiw3yzQy/ynRzqIwb/AeTwOWVb/QAAm8jvFgYv+24A +AGACiwAAAAD4IWYV4AoFAFnNhBrqGYqoiRvoEgolDt8AAP//TA2gDwUAwPAc6hPAugurNPuBBhXv +/wYAAAAAAP/8eA2gDwUAmRvqJAAK2ASAAFiJGIkb6BIKJXmpgABgAiEqIAeZG/ojAAUwDAUAWIjx +iRvoEgoteYYAAGADAADw4ARAUgCdAC0hGowplxj4IUYVou0BAOkWCy8DzgAAlxj4IUYVouwBAOkW +CycDOYAAmBrpFgsu/8KAAHX7VQ7VDPnUDAWgt+kA5kIDLdyCgAALeQKZGAhmAfaAZhWgAN4AiieZ +G4sQ6qwgKeAEgABYhCqJG/ghSBWgCyUA66QCLSAEgADqogIjhgKAAIwplxiYGpkbjhiPFuWtDApY +BIAA5cwICVAEgADtRgIq6ASAAOwmCSngBIAAWIRGiBqJG48X+/OmFaEOBQB16wgrIBYmCv92uQrA +ofogphWv944AACogB/ygaB2hqhkAWIiIiRv4IUgVr/+GAI8pGOnZiRal/58pjEOLQI0V58QABMiB +AAD8DgAFN+sBAO4WAS6ITgAAJyAHBwdBCHcKJ3Kh7q0QDVPCgADtqgICQEEAAOp3AQHT/QAA58cC +AYw9AABtqQUIAIYJAmGLQMCAmBIZ6cUa6cMvIRqGFh7pwCQhBxjpvfwgKBWh1zEA/6AARrpEAQDt +0IAqJwKAAOzMDyZwQQAA+IYACjTMHQDkZgAmYAUAAAw8DBTpmQ1dDIggn2aXZ55jnWUMpDkJiQLp +ZgQsRgKAAORmAiHQBQAACKgCmGEmIBTjZggNIASAAOYkFCWp+oAAiBf1E6YVoQcFAPTh8g3g+fUA +KyAW+WAExWIAnQCIEtKA0Q+KFWSgnMAg0Q8AAADqJAAE2GEAAPwgiBXgDBUAWIvaY//diif8ISYV +p9tBAOqsICgECoAA9aAEYdIAnQCMFisKAezMICnoBIAAWH8ImhL6gAgV7/waAACLFuxNEQlQBIAA +/WAARfAMFQBYfNr0gGAVr/22AGW8FPlf4IjSAJ0ALyAg8f/gN5IAnQBj/3cAKiAH/KBoHaGqGQBY +iBuIEtKA0Q+KJ9ww6xIAJVCBAABYg5nAsvtARh3gAgUA0Q8AAAAAAAAA6zQADjgEgAD8YGgd4AwF +AFh+5dtA7DQACugEgADqFgIr8ASAAO8SBilQBIAAWIO3+oAIFe/7SgArIAfaIPojAAXwDBUA+2JA +FeANBQBYi51j/ugAbBAIkhSTFRnpR4hA+CBGFa/LBQDrKgECcCEAAPogZhWniEEA5IG8YlARAACP +Ey0hBamMLMAAr98EzAvv/EAuWASAAP+ADWriAJ0A+iAmFaBoAQD+ACId4A0FAAb9OAvfC+vdCgfY +IQAAghWeEPkAAEVwDCUA8kEAFeAPBQDyQIAVoAIaAAAAAI0UDlUM/+AgFaADBQDv5AAEQAUAAPEN +8A3gfgEAhhMioAAt0QUEIgvm1ggJWASAAOIWBiMxAQAA9kAGQqIAnQAIBkDyACIdoA0FAAYtOAvS +C+vdCgFYIQAA9yAQFaACFQAHIziHFQdmCxfpGac3J3CgBjIKBjML7HwIAZghAACO0AsAiQXuNp4g +AwCLgtDqrAEkyAUAAPRf+zPiAJ0ABSkMDioM+6AGFaAHFQD1YCgV4AYFAAl2OKhogrCl5ZWxflsB +sSLitgAmfRKAABbpAosSHukB5rYBB5AFAAAGIgKGFe67AQxuAoAADbsCkmD6gAYV4SwdANEPixD8 +ICgV7/1uAAAA/E8ADf/84gCFFRno0wXFC/gAChXgAgUAsSLlgx4JD+gAAB3o64YSGujr7W0BB9gF +AAANuwKNFepmAQxOAoAACWYC69YAJhAFAAD2gAYVoSIdANEPAAAAAOoWAS1oBIAA+8BoHe/55gD9 +jwAN//lOAGwQDPhASBWgCgUA6yAHKcgEgADygGgd58UBAP2fwBWgBBUA7Ew5DLgEgAD8ISYVobsB +APMbXA3gDAUAmhacFZkTmxSbGxjoph3oyR/opBXoouboxR33goAAr+4uFgouIBbmFggtpwKAAPSA +AEJw//UAf+ETAioCWDKyGOiZHei76hYIJSohgABgABcAAGZjy/jAHyiQ+vUAKSAW+yAZTSIAnQCJ +iPcgBhCSAJ0AK1KuHOiNZLDRLMJ/K1KtDLsBZLDHsJmZiBzoqmSzSyzAgCzMN/4haBWkzB0ArDzr +FgImYB0AAPXABYISAJ0ALkKe/cAIK6IAnQCMGitCnSzCwwy7AesWACWZUYAAKnEMiXeZEf1ADqxi +AJ0ALHAQ63IDJglBgAD5n/so0gCdAC5yA2Tg0I8WZfGwhhGPGI0U7hIAKVAEgADm/zYL2ASAAO8W +ASngBIAAWDBmGOhiHeiE568ubTAEgABgAvIAAMCgWcvHGOhciYgd6H35P/mIkgCdAP/9CA2gCwUA +wLDAqgqZNPkBBhXv/M4AAGqRJCtCnnyzQYwaK0KdLMLDDLsB5LA1ZPP9AAD/AQYVr/0qAAAAAAD8 +IaYVoAoFAFnLsBjoRYmIHehn7BINJI8TAAD//IwNoAsFAMCwwPoPnzT/AQYV7/xSAAAAAAAAAP/8 +GA2gCwUAAAAAihjAsZsW+V/5KuIAnQDA4J4W+V/4yuIAnQDrdAAJUASAAO0SCSngBIAAWDCi/gAi +HeAHFQDnFgktOASAAP9AZhXv+7oAZLBJjxX+ACIdoAwFAA/sOGTAjIgRhhjqJAAL2ASAAO0SBCng +BIAA6GY2CPAEgADmFgEg+BEAAFgxMOjoFx0wBIAA/dBwBe/3/gAAAACLGA8CAA8CAPlhNg3gDAUA +eaMBwMH4ACId4A4FAAyeOOwWBSd8kYAA63QACVAEgADtEgkp4ASAAFgxzvdAaB3gCxUA+iEmFeAK +FQD64GYVr/2eAIsQFegaKiEHiXAc6Bb/z/wF6qoBAP9AABU4mQEA7KoCBMA9AAD8ISgVpIgdAOq2 +ACRACQAACDgMjiCZs+hfOQGz/QAA77YCL3YCgADubgIFqEEAAO62AS4O5gAAiBPojCAhlFUAAOo8 +/irIBIAAbakFCACGCQJhKzz+DLsRq1ubECggFCwgBKOI9YAImRIAnQAICUcpJBT1IAouUgCdAIhy +KCYZiXHoFgctqASAAPMgCjBSAJ0A8TX4DeAHBQCnZiZGnSogFisK/3uhCusSASlQBIAAWDWYjBll +wOPAINEP6xIBKVAEgABYNZMuIBYY58L9z8gF4P/1AP/f5RxiAJ0AY/yHiBllj9IqcBDbcPxgaB2g +CRUA+1/gFaANBQDqnTgJUASAAFgvf8Ag0Q8AAAD6QGgdoBvFAPwAIh2gDRUAWIoSY/+9AAAd59At +0IDrEgQm6N0AAPpAaB2k3R0A/GAARvAMFQDt3Acl2GEAAFiKB2P/jy4gFi8K///f+vRiAJ0A6xIB +KVAEgABYNWvAINEPixAMbBGsu/ogBhXv+5YAKCQUjXDxv/i6kgCdAPpAaB2gDAUAWHsI9sBgFa/8 +EgCKJ+s0AAnoBIAA+0QAFaAMBQBYfSfSoNEPAAAAAAAAAOsSAilQBIAAWAH5+iAIFe/6wgAAAAAA +AOokAAxgBIAAWAN1iBeJcZoc56QADV8CgADrVQgE9U2AAOtUAAlQBIAA/QBoHeAMBQBYAzn3QABD +//o6AIon/KBoHaALJQDqrCAp6ASAAFgxpStwEPl/8TjSAJ0AKXAVCQhFZI4ZK3EJHOeJKnEML3AR +jicMqgyr/w+ICf3CpBWvzQUA7uwgJHiJAADt7gEEQEkAAAr4Oah9rs7u7EAm6IEAAO7bYn7QBIAA +DuowG+d5LaEB/UAEFaH5MQAL/worIhTv8qEuZAKAAAzdAgvuDA/uLK7dqF79wCQd792BAP3ABB3v +9nYAAAArIAfaIPojAAXwDBUA+2JAFeANBQBYiaVj/ggAAAAAAP2vAA0//noAbBAEIyAAJArtdDEG +IiEDvCLRD4QhhiDyQGgVoAglAPdkAAKwlHEA+Q8ADHM2AQD0YABB82aBAOXnVBwBCoAAAGYa9mAB +Ab1EAQDlIgEBqDkAAOUiDAGYaQAABCQsBDMooyLRD2wQCIoiJyAHiTCVFfhC0BWhdwEA8V1MDeiZ +AQD4ICYV4Pz1AHyBHQULR/t/wBXgCRUA65s5CVAEgABYNQ/zUwAN4Pz1ABrnEYioFucO9wANmJIA +nQAuYq4Z5w5k4dspkn8lYq0JVQFkUdEojP8opgjpVAACjYGAABvnKSWwgO3nAhKo3QAA+CAGFeRV +HQDlRQgLzwKAAOaZCAKoDQAA9OAIkhIAnQAokp71ABM74gCdACWSnQ14CiiCwwhVAWRRiCkgFv0j +Jg2g69UAKjAQ+0ASVGIAnQArMQu8u9ogWDS7KCAULCAEpIj1gAxBF5gBACkkFPUgDi5SAJ0AihUe +5wCNESghBxzm5Rnm/P+h4BXqiAEA/wAAFDT/HQDpiAIH+AUAAA9PDJhQiyAP7Dn8oGYV56oBAOxW +Ai3eAoAA60sCAshBAADrVgEhwEEAAPlACXFSAJ0A6EENYlP9AABtqQUIAIYJAmHAgJgU6SAEIlv9 +AAAMuxGrW/UgCQkSAJ0AiDIoJhnpMgEl2EEAAJsTKBYC8yAJuFAFBQBmkVClTIgUDH0Rpt3s1p0s +EASAANEPAAAAAAD3AA6gkgCdAAx5EaaZLpKe9cAPE+IAnQAlkp0NeworssMLVQFkUdCwjZ2oZV7d +YABjAAAAAAAAAOokAAnYBIAA7RIFKmAEgABYgo/SoNEPAMCgWcoMGuagiKj5H/IYkPz1AP/5WA2g +BQUAAAAAAAAA+kBoHaAbxQD8ACIdoA0VAFiI+mP/scBQwOoOiDT5QQYVr/iuAB3mtC3QgC3cN/rj +ABXk3R0A7U0ICVAEgAD9oGAV4AwVAFiI7WP/ewAAAAD4QoYdr/oOAAAAAIon/SBoHaALFQDqrCAq +aASAAFh8HPoghhWv+0oAizDzYAi6kgCdAOISBCvnAoAApswkxp3RDwAAAAAAAADrEgApUASAAFgA +52P+MAAA6iQADGAEgABYAmWJMYsTiBLsrBENKASAAOy7CAT1nYAA2iD9AGgd4AwFAFgCK4gUpaWl +TAx9Eabd7NadLBAEgADRDwAAAAAA//aUDaAFBQCNNYw0HuaB+mDoFeAJJQD8cAAHsK1xAPsvAAy7 +jCEA+yAEANPMAQDozAgP+AqAAP+AAQZ93QEA7rsBBnA5AADuuwwGYGkAAA29LA3MKP1gAEW/9boA +KyAH2iD6IwAF8AwVAPtiQBXgDQUAWIimY/5fwKBZyaoa5j6IqB3mPPkf8PiQ/PUA//joDaAFBQAA +wFDA2g2NNP1BBhXv+KoAsEsMuxHrWwgJUASAAPtiABXgDAUAWHmns0ziEgQr7wKAAKbdLNad0Q8A +AGwQBIk3F+ZPKzAW+cyMBaMqBQAKKigLtgnoqAgLNwKAAKhm52cICQEKgAD0+GgVoAwVAODNGgMz +UwAA7nLEIzIBAADmQRZ0wCEAAIsymOCek5aSDbsCKHbEmzLRDx/mOq+vKfLBALEE7fLFLnAKgAAO +mQL5+CYV7/71AA7dAw2ZAR7mMuVyxClvAoAArt2Z0I8ymFDmhgApAQqAAOWGAS4gCoAABP8CKHbE +nzLRDwAAbBAKGeYnCSkKKJJ/4hYIKVAEgAD7AAQA0AYVAOYWCisoCoAA+CCGFeBVTQDi5h4RY7kA +ABvmEPnL3AWjLQUA7aooDT8CgAApkn+cFRzmF6h36HK5JMv9AAD9QABCM5kBAJkZ5EKhJmIRAACs +rJwXq6r6IMYVoGMFAPiABAIwAG4AAIoawLD9/+IdoGMFAOxVAwUDCYAAmxotcrgEXgEO3QGdEAEA +hwM2YGg+1YoYixeNFfggyBWv//UA4zkJAfKBAADuFgkszwKAAOmICA8BCoAA4ogIBGMLAADogqEr +SAqAAA+ZA+lEAQZiAQAAC4AAY/+kihmLFLGqCgpDKrZ/0Q8AAABsEAQb5ekqIgAPAgArsn8e5ef7 +TwANcy8FAA+vKA7+CCniwyjiwv3LxAXv+/UAC5kD6YsBDWcCgAD9gABGf/T1AP2ACBWgAxUA+Q7g +HeANBQAZ5dgY5cf5AABGfywBAOz8CAX9RIAAyykI6jApwsMv4sQJiAzo+xN+gQqAAC/iwgA4GgSI +Awj/AS/mwv2gIBXhux0A5LAsZmDBAAB/txRj/8QAAAnqMPmYZhXv/4YAAAAAAAD9oCAV4bsdAOW/ +3GZgwQAAWDVmwCDRDwBsEAQmIQn4QpAV7/gFACcgFeiYAQs2AoAA6JkMC7kCgAAHZgL4QoYd4AcF +ACc0APhgZh2gBBUABGYCljEV5XkkVq3RDwAAAABsEAQW5agV5YPTD6YiBTUCJSaAJCKAZ0ALbQgF +KCKAZ4ACY//z0Q8AbBAEE+WfIjaKY//8AAAAAGwQBCggBSUgB4o19f+iHaADJQD9AWAR0VUBAMAg +0Q8AAACIKRnllJor+wAH3CIAnQAJWQkpnQIrkQgpkQQa5Wf7IARj4gCdAIsiDwIAe6h/2iBYeOyL +Ig8CAAO6AWSvuoonBLsB6yYCJVDBAABYhwfj5WAVARGAACigAAOICoiM7KAHLVgEgAD6QGgdoA1F +AAuAAGWv4YknZJ9/KpkUyqaKmWSvdSigAAOICoiM7KAHLVgEgAD6QGgdoA01AAuAAGWv4WP/VAAA +//9YDaAKBQDaIFh43ysgIuq7DAlQBIAAWHor2lD6ACId4AwFAFh75IsiA7oB83/7JmIAnQAtIAcE +vAGcIvOf+JARvQEA67wfKVAEgAD8ACIdoA0FAFiHh8Ag0Q8AAAAA6yAiKVAEgABYehcqIAXB436h +DGioKYsi82AEBX/8ZgAvIDrAj3j56vpAaB2gCwUA/AACHaANJQBYeU1j/9cAAPpAaB2gCwUA/AAC +HaANJQBYeMVj/78AAGwQCogrHeUuLiAhizf8YMgVoP/lAA/uAS4kIQ3MAQy7DOuJCHjIBIAAwCDR +DwMAhgkCYZsVKCAFJSAHx034IQYV4AMlAP0cAEHRVQEAiimbK/tAB9xiAJ0AG+UmC1sJK70CLLEI +K7EEGuT9/WAES6IAnQCMInyof9ogWHiCiyIPAgADugFkr6CKJwS7AesmAiVQwQAAWIad4+T2FQER +gAAooAADiAqIjOygBy1YBIAA+kBoHaANRQALgABlr+GJJ2SfZSqZFMqmiplkr1sooAADiAqIjOyg +By1YBIAA+kBoHaANNQALgABlr+Fj/zoAAP//WA2gCgUA2iBYeHUrICLquwwJUASAAFh5wdpQ+gAi +HeAMBQBYe3qLIgO6AfN/+yZiAJ0ALSAHBLwBnCLzn/fAEb0BAOu8HylQBIAA/AAiHaANBQBYhx3A +INEPAAAAAOsgIilQBIAAWHmtKiAFweN+oQxoqCmLIvNgBAV//GYALyA6wI94+er6QGgdoAsFAPwA +Ah2gDSUAWHjjY//XAAD6QGgdoAsFAPwAAh2gDSUAWHhbY/+/AABsEAQc5NMrMgQpMBb9YAQFtZkd +APUgCACSAJ0A6uTOFIiBgAD/yZoFr/3lAOTkpxSktQAALKF+aZUdfLMKKswE+2AIo6IAnQArIAaw +uwsLR+skBiWCwYAAwCDRDwAsoX7sswx2eBEAAP9gB+PiAJ0AKCAGsIgICEfoJAYsfuYAAIkniyIq +mRQNuwGbIouZZKC2KLAABIgKiIzaIP1g8BWgDTUAC4AAwCDRDwAAiyKKJw27AesmAiVQwQAAWIYq +yawooAAEiAqIjOygBy1YBIAA+kBoHaANRQALgABlr+GJJ9MPZJ9yKpkUZKBkiplkr2cooAAEiAqI +jOygBy1YBIAA+kBoHaANNQALgABlr+Fj/0YAAAAAAAAA6iQACdgEgADsRAAK6ASAAFh5a8Ag0Q8A +6iQACdgEgADsRAAK6ASAAFv/RcAg0Q8A//0UDaALBQD//mQNoAoFAIg3IuJ/CYgR+EAAQT/7kgCI +NyLifwmIEfhAAEE/+/IAbBAEGuRgKKLfZIALCeowK6LgC5kMZ5AB0Q9Ye5PRDwBsEAQe5HAnIAcd +5Ej9yHYFoPcRAA/tOZ0wiSD+QQQV4AslAPxgRhWgGgUA6jYDLM4CgAD7JgAMcXcBAPhgJhWgLgUA +5iBsK7wCgAD35gAP8Ao1APsmAA4wDQUA6ORbE3EogAAb5FomIQidNZwxnjMc5FgHbwIL/wIrIQmc +Np80BLsCIiAHnTmVO/lmAA2xIgEA6zYKKRQCgAACYgIIIgLiNggtEASAANEPLiEJCP8CnTWVN580 +BO4CCO4C7jYGLZAEgADRDwAAAGwQBBjkKx7kPSwgBx3kFhnkP/pBBBXg/BEA/80ADvHMAQDtNgAu +ZAKAAAy7Agm7AuOAgCmwBIAAHeP+/EAIFaAOBQCeZe1mAiG43QAA+sCGFeR3HQDqfP8uZgKAAOx8 +Ag1XAoAA7GYBJVPhAACaYwIEiZlmk2cGIIvlIQkkQ/cAAPTBZhWkMx0A5WYKK5AEgADoAAUDKMEA +AG05AgUCYdEPAAAAAAAAAGwQBh3kGQsrEa2zKjJ/+UAIFaAEBQD5oEAl4AYVAOfd5CTLgQAA6bkI +BAGxgAAsMngvMnv5gAVsYgCdAGXxEiw2fCsyeSs2e91ADeQWAQIAlKAN5BYsCgn8QAXEIgCdAC8y +e8HA7eQBF4N5gAAiMnwqIQSOIPPh/g2mugEAJDZ89G9mFaAAHgAuNnztrwEFw/0AAAj/Au8lBCWM +WQAAIjJ8sMzvMnshAPGAAMnGY/+/2iBYe65loL8qIQT/QSAMFpoBAMiZ0Q8A2iBYe6HRDwDaIFh7 +Y9EPAPpAaB2gCwUAWHwz0Q8uLPjq0ogvAQqAAPzAAQXf/PUADLsDC6oBKtaIWcx8JDZ8JDZ7+m/o +Fa/86gAAABXjmS9QWGTwalnCYVh7Fihy39MPyIFYeuspUFhknyxYeuXIrhXjzixSa7DM7FZrJgLJ +gABYem5j/xEAAAAAHOPI/m+IFaAKVQD8b0gV4AtFAO0WACFr5QAAWcmQ+m/oFa/7OgAuMnviNnwv +ejYAACI2e9EPH+O8L/KucfaL9qsGHa/+IgAAAAAAWcIo+q1mFa/+kgBsEAQU47QZ47To45AZXsKA +AKS0I0J/qYjouAgBgiGAACoyAHipAipCexzjpisxBCpGfwy6Aeo1BCnQBIAAWHthzqkpMQT/IQAM +FtkBAMjX0Q/aMFh7VdEP2jBYexfRDwD6QGgdoAsFAFh759EPI0Z/0Q8AAGwQBPBg8A3v+fUAiCIJ +OQMJiAEoJgKKJw8CAA8CACqsMFiFB+PjYBUBEYAAKKAAA4gKiIzsoActWASAAPpAaB2gDUUAC4AA +Za/hiSfTD8uSKpkUyqWKmcmsKKAAA4gKiIzsoActWASAAPpAaB2gDTUAC4AAZa/h0Q8AAAD//1wN +oAoFANEPAABsEAgd41Mb43cU4zD3xuoFoBjFAOMs6CXTgQAA+EANzCczAQAMNRGkVehSnilmwoAA +psQpQH/5ABBT4gCdAChSnWSB/5sR6gseDUgEgACZEAoghgsCZQsCYw0AhwkCYQkCYe3HCAkBCoAA +/8a+BeAOFQDj4yofcAqAAJ4Tr8/+IIYV7//1AP/XAA9wBkUA/iBGFaAAwgAAAAAAipnJrCigAAOI +CoiM7KAHLVgEgAD6QGgdoA01AAuAAGWv4SlCIGSQ7y1AfCxAfR7jSQ3bCQe7Cu7eCAXYYwAAirIu +4IBkoTj9x/4NoAgVAC8KAA2POA//CQf/Ci/9GC/8nC/yGywKAQzcA/HhIA3nzAEADMsJB7sK7ER8 +JdhjAADA0PyPph3gDAUAjbDvUp4m8/8AAC7g///gBHuiAJ0AL1Kd9t/gFaD49QDx58AN52YBAHhh +dOoSBCZABQAA6ER9JuPhAABYeuSJE9Kg6xICJIBpgAAqogILqgEqJgKKJyqsMFiEjsmsKKAAA4gK +iIzsoActWASAAPpAaB2gDUUAC4AAZa/hiSdknxcqmRRlru//+7gNoAoFAIwRixAMgIYMYIYLAmkL +AmfRD48RjRAuRH8PwIYPoIYNAm0NAmvRD5sR6gceDUAEgACYEAoAhgsCYwsCYQ3ghwgCb+jsAAnQ +BIAAWcGJZK+v7eLTGa8CgADkVQgJZsKAAPeAAEI/+TIAwLH7twAN8AwFAPyPph2nuwEAK0R8C7sJ +92ABBfAMBQD7YwAl7/uaAAAAC2CGC0CGCgJnCgJl0Q8AAGwQBBjinQIDRwwzEagzKzKEGeKtKLAA +irEJiAoKIYwCCj6IjAMCPvxAaB2gDSUAC4AAIjaE0Q8AbBAEFOKPAgNHDDMRpDMkMoSKQSZAAChA +CPqYaB2gqSUAAgU+AwI+eYElGOKZCGgKiIzqVAAKWASAAPxAaB2gDSUAC4AAIjaE0Q8AAAAAAADr +JAAKUASAAFh6q/NAaB2v/y4AAAAAAABsEARZxQcS4nQT4pQMAgApIoIJGo4DqAqIhAuAAGP/62wQ +BBPipCMxfqIy0Q8AAAAS4rMD6DAE7jAFsTCTIJQhlSIS4q8T4nOEIAQzApMgEuKtwDqEIAQzApMg +EuKrwDAoN0AoN0QoN0goN0wjPQFyM+0S4qbAMJMgxy8T4qUDIwMS4qSEIAQ0AZQgEuKjhCAENAGU +IBLioYQgBDQBlCAS4qCEIAQ0AZQgxy/AMQMjAxLinYQgBDQBlCBj//wAAAAS4pqDIAMTFA8zEZMg +EuKXwDAjJgBX/9YQ4paRAJIBkwKUAwQCMJQEBAAwlAUEATCUBhHikIIQAeowohEB8DHAQATkFgAC +ABHijIIQIxoAAyICkhAR4orAIZIQBOQxhAYEATGEBQQAMYQEBAIxhAODAoIBgQAA0jABIwAAEOKB +kQCSAZMClAMEAjCUBAQAMJQFBAEwlAYR4nuCEAHqMKIRAfExwEAE5BYAAgAR4nOCECMqAAMiApIQ +EeJ0wCGSEATkMYQGBAExhAUEADGEBAQCMYQDgwKCAYEAANMwATMAABDia5EAkgGTApQDBAIwlAQE +ADCUBQQBMJQGEeJlghAB6jCiEQHyMcBABOQWAAIAEeJaghAjSgADIgKSEBHiXsAhkhAE5DGEBgQB +MYQFBAAxhAQEAjGEA4MCggGBAADUMAFDAAAAXJQBXZQCXpQDX5QAQwAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFyQAV2QAl6QA1+QAFMAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACclAAdkAGdlAKelAOflAQI +lAUJlAYKlAcLlABDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnJABnZACnpAH +HZADn5AEeJAFeZAGepAHe5AAUwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANyU +AB2QAd2UAt6UA9+UBASUBQWUBgaUBweUCAiUCQmUCgqUCwuUAEMAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAADckAHdkALekAsdkAPfkAS0kAW1kAa2kAe3kAi4kAm5kAq6kAu7kABTAAAAH//8wADSMRD/ +/goAAAAAAB///SQA0zEQ//4KAAAAAAAf//2IANQxEP/+CgAAAAAAAPQwCgAAAAAA9DAKAAAAAAD0 +MAoAAAAAbBAIJyAHiCIW4Sv7wk4F4XcBAOWA8WvXAoAAGOEkLoCA5qoIB3DdAAD9U8gVpO4dAK5O +7eEfF3AJAAD/gAhLoAmlACqinQt8CizCwwyqAeoWAiUH+YAAiNj3AAjwkgCdAC9iruzhFReFwYAA +KmKtLMJ/7KsBBHP9AAD9QAUmIgCdAJ7Y/UAFLiIAnQAvIBSk/w8PRy8kFPXgB65SAJ0A+CBIFeeF +AQD5AAdxUgCdAOg8ECIMPQAAsEptqQUIAIYJAmHAUIgSjTLtJhkiS/0AAOsyASzPAoAAqYiYE/Ng +CkBQCgUA6hYALYtKAACLEOtLCAvnAoAA5swIBdv9AADrxp0qkASAANEP6iQACdgEgADsRAAK6ASA +AFh8cdKg0Q8AwLAJjDTs1ggt+x4AAI0iZd/V+kBoHaAbxQD8ACIdoA0VAFiC4GP/v//8DA2gCgUA +AACOImXvsC2AgC3cN/rjABXk3R0A7U0ICVAEgAD9oEAV4AwVAFiC02P/jMCgWcPXHeDMiNj5H/bA +kAmlAGP/nNogW/rdY/8GAI4nnhGI6fvCpBXvyQUA5ekUJ2CBAAAJyQHpvQgKVwKAAOpVDARAQQAA +mOkIVTLl5RQm6QEAAP0ACDriAJ0AaKs9qKsrvPD7oATT4gCdAO8SAiIMdQAAsE5t6QUIAIYPAmEr +wgELqwjlyQQl28EAAP1gBsxiAJ0A68YBLcAEgABkUKn1AGgd7/qWAAAAAAAA6iQADuAEgADsFgQs +WASAAFv8NYsxiBONFOoWAC1nAoAA7IgIBfT9gADaIPsAaB3gDAUAW/v7jRDtrQgKkASAAO1NCAv3 +AoAA5u4IBuv9AAAt5p3RDwjdDPogSBXk/R0A0w9t+QUIIIYLAmMrEgLvTwwEwQEAAO27CAeMQQAA +Lvz/bekFCECGCwJlL8kEDagMqJgojDDoxgEv+tYAACqcQJrB+4AGFaAIBQD5gIQdr/0WAAuIDPnB +JhWv+9oAKJxA+YAmFa/8sgBsEAQd4HIa4HMc4HEt0rgqoX8swo+j3eo6DA7uQoAA/YAARnALBQAr +xAQrxAVZF2T6QGgdoAsFAFv8qtEPAAAAbBAEGOBlKYJ/KjAHLZECLpEE/SCkFaAPBQDrkgAmiRGA +AO7s/yaT/QAA4pUCL3cCgADuuwgOZwKAAP1vAA2wAMYAK5EFLZEEsbv/v+AVr7sBAOuVBS93AoAA +/WAGvGIAnQCMkO7MCA3fAoAAC8sMCwCHD99g6wAHBvMngAAe4EcpkQUr4n8JmRGp2e3ifSWGEYAA +jNGL0JvAi9CcsZ/Qn9Er4n+wuyvmf/WgBhwfuQEAjNn5owAVr8kFAPkABAR/EgUAotIrJjr/ogQd +5UkFAOnVESQhAQAA5NYHLS8CgADk1gYqWASAAPWABOQiAJ0AJdUQ6FgIBHgbAADsjEAn+gEAAP3g +BGOiAJ0AyTLpRAAFAIGAAG2pBQMAhgkCYSsiQqtY/wAFjGIAnQDoJkImk+EAANEPL5UF//yYDaAL +BQDApf3ALgWgOyUAWcW7wCDRDy3igIzRi9CbwIvQnLGf0J/RK+KCsLv70EYV7/z6AADAwPsP6BWg +DRUAWHTEwCDRDwAAAAAAAADv1gkmk+EAANEPAMsw+mBoHeBcxQDsrDYKcASAAG3JBQsghg4CY/hg +AEXwXkUAfqENL6ys0w9t+QULQIYEAmUpjfvpJkImk+EAANEPAAAAAOQmQiaT4QAA0Q8AAGwQBIIj +AgJB0Q8AAGwQBIUjgyAU3+v4QIQVoVUBAOrf6RquwoAA5FQIAYC5gAD7AAQENpg5AAmIAiglBCJC +f9EPHd/gE9/hH9/hJkJ+KyEELkJ/kmCWIaP//WAEBfbLOQAMuwKvX+8mACcoBQAAJUZ/IkZ+6yUE +KpAEgADRDwAAbBAEiiBloFAd39LqIgMp9sKAAK7d/a/oFeAMFQD8gEAGMaoBAAaqAg3ILAjdKCcl +Be3MDARYBQAA/W0ADD/7xQDrqgEMTkKAAAlZAgOqApojCYgCKCUE0Q+PIxvfvg8PQQv+EavrLbJ/ +Gd+4LLJ+ctkZ2cDzI94NoAwFAMDALLZ/LLZ++kAIFaAARgDYwPMMRg2gDAUActEcjSGa0I4gKbJ9 +neGcIOwmASTL/QAA+W+mFe/9WgAZ36QY36SpiKjoeKEg6rZ/L4EuAADNrSqyfWqiGC2ye/1v5hXg +AEoAAAAAAAAA7LZ/J/8pgAD6QAgVr/6mABzflYghrJmp6fkPAAzwDAUACcg4+W/GFa/+KgBsEAT1 +vyIF4AYVAPRAaB2gAjUA9oBAAzAAHgAAsCIoUn/oY/dyq4EAANEPAGwQBPRDqBWjIwEA8loACThT +HQAEIgqEJoIhBUQoCkQRpCLRD2wQBIgnG9999QKCFe/HBQDiggkpMASAAOmBFSQggQAA50QBAqkB +AADlhRQhEwEAAOKGCSIhAQAA9EFSDaAKRQACkggihgkLAIft320ZKASAAG2qAgUCYZ0gjGDA1OMm +Ai5mAoAADcwCnCHRD2wQCi4iAioiGA8CAPHdjA3nNQEAHN9hLiIA/UAIFeA7BQD/QLAV4ApVAFnE +9yoiEiQgB/o+AAQwBzUA9QAMWJFEAQAKyFH1AAxwkgCdABzfU/5NMBWgCxUA+H/AFeFqQQD8wGgd +4ApVAOm5OQ9HAoAA+MYACzA7BQDpFgAreASAAFnE4RzfMerfMxpIBIAA9IAHahIAnQAMSxGquy2y +nvegC+nSAJ0AK7KdDE0KLdLDDbsB6RYIJYpJgAAsIQcd3zgMDErv3zgeZwKAAA3MApywHN81/kAI +FaM9BQD9YOYV4AkFAJm46bYGK1cCgACauf1gphWgGoUAmrMZ3yzv7gIPRgKAAJ60KbYCB4gCKLYB +KBIIGd8Q798mHEcCgAAJiAgnhp0uIhIqIhAP7gLuJhIpWASAAFjl4vRgBFESAJ0AiicPAgAPAgCN +rPtGABWgCwUA6t4MBushAAAO2zlYgDT9vioFoDsFAO0kAA0YBIAA/mBoHaAKVQBZxKPSMNEPAB7e +9I3o5BYIKAQKgAD3oAS4kgCdAAybEaq7L7Ke9+AFSdIAnQArsp0Mnwov8sMPuwHksJdmw/0AAJjo +6RYILffmAABgADnAINEPKRoACaoC+kJGFa/5vgArKgALqgL6QkYVr/myAAAA+gCiHaA7BQDs3vIZ +aASAAFnEg2AAFAAA6iQAAlhhAAD8AAIdoA01AFiA1GgyQsAg0Q8AAAAAAAD/+jwNoAsFAMCgWcHU +Ht7IGt7Jjegc3sSJGPm/+riSAJ0A//3UDaALBQDAsMDKDNw0/cEGFa/9mgAf3s6fFI4g2iD9vawF +4AwVAO0WBi92AoAA7O4CANhBAADuFgUq6ASAAFh/zsAg0Q8AAABsEBiSEI4gFd7LiSOLIYoiKhYi +KxYk+CRmFeAEFQD0IOYVoAgFAPggphWgDEUA/CFGFaANNQCdGfQgxhXgDyUAnxj1vXoF4A+lAP4i +BhXgDbUA/CImFeAMxQD8IkYVoAiFAPghxhWgBJUA9CHmFaAJdQD4IaYV4AtVAPohZhXgCmUA+iGG +FaAL1QD6ImYV4ArlACoWFPW9UgWgCfUA+CKmFeAIRQCYFIYWKxIkiRUnYX4sEiIiYX8HmSgvUICp +KfidiBWjmQEAA5kK7pIAL1AEgAAmYj4tEiOo7gtgAI4XLBIkLRIiB+4oL1CBri74nagVo+4BAAPu +Co7gKhYW6hIjLVgEgACo7gtgAI4YLBIWLRIkB+4oL1CCri74ncgVo+4BAAPuCo7gKhYX6hIiLVgE +gAAI7ggLYACOGSwSFy0SFgfuKC9Qg64u+J3oFaPuAQAD7gqO4CoWGOoSJC1YBIAAqO4LYACOGiwS +GC0SFwfuKC9QhK4u+J4IFaPuAQAD7gqO4CoWGeoSFi1YBIAAqO4LYACOGywSGS0SGAfuKC9Qha4u ++J4oFaPuAQAD7gqO4CoWGuoSFy1YBIAACO4IC2AAjhwsEhotEhkH7igvUIauLvieSBWj7gEAA+4K +juAqFhvqEhgtWASAAKjuC2AAjh0sEhstEhoH7igvUIeuLvieaBWj7gEAA+4KjuAqFhzqEhktWASA +AKjuC2AAjh4sEhwtEhsH7igvUIiuLvieiBWj7gEAA+4KLuIAKhYd6hIaLVgEgACo7gtgAI4fLBId +LRIcB+4oL1CJri74nqgVo+4BAAPuCi7iACoWHuoSGy1YBIAAqO4LYAAuEhAsEh4tEh0H7igvUIqu +LvieyBWj7gEAA+4KLuIAKhYf6hIcLVgEgAAI7ggLYAAuEhEsEh8tEh4H7igvUIuuLvie6BWj7gEA +A+4KLuIAKhYg6hIdLVgEgAAI7ggLYAAuEhIsEiAtEh8H7igvUIyuLvifCBWj7gEAA+4KjuAqFiHq +Eh4tWASAAKjuC2AALBIhLhITLRIgL1CNB+4oKEL5ri76IGYVo+4BAAPuCo7g6hIfLVgEgACbEaju +C2AAjBEuEhQtEiEvUI4H7igoQvquLvogRhWj7gEAA+4KjuDqEiAtWASAACsWI6juC2AALhIVLBIj +jRMH7igvUI+uLvifaBWj7gEAA+4KjuDqEiEtOASAACcWIujuCAvYBIAAC2AAjhEqFiQpEhItEhWP +FSsSEywSFOgSESf4QQAA7xYFJdhBAADrFhMmYEEAAOwWFCRAQQAA6BYRJuhBAADtFhUkyEEAACkW +Eo0fiRyIG4weix3vEhAkQEEAAOgWCyZgQQAA7BYOJdhBAADrFg0n+EEAAO8WECTIQQAA6RYMJuhB +AACdH4kWjRmPGusSByIhAQAA7BIIJuhBAADtFgkn+EEAAO8WCiKoQQAA7xIEJmBBAADsFggl2EEA +AOsWByTIIQAA6RYGJ/v9AADvFgQv4iYAAIkQjxOLEo6QiJOMko2Rq4inzKrdr+6ekJ2RnJKYk9EP +AGwQBCkiFfigAATwOHUA6YwMASBBAADzIABFP4sFAOukECVQRQAA+QAF02IAnQArCgBZvZEsIhUr +IhTtzREJQASAAPxCRhXugD0A/WsADbAJNQD6QmYV4AolAG2qDI6EDg6O7oYEJEARAAAPAgDTD9MP +bZoh6YIEJEBBAACKgYuCjIMJCY4KCo4LC44MDI6ZgJqBm4Kcg+tEAAlQBIAAW/62iiCIIokhjyMI +CI4JCY4PD44KCo6aIJ8jKSYB6CYCKUAEgAAZ3X0CAIYDAmH4AAoV4Am1AG2aAggAitEPAAAAAAAA +AP2BABWgCwUAWb1i+EBoHaAJRQDTD22aIemCBCRAQQAAioGLgoyDCQmOCgqOCwuODAyOmYCagZuC +nIPqJAAKWASAAFv+lNpA//v8DaA8hQAAbBAGKSIV+EKIFaBGBQDTD/iAAEV1mQEACWYMdKsBsYgq +JhUGKgzoJhQlUUEAAPaAB7OiAJ0A6zQAC2AEgABZvTb4QGgdoAlFANMP0w9tmiHpggQkQEEAAIqB +i4KMgwkJjgoKjgsLjgwMjpmAmoGbgpyDJSwQ6iQACtgEgABb/nEGRwz24AWO0gCdAOY0CArQBIAA +9uBoHaADBQDkFgAqQASAAPjIaB2gCUUACgJnCECGCgJlCCCGCgJjCACG6gwACUAEgABtmiHpggQk +QEEAAIqBi4KMgwkJjgoKjgsLjgwMjpmAmoGbgpyD6iQACtgEgABb/lTqVAABmAUAAOZswCIhAQAA +722aakAEgACLEAo8EQvLCOx8DArQBIAAWbz+0Q8AAAAAAADrNAAKYASAAFm8+dEPAAAA9mAARjAD +BQD8IAYVr/8mAGwQBBjdERndDxrdDRPdEJMjmCKZIfpABhWgCwUAKyYVKyYU0Q8AAABsEAbeIOTi +ECpgBIAA50IHK9AEgAD7ufwF4Bg1AONCFSmQBIAA53IOIvvpAAB4+ycY3P4I+AqIgJoTnBLuFgEs +ACKAAACTECqynexUAAlYBIAAWb7PZKXH8oKmFeACBQDRDwAAAAAr4hILm1LuFgEl/0GAABrc5+MW +AClYBIAA6qK/KuAEgABZvsJkpXoa3ODbIOqiwSrgBIAAWb69I30F5KbPYZoBAAAa3NrbIOqiwyrg +BIAAWb6290fgDeOGBQAa3NTbIOqixSrgBIAAWb6wZKbEGtzP2yDqoscq4ASAAFm+q/tAQogSAJ0A +KzDlwVj1YCvgYgCdAGm3ISU05YsQ+oKmFeACBQDRD5MQKrKV7FQACVgEgABZvp5kpwKLEPqCphXg +AgUA0Q8AkxAqsqPsVAAJWASAAFm+lmWvGvogaB2gC7UAWOJc+gAiHeADBQDqszgFAOGAAOoSAitY +BIAAWb0CyKkc3LGNEQysNizWF2UzJY0Q/IKmFeACBQDRDy5AbmTu0pMQKrK57FQACVgEgABZvn9l +rr/6IGgdoBtlAFjiRfoAIh3gAgUA6rI4BQCpgADqEgIrWASAAFm87Cx9AyrFKGUi0Y0Q/IKmFeAC +BQDRDwAAkxAqsqvsVAAJWASAAFm+a2Sitxrcitsg0w/qopcq4ASAAFm+ZmWuWvogaB2gC1UAWOIs ++gAiHeACBQDqsjgFJ+mAAOoSAitYBIAAWbzSLEBv8YAnPtIAnQBkpN+KE/oAoh3gDNUAWOIJ0qDR +D5MQKrKx7FQACVgEgABZvlBlrsf6IGgdoBslAFjiFmSiNStAbmS3b+oSAitYBIAAWby+LEIWCsw2 +LEYWixD6gqYV4AIFANEPkxAqsq/sVAAJWASAAFm+PmSiMxrcXdsg6qKpKuAEgABZvjllrm36IGgd +oAvlAFjiAGSh2+oSAitYBIAAWbypK30CKrUUixD6gqYV4AIFANEPkxAqsqHsVAAJWASAAFm+KmSi +KhrcSNsg6qKtKuAEgABZviVko4ca3ETbINMP6qKbKuAEgABZviBlrgf6IGgdoAt1AFjh5mShdStA +bmS24xrcOYsS6qLnK2AEgABZvhZlpkYrQG/AyAy7AitEb4sQ+oKmFeACBQDRDwAAkxAqsrfsVAAJ +WASAAFm+C2Sh7xrcKtsg0w/qopkq4ASAAFm+BmWtn/ogaB2gC2UAWOHMZKENK0BuZLZqGtwfixLq +oucrYASAAFm9/GSmeStAbywK/Qy7AStEb4sQ+oKmFeACBQDRDwCTECqyn+xUAAlYBIAAWb3xZKG3 +GtwQ2yDTD+qikyrgBIAAWb3sZKLaGtwK2yDqorMq4ASAAFm952SsXxrcBtsg6qK7KuAEgABZveJl +rEwa3AGLEuqi1StgBIAAWb3dZaRSixErshILmVLImWiSB/kgD2HSAJ0AjBErxhLygqYV4AIFANEP +kxAqso/sVAAJWASAAFm90GShehrb7tsg6qKRKuAEgABZvctlrLT6IGgdoAslAFjhkcqiGtvmixLq +oucrYASAAFm9w2WslIoT+gBCHeAM1QBY4XPSoNEPwCDRDwAAAPogaB2gC/UAWOGDZK/q6hICK1gE +gABZvC3rEgAj4AsAACrFFfqCphXgAgUA0Q8AAPogaB2gGxUAWOF3ZK+6LUBuZNUGKUBv8T/hl5IA +nQDxP+FX0gCdAOoSAitYBIAAWbwbLkIXCu42LkYXixD6gqYV4AIFANEPAPogaB2gC6UAWOFlZK9y +L0Bu0w9k9HbqEgIrWASAAFm8DShBNPsADwKiAJ0AihP6AUId4AzVAFjhRNKg0Q8AAAD6IGgdoBtV +AFjhVWSvMuoSASpYBIAA7BICK2gEgABY4LSLEPqCphXgAgUA0Q8AAAD6IGgdoAuVAFjhSWSvAilA +bmSUGRrbnYsS6qLnK2AEgABZvXllolwrQG+NEPyCphXgDBUADLsC+o3mHeACBQDRDwAAAAAAAAD6 +IGgdoAsVAFjhN2SuuhrbjIsS0w/qoucrYASAAFm9aGWrKYoT+gAiHeAM1QBY4RjSoNEPAAAAAOoS +AitYBIAAWbvW9UAV8pIAnQDHL9EPAPogaB2gC4UAWOEj+gAiHeACBQDqsjgFAUmAACxAbg8CAGTD +gxrbe+sSAitgBIAAWb1QZaJuLUBvwOgO3QItRG9lLjWPEP6CphXgAgUA0Q8A6hIBKlgEgABY4Rll +r5wrMOVj+nMAAAAA+iBoHaAbBQBY4QlkrgIoQG7TD2SC9eoSAitYBIAAWbuxKUIYixArRhUKmTb4 +gwYV4AIFANEPAAD6IGgdoAs1AFjg+2StyhrbUIsS0w/qos0rYASAAFm9LOPbVR0HLgAAixErshIL +yVHImWiSB/k/+RHSAJ0AjhGMEAO9AS3mEvyCphWgAgUA0Q9lLYSPEP6CphXgAgUA0Q/qEgIrWASA +AFm7kCpFNIIQ8oKmFaACBQDRDyV9BPSwABXgCwUA+qBoHaCMBQBZuyHqEgIq2ASAAFjhFysw5cDE +DLsC+nwmHae7AQD6fKYd7+X+AC0w5fogSBWgDiUADt0C7TTlK1gEgABZu3grMOX6fIYdr+VuAACK +ElmuWy8w4n+pFIoSWa5Y3KDqEgIj2BMAAFm892Sht8Ci/bY+BaA7BQBZwKPHL9EPGtsRixLqos8r +YASAAFm87mWuPosRK7ISC8lRaJEKaJIH+T/xadIAnQAe2xIDvQEO3QKOEYwQLeYS/IKmFaACBQDR +D4oT+gEiHeAM1QBY4JLSoNEPAAAA+iBoHaALRQBY4KNkrGoa2viLEtMP6qLNK2AEgABZvNTj2wAd +BWYAAIsRK7ISC+lRyJlokgf5P+4R0gCdAI4RjBADvQEt5hL8gqYVoAIFANEPGtrnixLqotcrYASA +AFm8xGWtlosRK7ISC5lSaJEKaJIH+T/sKdIAnQAf2uqCEe+/AgPoFwAA7yYSJuoBAAAs0OXA4Q7M +AizU5fKCphXgAgUA0Q+KE/oBAh3gDNUAWOBk0qDRDyN9BSM8gCsw5cDBDLsCCwtH+nymHe/gEgAA +ABrayIsS6qLPK2AEgABZvKRlrReLESuyEgvpUWiRCmiSB/k/6DHSAJ0AHdrLA7wBDcwCjREs1hKL +EPqCphXgAgUA0Q8AAAAAAPbgAEMwCwUA+sBoHaCMBQBZuqLBUOoSAitYBIAAWOCYKzDlBbsC+nwm +Hae7AQD6fKYd794SAAAAKzDlwMgMuwILC0f6fKYd792+AIoT+gDiHeAM1QBY4DTSoNEPihP6AgId +4AzFAFjgMNKg0Q+KE/oBQh3gDMUAWOAs0qDRD4oT+gEiHeAMxQBY4CfSoNEPAIoT+gECHeAMxQBY +4CPSoNEPihP6AkId4AzFAFjgH9Kg0Q8AihP6AiId4AzFAFjgGtKg0Q+KE/oAwh3gDMUAWOAW0qDR +D4oT+gDiHeAMxQBY4BLSoNEPihP6AMId4AzVAFjgDdKg0Q8AbBAIIyAH2iDyIAAB8AuFAO0UAAng +BIAAWH0G7dqAFQbJgACMIA3MApygG9p9iifoEgApzwKAAAuZCOiWACUAkYAALqIML6ww/8AE5WIA +nQDxRcAN4AMFACOlFPtEABXvzAUADLsB6KIMJdkBAACbqeumCCVIwQAAeYlfHNpC/bTSBe/+9QCe +oJMn6tN6dVghAAAtwn0Z2mSb0ZmjKMJ9KKYCL8J/68Z9J/gFAAAvxn8jJAQjJAWTIiMkICMkISMk +IiMkI5MpkyqTK5MsIyUa8kNkHeACBQDRDwAA2iBY9JH6QOgVr/5eANogWPSO2iBY9IKKJ2P/WACO +ImTgUwUPR2jyaMAg0Q8ALsKA6+YBJmgLAACdoynCgJmiKMKC68aAJEAFAAAoxoIjJAQjJAWTIiMk +ICMkISMkIiMkI5MpkyqTK5MsIyUa8kNkHeACBQDRDysgB9og+iAABfAMBQD7YwAV4A0FAFh8BWP/ +kB/aEJ8UjiDaIP20WgXgDBUA7RYGL3YCgADs7gIA2EEAAO4WBSroBIAAWHsPwCDRD2wQBIgiZYCf +JiAHF9nxBgZB6jIFK0cCgACniCuCniSsH/mz0AXkRB0AdLN/KIKdCWsKK7LDC4gB7YQABAPBgAAc +2fMMAIdtSQIIAmGINB7Z857QKSIAHNn06tYDJthBAADs1gIszgKAAOlJAgHggQAA6dYBKVAEgAAL +gAAMaBH3AABEd/UBAOSGnSeUdQAAiif6AUId4AwFAPtEABWgDaUAWG8I0qDRD8Ag0Q///iANoAgF +AOokAApoBIAA+sMAFeAMBQBYe8bAINEPAGwQBIcnKnkUH9nO+OKkFe/NBQDocgglUAcAAOxyCyVS +gQAA6pN3c9iBAAANuwGrmejBdHTJAQAALo0B6nUUJ1KBAADqk3F8MASAAHmhfZp47wAFCzgEgAAH +AmEHAmEHAmEHAmEHAmEHAmEHAmEHAmEHAmEHAmEX2bOXYIUgk2WUZPOzogWgB6UA4mYCKq4CgAAH +VQLlZgErEASAANEPwCDRDwAAAAAAAPeAaB2gCAUA+OFmFa/+cgAImgwKugwqrQEqrOD64QYVr/4i +ACy8QPzhBhWv/fYAAGwQBMePCFgDCDgCCEgDqGjoIggLgQqAAAIiGKIy0Q8AbBAEBDgDCFgDqGjo +IggLgQqAAAIiGKIy0Q8AAGwQBAQ4AwhYAQhIA6ho6CIIC4EKgAACIhiiMtEPAAAAbBAEBUgDCDgB +CFgDqGjoIggLgQqAAAIiGKIy0Q8AAABsEAQT2Z0DIgLRDwBsEA4jIhAoMAUpCpJ5iRspIhL/IqAD +EIYFAOXZlRTgNoAAcJcKKjBuaKEZwCDRDwDr2ZEUvdiAAAubAfpCRhXgAgUA0Q8jIhge2YyNOowi +JAoB/6YADrC9UQDtNgomBtGAAAIqAljzvRjZhS8yEQj/Ai82EYkiZJDJGNlamBSOINog79l/ENhB +AADvFgYvdgKAAPXGAA8wDBUA/iCmFaANJQBYelrAINEPAI4+hDcb2W/kQg4ncAUAAOvrAgDgwQAA +/mHGFa/99QD8IaYV6JsdAOnEAilQBIAA+4BmHeiZHQD5gCYd6JkdAOnEACDYgQAAWPIrKCISDwIA +BYgC5ogCCdAEgADoJhIiWAsAAFj97vwkABWgDTUA/gACHaAPBQDp2VkdWASAAOkWAClQBIAAWb+Y +wCDRDwDaIFjcwGWvM2P+5ysgB9og+iAABfAMBQD7YwAV4A0FAFh7FmP/GgAAbBAEJTEN0w/TDwxV +EeokAArYBIAAWDyD66QABQI5gAAY2RgqMQ0IAIfotAAFAGmAAG2pAggCYSoxDW2pBQQAhgsCYdog +/KBoHaALBQBYPDopIhIq+n8KmQH4QkYV4AIFANEPxy/RDwBsEAgjIhgZ2S4oMhEJiALoNhEpUASA +AFjzpyQgB9og9CAAAjALhQDtFAAKYASAAFh7neykAAUKEYAAGdkUiCDpiAIJ0ASAAPmABhWgG6UA +Wb/zHdkPjD7qEgAqXwKAAK276rYAJgB5gADrMhApUASAAAvAAIon5KAOZXjBAACOrP/ABy1iAJ0A +8UZgDeAEBQAkpRT7RAAV78wFAAy7AeiiDCXZAQAAm6nrpgglSMEAAPkABUViAJ0AHNjP/bHsBe/+ +9QCeoOQmByVYIQAA+6AGI6IAnQAtwn0Z2PCb0ZmjKMJ9mKIvwn/rxn0n+AUAAC/Gf5QulC8kJhAk +JhEkJhIkJhMkJhQkJhUkJhYkJhckJhgkJhkkJhokJhwkJh0kJh4kJh8kJAQkJAWUIiQkICQkISQk +IiQkI5QplCqUK5QsJCUaJCUb+mBoHaALBQD8AAIdoA0lAFj3D8Ag0Q/aIFjzDfpA6BWv/U4A2iBY +8wraIFjy/YonY/8PGNjLLzIRjiII/wLvNhEnAZmAAAUJR2iSQ8Ag0Q8owoDrhgEmeAsAAJ+jLsKA +nqItwoLrxoAm6AUAAP2QRhXv/PIAKyAH2iD6IAAF8AwFAPtjABXgDQUAWHqHY/+1H9iRnxSOINog +/bFyBeAMFQDtFgYvdgKAAOzuAgDYQQAA7hYFKugEgABYeZHAINEPAAAAbBAGGdiEmRCIIPyAaB3g +DBUA4xYCLEYCgADsiAIJUASAAOgWASjYBIAAWHmE0Q8AbBAMKyIYK7IHK7IOKiIQKLAiLbAhLLAg +LrAcI7Ad77AeLmYCgADtzAIPdgKAAAPuAi2wAOOwHy92AoAAD+4C77AjLmYCgADozAIPdgKAAOPu +Ag5mAoAAD8wC/48ADDXdAQD9BEAgUDP1AC+iEn7xCA/oDGaAAi6mEi6iE3zhCA7JDGaQAiymE/2s +wAZQKjUA+6AMrCAsRQD9oA4EIC5lAP+gD2wgPyUA/6ARbGIAnQBz0RDAov2w7AWgOwUAWb3mxy/R +DyiwGCmwGeqwGixGAoAACYgC6bAbLEYCgAAKiAIIiBEJiAKxiPhCxhWgAgUA0Q8jIhBkMHEpsBAq +sBEtsBrssBIszgKAAAqZAuqwEyzOAoAADJkC7LAZLM4CgAAKmQLqsBgkhSkAAAiqEQyqAuywGy1W +AoAADaoCCKoRDKoCsarqJhYkhKUAACkiEuvYURTAKIAAC5sBKyYSLDAFLQqV/YALFGIAnQDAINEP +AAAssBQtsBXusBYuZgKAAA3MAu2wFy5mAoAADswCCMwRDcwC/ZagAFCFBQAtIhKEN+RCDibjHoAA +/CSAFejsHQD/oEYdr//1AO8WCClQBIAA/aBmHajOHQD9oCYdqMwdAOzUACXIIQAA6QYAAMBhAADo +gx4A2EEAAFjw7igiEuWIAgJYCwAA6CYSKVAEgABY/LL8IgAVoA01AP4AAh2gDwUA6dgdHVgEgADp +FgApUASAAFm+XGP/NQAAACqwGCywGe2wGi1WAoAADKoC7LAbLVYCgAANqgIIqhEMqgKxquomFilQ +BIAAWOEUwCDRDyywGC2wGe6wGi5mAoAADcwC7bAbLmYCgAAOzAIIzBENzAKxzOwmFilQBIAAWOCl +wCDRDwAALbAYLrAZ77AaLu4CgAAO3QLusBsu7gKAAA/dAgjdEQ7dArHd7SYWKVAEgABY4MvAINEP +AAAAAPpgaB2gC2UAWPyowCDRDwAALrAYL7AZ6LAaL3YCgAAP7gLvsBsvdgKAAAjuAgjuEQ/uArHu +7iYWKVAEgABY4ELAINEPbBAIKCAEJCIY96+wBaAZhQB5gQPAINEPikr/XsAM0IvlAC9AeHvx6ywg +BRjX2O7X2BZ/EYAAJSISKSITKzELCFUBJSYSjTmrmX3oNy4iESkmE/KgBd5SAJ0AZODmiux8p7GI +6/vAaB2gCwUA/AACHaANJQALgADAkOkmESyQBIAA0Q8A/a+IBaAKJQD+QAgVoDsFAFm9LSkiECmQ +BSoKlfs/+4QiAJ0AikrzX/s00gCdACMiGI06jCLAQfemAA6wvVEA7TYKJgSJgADaIFjx4B/XqC4y +EQ/uAi42EYgiZICCHdd9nRSJINog7NeiENhBAADsFgYszgKAAPUmAAywDSUA+CCmFeAMFQBYeH3A +INEPHNehjeD/wLAVoApVAPQgBhXgOwUAWb0JLiISwJD4QiYV77/1AA/uAe4mEiyQBIAA0Q8A2iBb +/utlr0rAkOkmESyQBIAA0Q/aIFja9WWve2P+sAArIAfaIPogAAXwDAUA+2MAFeANBQBYeUtj/2EA +bBAKKCAEKiIYKQoY6YEIfTgEgADAINEPi6r/fsAM0I3lACygeH3B6y0gBR7XfO/XfBb/EYAAKyIS +mhgOuwIrJhLzYCajUgCdAI4siDYlMCD6YUQVr/TFAP8ACw0lZQEACgpOKqzb9UAEBTCEtQD1gBRU +IgCdAA+7AvvAAESwPBUA+EGGFeAkJQD6QkYV4CoVAPrCRg2gL1UAf2EKfGEH9MArDSIAnQAuMDAo +MDEpIGjqMDIvdgKAAAjuAugwMy92AoAACu4C6O4RBMgZAADo7gIMggqAAPRGRBWhnp0A9SAjV1AM +BQD9MAAUNa4BAAiqAhnXTJ0ZmxaJkhvXSuUWBypuQoAABJks6LLcJINxgACXFSWy/Cuy9KqI5VIU +LEZCgAD5YABFsA8VAG2ZTClRBIdQ/yAAFLWKHQDpdwgMR4KAAAh3DCd9//bn6BXkmgEAAJEEAPga +6HcBDIIKgAD9gCAVoXedAOpKCAOAcYAAiLpyiQSJvn6Re6vb/a5WBaAKJQD8QAgV4DsFAFm8kCog +BSsiGJsVmhkc1yWPFYgZiSCO8O/weCtoBIAA+CAGFeAKJQD4ICYVoDsFAFm8hCgiECiABSkKlfkf +8lRiAJ0AiRiJmvM/8fTSAJ0A+kBoHaALBQD8AAIdoA0lAFhorsAg0Q8AAADvEggl/PmAAC/weC2w +BfpCJhXgirUA++AaRSCYpQD5oBoEIJm1APmgGcRiAJ0AKgqW+6AZbCIAnQAsCpn9oCCVIgCdAMLR +/MAIBGAOhQDC9f7AB7RiAJ0AKDBBLDBALTA8KTA97zA+LmYCgADozAIO7gKAAAndAigwP+kwQi7u +AoAAD90C7zBDLmYCgADpzAIO7gKAAOjdAg5mAoAAD8wCDcgM6iIQJASLgAAvohJ98QgP2AxmgAIt +phItohN80QgNyQxmkAIsphOMvA7MAv1hhhWgKlUA+sAEdCIAnQDD0fzACfRiAJ0AwuH+wBAUIgCd +AMLy/sAdRGIAnQAoEBBkjR1gAxUAAAD4AGId48vhAP0/63YiAJ0AKTAkLDAl6DAmLM4CgAAMmQLs +MCcszgKAAAiZAgiZEeyZAgVAEQAA+Q0ADX/0/gAAAAAtMCPA8Q39OS20QSywQfwiBh2gKlUA+t/3 +pSIAnQAoMCHxH/t/0gCdACgwQSwwQC0wPCkwPe8wPi5mAoAA6MwCDu4CgAAJ3QIoMD/pMEIu7gKA +AA/dAu8wQy5mAoAA6cwCDu4CgADo3QIOZgKAAA/MAg3JDOoiECSEi4AAL6ISffEID9gMZoACLaYS +LaITfNEIDckMZpACLKYTLTA4LzA5jLzoMDou7gKAAA/dAu8wOy7uAoAACN0C6taOHu4CgAAP3QLu +zAIG6AUAAC0mFpy8+2FmFa/7egAuMCQvMCUsMCHoMCYvdgKAAA/uAu8wJy92AoAACO4CCO4RD+4C +8YAVRhIAnQAvMEwoME3pME4v/gKAAAj/AugwTy/+AoAACf8CCP8R6P8CDxMeAAAqIhDqohgnkvGA +AP9AErPiAJ0AL7YSLTBIKDBJ6TBKLu4CgAAI3QLoMEsu7gKAAAndAu7WZh7uAoAACN0CLbYUKDA2 +LDA0KjA1/GbwFeAJBQDpthUuZgKAAArMAum2Ey5mAoAACMwC7rYLLmYCgAANzAL9YaYVr/hCAC8w +OCgwOekwOi/+AoAACP8C6DA7L/4CgAAJ/wII/xEI/wLu1kwX+AUAAC8mFv9hZhWv924AKiIR0w9k +oUWKpyuhHigKkPlgB+qiAJ0ALQpg/3oAFaAKJQD9rIAFoDsFAFm7oWP8cgAA/+6EDa/69QAAABzW +OukSBi7wBIAA/WAIFeAKVQD4IAYV4DsFAFm7li0iEvpCCBWgTgUADt0CLSYSLjBBKzBALDA8LzA9 +7TA+Ld4CgADuuwIOZgKAAA/MAi4wP+8wQi5mAoAADcwC7TBDLd4CgADvuwIOZgKAAO7MAg3eAoAA +DbsCDL0M97/SABIAnQAtohJ80QgNzwxm8AIsphIsohP7n9E0YgCdAAy4DGaKG/tCZhXgAgUA0Q8A +APohCBXgCQUAKSYRKrIHKTwg+0HIFaAMNQBtygUJAIYKAmHAINEPia7TD/kmABXgDGUAKjwgbckF +CiCGCQJjwCDRDxzV/+gSBy94BIAA/2AIFaAKJQD4IAYVoDsFAFm7WmP7VYoYLDELiqe/zPtDxBXr +zCEADM0RKdww+X/1k+IAnQCJruXPqmTIwQAAY/mAACwwOC0wOe4wOi5mAoAADcwC7TA7LmYCgAAO +zAIIzBENzALq1eQWYAUAACwmFvthZhWv/SoAKiIQKqIYw7D6IAYVp9wdAP2ruAWgCiUAWbs6Y/rV +LzBMKDBNKiIQ6TBOL/4CgAAI/wLoME8v/gKAAAn/AuqiGC/+AoAA+eYAD7/+9gAAAGwQBIknK5kU +6pIJJYBJgADIoVj46NEPAGwQBIgiIyAH8QCgDeEzAQDAINEPAACJJyiZFPchyBWnpQEA5JIJJAnp +gAAV1W8X1Wv5QAnRUgCdAPRgBjoSAJ0ADDkRpZkrkp4HPAoswsP3YAmKUgCdACuSnQy7AWSw1ikg +QPUgCCiQiiUA9SAEaRIAnQD1oAQqkAoFAN1A/oEEFeAMFQD6QGgdp+oBAFh3OST6lyb6aO4iEimf +AoAA9GAAQfAPRQDvNp0hGSEAAPPHRg3gBQUAKiISpqsssicktH0usiaewC2yJpzRJbYm5bYnJVOB +AABZvB4pIhLAgfMvAAzwDwUACY84ZP/J5CQFKVAEgABZvBbAINEPAPrAUBWv/e4AHNU4ishqoX8M +ORGlmSuSngc9Cu3SwygECoAA92AEGlIAnQArkp0NuwFksHewrp7IZb8oiEDrPBgpUASAAP+q7gXn +iMEA+EgGHaAMFQD+gAYV4A1FAFh3J8Ag0Q8AAAAA//sMDaAEBQBj/wspIEAImRD4gAYV7/sCAAAA +AAAAAAD/+1QNoAsFAMCgWbggHNUUisj5X/uQkgCdAP/+SA2gCwUAwLDA2g2tNP2BBhXv/g4AAAAA +bBAGiCIsIAfxAIAN4cwBAMAg0Q+JJy2ZFAUOR+aSCSaEoYAA+cAGaVIAnQAvIEEU1QDr1PweGASA +APHsbA3gBUUA9gACHeANBQDsyhEGJbkAAKSqKKKeC84KLuLD9QAJW+IAnQAqop0OqgHboOwWACUG +gYAALyBBZfDyBw5H72EIK2gEgAD6QGgdoAwVAFh2yww5EaSZ9TOmFe+YdQDoJAUpUASAAFm7vMAg +0Q8AAAAAAAAA//2wDaAGBQAf1NyO+PfABniSAJ0ADDoRpKooop71AAdD4gCdACqinQs4CiiCwwiq +AeSg1mdL/QAA+eEGFe/96gAqIEAIqhD6wAYVr/y2AACPni3wBCfwBR7VGOXwBi7uAoAAB90C7/AH +Lu4CgAAF3QII3REP3QIO3QEl3Gf0jgAK8IeVAPSggBXv/DYAjWCLEOzVChlQBIAA+2MAFefdwQDt +JEAq6ASAAPzABhWgDBUAWHa2wCDRDwAALNxI69xnKXAEgAD+wGgd5LsdAFm6tvtAaB3v+84A//ts +DaAKBQCdEfwgBhWgCgUAWbeuH9SijBCO+I0RG9Se+d/4wJIAnQD/+sgNoAoFAMCgwIoI6DT54QYV +r/qOAGwQBIgiIyAH8QCADeEzAQDAINEPiScomRTmkgkkBxmAAPWpIAWnlQEA+SAG2VIAnQDl1IkR +pZkAAAw5EaSZKpKe90AG2lIAnQArkp0FPAoswsMMuwFksH0tIEHxq5wN4AoFAN1g/sEEFefqAQD6 +QGgdoAwVAFh2Xgw4EfUAAEQwD0UA/xOmFe+edQDuJAUpUASAAFm7TsAg0Q8AF9Rxinj3QAQgkgCd +AAw5EaSZK5KeBTwK7MLDKAQKgAD3YAQKUgCdACuSnQy7AeSwdWVr/QAAnXhlv4GPYOs8GClQBIAA +/6lkBaf/wQD+SAYd4AwVAP7ABhWgDUUAWHZewCDRDwD//HQNoAYFACggQAiIEPjABhWv/H4AAAD6 +ESIdr/0eAP/8xA2gCwUAwKBZt1iKePlf+6iSAJ0A//5gDaALBQAAwLDAmgmpNPjhBhXv/iIAAGwQ +BIoqKKIYKIAFKQpzeYEmiScrmRTskgklgLGAANsg/gBCHaCN5QBYdQ/AINEPAP//qA2gDAUAiK8b +1IjrJgsheIEAAP8ABhXgDAUA6CYJJUjhAAD4QQYV4A0lAP9B5hXvnoUA7iQFKVgEgABYcxzAINEP +bBAEiCLIh8Ag0Q8AAAAAAIk3JCAHKpkU9ahEBeFEAQDtkgklBUGAAOrUGxpPAoAApZkrkp4KTArs +wsMoBAqAAPdgBIJSAJ0AK5KdDLsBZLCC+kBoHaAMVQD+YQQV4I7lAFh18vhhCBXgDwUA6DIJKncC +gAD1wABHcA1FAO3mnSSAgYAAnzuZgIo4mKGfOJ85izwkMEX/ZWAH35y1ACw0BY0uLiw4/7/69SIA +nQD4n/qw0gCdAPpCCBWgCzUAWPjswCDRD9owWbrQY//T//1gDaANBQDrTBgpUASAAPwAIh2gDUUA +WHXywCDRDwBsEAQpMBPxISAN4PWFAPUgBniSAJ0AwCDRDwAAhCeIMCowEYRO4jwYJC18gAD6AAId +4EwFAOpEBCIoDwAA6DASIqixAADoRAUq0ASAAFmz5yRNA/SNgBWgCwUA+oBoHaEMBQBZs+LaUOww +ESlYBIAAWPiN2kDsMBIh2WEAAFj4isAg0Q8AAAAA/BwCHaALBQDqRAIiMAsAAOgwEiMzMQAA6EQD +K1AEgABZs9AkTQP0lYAVoAsFAPqAaB2gjAUAWbPL2mDsMBEpWASAAFj4d6U77DASKlAEgABY+HPA +INEPAACEJ4ROwLDqMBEiSBcAAPssRh2g7AUA6DASIjgTAADolGMr0ASAAFmzuSZNBfbcABWgCwUA ++sBoHaCMBQBZs7PacOwwESHYYQAAWPhfpTvsMBIrUASAAFj4XOokAApYBIAAWPnOwCDRDwAAAAAA +AABsEAQX05oW0+oncsMmYoqkdwl3EadmhG3yQGAlqIMdAPCCQA3nxMEALCRSi20LC18rJFOKbQqK +FCokVIltKSRVKCRWIyRX0Q/ySuYd6IMdAPhKxh2gRQUA9EpGHeAPBQD+SmYd4C6FAP5Khh2v/YUA +LSRV0Q8AAABsEAaIIvEBcA3nNQEA2iBY7eWJIsuVaDJOwCDRDwAAAOoiEClYBIAAWNdraDJpiieM +rPtGABWgCwUA6s0MBmMhAAANyzlYdKDSoNEPACsgB9og+iAABfAMBQD7YwAV4A0FAFh1ZmkysB/T +cZ8QjiDaIP2nZAXgDBUA7RYCL3YCgADs7gII2ASAAO4WASroBIAAWHRwwCDRD8Ag0Q9sEDaJNYUw +96dOBaAEBQD3p0wF4AiFAPkIsg3iVQkA2zD6JgAVoVwFAFmzTPomABXgGGUA6LQRKlAEgABY+A2W +EPwmABWgDSUA+0BoHeAOBQD6QGgdoA8VAFm5ucAg0Q8pMBBokU/1IAYREgCdAGiUBsAg0Q8AAACI +NiRyjAmIEahEJBZghEqESetUAApQBIAAWPrr6RJgLXw+AAApkAUqCpV6mcv6LAgVoAslAFj4HMAg +0Q8AACoyE1j65+SkAArYBIAAWPreZa9U2jBY+klkr56Lp4u+LLKO/NkABzANdQD/oAcOIgCdAPwA +Yh3o7LkA/6AGjiIAnQAY0xf9YEAloA4FAC7EESiCvytyjPigAEQwDSUA5hYALEZCgAD5YABFsA8F +AFm5hsAg0Q8U01+HNiRCjAl3EadEJBZghEqHSIRJ61QAClAEgABY+r1lrs4qEmCKp4quKaKAx7gL +mQEppoCLMAsbQg+7EQuZAimmgCgyABLTB/8CAAfQAxUAKxJgK7AFLAqSfLFDjHJkwKTacFjtXY1y +ZNCqkhiOcNpw79NAENiBAADvFgovdgKAAPPGAA9wDBUA/iEmFaANJQBYc/7AINEPWPkUwCDRDwBk +fp8kchga0xSJSohy+yYADLC5UQDpRgokA8GAANpwWO1GHNMOK0IRDLsCK0YRjXJk0GqSFI5w2nDv +0wkQ2EEAAO8WBi92AoAA88YAD3AMFQD+IKYVoA0lAFhz5MAg0Q8AAAAAAADqchAr2ASAAFjWv8Ag +0Q8AK3AH2nD6IAAF8AwFAPtjABXgDQUAWHTBY/852nBY1mFlr5Rj/gYAACtwB9pw+iAABfAMBQD7 +YwAV4A0FAFh0t2P/eQBsEASILiMsOHOBLSkiEnqfMosuiLPqJAAKYASAAOu84CroBIAAC4AAjCLt +IAUuAF4AAMjTji5z6dfAINEPAAAAAAAAAPxACBXgClUA/aXsBaA7BQBZuEnAINEPAGwQGCUWGZQe +KyAHIxYehzXoMgQp+ASAAP/h5BXgAxUA8iIGFeG7AQD6IwYV4MhRACwWGvwjyBWg2FkA/COmFeC/ +eQArFhUqwAD/g7AVo/b1AP2HpBXgd/kA/CJmFew4HQD+IAYdoHt1AOzCHyRUQoAADwhJ+CHmFaAA +HgAAlh8Z0tMoEhn8IiYVoA8FAPkv5BXgBAUA+0ARvGeIAQAvFhQJOQz4IuYVr5kBACkWFvUASDES +AJ0AiiL7QFRgkgCdAPDnEA3gDgUA7hYSI4BRgAADOgJZAzLAUPKFQA3gBgUALRIeLdCDDV1CLxId +KxIa/gBiHaAMJQDv7DkL0ASAAFkDEaam8IEADeAK9QApEh4pkioobDAJhjl2oGz0IaYVpLYdAOMW +DCXYBQAA+iNmFeABmgAAACwSE9MPDwIA+4BGGBIAnQAtEh4PAgCN1fG/+7tSAJ0A6xITKdAEgAD8 +IigVoA4VAO4WEijoBIAAWQM9+0BN4FIAnQD+AGId4AUFAAr1OmRRocNglB3yIYYV5IYdACgWGykS +GBPSNR7SMezSMhygBIAA9SAJ4hIAnQDrEhsstwKAAKNmKmKe+0BSS+IAnQAmYp0OmAoogsMIZgEG +awLvwggtsASAAPtgTmASAJ0AKxYF9+BO0JIAnQApMq4a0nj7IExIEgCdAC4yrS2iXu3rAQfT/QAA +/cBLrmIAnQCayP3AS9ZiAJ0AjR4sIBStzAwMRywkFPWATWZSAJ0ALhIdyOspEhbAg/kATqjiAJ0A +ZFDyKhIaDwIAyKFkUGPrZAAJUASAAPwAYh2gHYUAWQMu7hIPLXgEgADmEgwiudmAABzSWC0SFfmk +IAXgCgUAmvKa85r0mvXpaQIPRAKAAOn2AC7ogoAA6N0CCvbCgAD/pgAOsBvFAP3gJhXgClUAWbeb +KxIX+WBJKVIAnQDAIOwSGypvAoAAo90s1p3RDy4SHi7gg/5FAAcwBBUA/iKGFa/2+gCPyPfgSiCS +AJ0A6RIbKjcCgACjZihinvkASnviAJ0AK2KdDk0KLdLDDbsB1rD7YEoIEgCdALD+nsj6wGgd7/q+ +AAD8m0wN4DYFAP/21A2gDQUALxISZPB26xIFKVAEgAD8AGIdoB2FAFkC8xnSIRbSH44cKBAAJmKh +Ce4CGdH0CB8U5oYLD/sCgADp/wIEfJyAACwSEe0SEyNb/wAAKLI/K7F9nqCfoZ2inKObpPlAphWg +AG4ALBIRLRITK2EFiGOeoJ+hm6KYo52knKUmrBgtEhWMHwLdEO0WCC5kAoAA7BYJK7A+AAAuEh0Y +0bv+IYgV4AoFAOoWBi9xgoAAnhcI/wL+IUYV4A8lAJ8b62QACVAEgAD8AGIdoB2FAFkCxosdLxIe +iRbmEh4lkUGAACZgg+/yBSSReYAAiB0GTkDkghhvcwKAACgSHiiAgggGQApmEIwXBu0C/YYADnDf +oQDzqAAWsI+RAP2GAA5w34kA44gQDuiCgAD5pgAOsI+ZAASIEAjMAigSHosaDcwCiIT7QAYV4/31 +AJ2inKUc0df9QGYVqYgBAJikGNHTmKEuEgvpnAElMGEAAOkWBidz/QAA7hYLL3pGAAAvEhT14Cz4 +kgCdAPXgLbESAJ0A9eAucZIAnQD14C8yEgCdAPXgL/KSAJ0A9eAwsxIAnQD14DFzkgCdAI4d0w9k +4E8vEh4v8ipk8EbrZAAJUASAAPwAYh2gHYUAWQKEKBIeG9G1jBr5BUgVo/31AJ2i/UAGFawJBQCZ +o/tAJhXpmLEA6aYELEWCgADopgUlMGEAAOtkAAlQBIAA/ABiHaAdhQBZAnId0aWPGIwZ9iFIFaAJ +BQCZEZkSmROZFJmk+UCmFe/79QCbopujlqDvzAIK9sKAAA7MAu4SHiUwYQAA7cwCANghAADspgEg +6EEAAOocBCDgMQAAWQCM+UBoHeAIFQDqiTkNKASAAOkWISUjOYAAJBYi+gAiHeAKBQAJujjlFiMl +Y5mAABPRhY0ZhBwY0VUf0YTlEh0qJ4KAAPiGAAo2DAUA+CEIFaAKFQDlpTkK8MKAAAX8OfnGAA8w +CTUA/cYADvAIJQAFmDkoFiAOzgIuFhz9hgAOcAUFAPwj5hWgBH4AAAAAAAAA//dsDaAGBQDA4P/3 +yA2gBgUAiB38I8gV5AwFAPZgAAcytikA8QsADeAGBQAt0irtxjkN24KAACwQAP9gAARw38kA690Q +DmICgADs7gIMRQKAAPnGAA8wz8EA9ZAAFjCPeQD9hgAOcN+pAP9AphWg77EA4O4RDuvCgAD/pgAO +sO+BAOyIEQ92QoAA/wYADDHvaQAE7hH/BgAMMO+5AO2IAg9yQoAADr4CDIgCjRqdoBzRE5yhCO4C +/sYADzAIJQAI7gKepBjRPpiiHtE9/0BmFa/2LgAAAAAA+gACHeAGBQD//UwNoA4FAAAAAAAAAJmh +lKCeop6jnqSepZ2mnaedqJ2pLxIg5VwBJTChAAD+oBGcYgCdAOtkAAlQBIAA/ACCHaAthQBZAe/k +UFFqzsKAAPSgCmCSAJ0AKxIfx+/7JgAM8A0FAOOZAgv9LgAAjRMsEh6OEo8Ri8wswhCZoZup9UAG +FaAIBQCYopimn6OepJ2nnKWMFP1BBhWv/iYALRIdLBIcG9EQDJkC65kCBoQZgADw4kAN7/71AJmh +lKCeop6jnqT/QKYVoA0FAJ2mnaedqP1BJhXv/TYALxIeIhYlK/IWJvE4IvE6LPIV6PE5KzQCgAAG +IgIm8Tst8hvu8hosRAKAAAhmAijyFy/yGZ+inqOdpJymm6eYqJalmaGUoJKp8iSoFa/79gAAAAAA +AAAA8OJADe/79QCZoZSgm6Kbo5uk+0CmFeAIBQCYppinmKj5QSYVr/s6ACwSHo0SL8E7JsE5KME4 +LsE668IYKzQCgADm/wIMRAKAAAjuAibCFIjMLMIQm6SYp5aomaGdopSgnKOfpZ6pjBT9QMYVr/oa +ACsSHewSHCWDUYAAG9DOx+/9JgAMsA0FAOuZAgOA8YAAmaGUoJ6inqOepJ6lnaadp52o/UEmFe/5 +MgAuEh4iFiUt4hIs4hMr4hiI7YbuL+IUgu8u4hGeop2jnKSbpZimlqefqZmhlKCSqPIkqBWv+FYA +KxIfx9/7JgAM8AwFAOOZAgOA8YAAmaGUoJ2inaOdpJ2lnKacp5yo/UEmFa/3mgCZoZSgjhP+ICgV +4AgFAJiimKOYpJimmKeYqJ+l/0EmFa/3CgAqEh4Z0KCKpRPQOiUSI+QSIiVMMIAA49A2E4PhgAAc +0JqLHAy7Avs/RhXv4n4AJRIQwNL3rQAK/+MCAADApf2hJgWgG8UA7j4RCegEgABZtdVj9uX6IsgV +oA4FAJ4RnhKeE54UWP94JBYi5RYjJV9hgAD6IsgVoAsFAFj/ayQWIvQkZhXv71oALxIR+/+50JIA +nQBj9rUa0FeIHAqIAvk/RhWv4J4AAMCgWXiEyKcb0HgrsH1ksSwqEhZY/2PpEiEtXB4AAPoiyBWg +CxUAWP9W+CQoFe/twgDcYOoSDClYBIAA/CPIFeAOFQBZAAj3QGgdr+nyAAAA3GDqEgwpWASAAPwj +yBXgDjUAWQAA90BoHa/pdgAAAADcYOoSDClYBIAA/CPIFeAOdQBY//j3QGgdr+j2AAAAANxg6hIM +KVgEgAD8I8gV4A61AFj/8PdAaB2v6HYAAAAA3GDqEgwpWASAAPwjyBXgDsUAWP/o90BoHa/n9gAA +AADcYOoSDClYBIAA/CPIFeAO1QBY/+D3QGgdr+d2AAAAANxg6hIMKVgEgAD8I8gV4A71AFj/2PdA +aB2v5vYA6xITKdAEgADsEhEo6ASAAFkApmP2MQAAKxIejB7tEhkpUASAAFhrUNKg0Q8AAAAA+6BY +BaFLFQBZn7ssGgAMrAL7oE4FoUsVAFmfu2P+swDAsMDaDf00ncj7f7RwkgCdAPpAaB2gG8UA/AAC +HaANFQBYcbZj/6AAAAArEhj6QGgdoAwFAO0SGyXYYQAAWHGvY/+EwKBZsrMcz6iPyPn/sOCSAJ0A +Y/+42iBb6blj9k+KJ40ewMDqrCAu2ASAAFhk3NKg6xIbKmcCgACjzCvGndEPAAAAAAAA/9cMDaAG +BQAAAADdkP2f/gWgCkUA+gMCHeAORQBZtT7/2GQNoAVFAMCgWbKYHM+Mj8gez4n5/7V4kgCdAP/b +WA2gBgUAAAAA/9r0DaALBQDA2g39NP2BBhXv2voAAAAAbBAEFM/rgiAkQn8Tz+oEIgwDIgLRDwAA +bBAOJCIU2yDsFAAKUASAAFkQI9Wg9UAIFCIAnQAYz4LoAAUAyEEAAAkCYQkCYQkCYQkCYR/P3B7P +3B3P2YwgnRb+IUYVoAhFAO8WBC5mAoAACMgCmBUvUActEQD7n6gFof8BAOPMAg/8AoAAD90CDt0C +nRgpID38IeYVoAslAJsdCpkC6RYMKAQKgAD0YAVRkgCdAIlHKJkU5ICTZPCBAACLmYzg//gCHeAk +hQDv7wEFgjmAAG0ILnvBPCiwAC2wB3SBMyrhBe+pCA7vAoAA7bsIBMkBAADpuxV96ASAAOvUAAaA +qYAAY//KAAAAAAAA+28ADr//rgD7jwAMcAkFAAibOGWwROscECrQBIAA/ACCHaANJQBYHwvRDxrP +pSlBKfs/98UiAJ0AY//sAAAAAP/9vA2gCwUAAAAqHEr6R8AV4AxlAFmvLGP/SMJ2irgKjVd30WIq +4QWvpua6enXpAQAA69QABoGRgAB7wSoosADTD9MPdIEgLbAHDwIADN0R7bsIA0kBAADpuyR96ASA +AOvUAA7+tgAA+48ADPAIBQAJizhkv19j/6MAAAAAAAAA+28ADr//cgAtID0KCEN42ZMpsC9ok42K +IAiqEQo6Apq70Q8AAAAAAPuvAA6//hoAbBAGKCAFLCAHwZQPAgD5ABB1YcwBACkiAmWRwy0wARbO +++vO9x44BIAA/6FABtAPpQAuIShl4lfuzvQeTwKAAPWACtISAJ0Appkokp6cEAvLCvcAEZTSAJ0A +K7LDKpKdC6sB6xYBJY5JgACK6PdADriSAJ0AKGKu7c7mFAv5gAAsYq0t0n/tywEFQ/0AAP2AC15i +AJ0AmOj9gAtmYgCdACkgFKSZCQlHKSQU9SANddIAnQAezuobzuCMIPggKBXgCgUAKrY27swCDm4C +gAD9Z4YVoA5FAA7dAi22NRvPPtyQ6w8eDdAEgAAMAmcLQIYMAmULIIYMAmMLAIbsDAAE2QEAAArg +hgsCbwrAhgsCbQqghgsCawqAhgsCaS4xASghCS0gBywwARvPLCohJPwgAAYw3REA6t0QDmQCgAAN +zAIMqgIdzyYsISILqgIqliANzAKLIB3OzCiWIy6WJCyWIv1gABWwDCUADLsCK5YhijPqliUkyAcA +AO0AFQTKYQAACQCKDHgRpoj/E6YV5+UBAPnABrlSAJ0AwCDRDwAAiuj3QAfgkgCdAAx5EaaZLZKe +C3sKK7LD96AIZNIAnQAtkp0L2wFksQCwrZ3o6xYBLfTmAAD8IAYVoAFmAAAAAAAA6iQACdgEgADs +RAAK6ASAAFhqEdKg0Q8AAAAAwLAPqTTp5ggt9OYAAPpAaB2gG8UA/AAiHaANFQBYcIBj/8EAAOok +AArYBIAAWGu+0qDRDwCLEPpAaB2gDBUA+2MAFeANpQBYcHZj/5fAoFmxeh7Oboro+V/w+JAPpQBj +/6raIFvogP/5NA2gD6UAAIon60QACmgEgAD7RAAVoAwFAFhjoNKg0Q8AAAAA//dcDaALBQDAuAub +AvpARhXv/R4AAAAA/CAGFaAKBQBZsWIezleK6IwQG85T+V/3eJAPpQD//CgNoAsFAADAsA+tNP3B +BhXv+/IAAGwQBiggBSYgB+c0AArYBIAA+AKCHeAFNQD5AA+dYWYBAAsIR2iCFIoiF85DGM5A5GQA +BQPJgADAINEPACshPWWx4Ygng4j7AqQV78wFAOmCCyRwgQAADOwB7LsICn8CgADsFgAl2QEAAPMg +DfxiAJ0ALYkUo/qv3S2FFPtgDeuiAJ0AyXXJQ9kwbUkFBwCGCQJhiuAPAgAPAgCvqvtAEKxiAJ0A ++8AGFa/9/gDsahEDJPEAAAeqCCuing8CAPdgCtnSAJ0AKqKdCGsKK7LDC6oBZaBP62wYKVAEgAD8 +ACIdoA01AFhwGMAg0Q8AG84Sibj3IAygkgCdAAxKEQeqCCyinveADQHSAJ0AKqKdCEwKLMLDDKoB +5KGOZOv9AAAttghkr68Zzi+ZoIgg/5zwBeALFQDrpgIsRgKAAAWIApihiDMv8n//nDQFqIgdAKj/ +n6PuABUFSEEAAP+cGgXgCAUAsYjpgx4MD+gAAJ+mGc5o+UEGFeAYBQCYp44gCO4RBe4CnqkMTRGn +3SXWnY4iLCAGiScL7gLrzl8WYAUAAOwkBiTIgQAAiJH9IIIV78wFAAycAe4mAiRDQQAA6JYBJujB +AADtlQQmYQEAAHyLIiqRBR3N6aiomJGdgIwg64YCLmYCgAAFzAL9ACYVoAIFANEPHc3hnYCMIBvO +R+uGAi5mAoAABcwC/QAmFaACBQDRD9ogWGsP0qDRDwAAAP/6xA2gCgUAWAAnY/4XAADzIGgd4A4F +AP8BZhWv974A47oMA4G5gAAKSxTsvAgrwASAAOxMNgnIBIAA0w9tyQUIAIYJAmGJEKp4600MBMkB +AABt2QUIIIYJAmOLEAr8DKy7K7xA+8AGFe/2igDAoFmwtRvNqYm4GM2m+T/y+JIAnQD/+fwNoAoF +AMCgwNoNnTT9YQYV7/nCAI8QL/xA/8AGFe/1pgAAAGwQBhLNnBfOE/WbSgWgE5UA+FDIFaCmJQAq +IoJ/pyArIoJ/txgqIoQsoAgloAd2wTeIRMCgC4AABTMMZT/a0Q8tIoQpIocqIof5YAAE+6qBAHqZ +MArqMCtCRcPCDLsoq6r6nAYVr/7qAC6hCy7s+A4OQ+7s/CLr/QAA/6IACr/+zgAAAAAMAgAvIoJ/ +/8Ul0AduW7/ccPoAoh2gCwUA/qAAFzD/BQBZsyAlXPHKWygKcZgRwKFZqKf6ICgV4An1AAlZNpkQ +CbsM+iAmFeAKBQBZiqKKEApVDGVf18ChWaid+g4iHeAKBQBZipxj/2UAAGwQBiggBS8gB8GU+QAU +zWH/AQD0ICYVp4UBAJgS9QAPuRIAnQCJIhbNV+vNUx+gBIAA7c1THJGWAAD14A9CEAe1AO8WAC/X +AoAApqosop4L+worssP3gBW74gCdACyinQvLAee0AAWSiYAAjtj3wBL4kgCdACxirurNvBYQKYAA +L2KtK6Lz6/wBB0P9AAD74A+OYgCdAJjY++APpmIAnQArIBQpMAermQkJRykkFPUgEbXSAJ0AH82t +n3CJIPwAgh3gBRUA5XYCLM4CgAANmQKZcYg2Gc2njK7/mpAFoogdAAmIAajM/OBmFaArBQDuABUD +yEEAAAkAipt3Gc046XYGIeDBAADsBx4DwIEAAAgCY+7jBQPgwQAADAJhL3YQiCDldhIsRgKAAA2I +Aih2EYwziqwMjBSsqup2EyP5gQAA7gAVA9FBAAAKAIopdhbrdhch0EEAAApghg8CZwpAhg8CZS0w +AY8zGM2D8aAFF9AchQAtIAcVzYD6RIQVoN0RAOMxAS7qgoAACN0CLXYgiyApdiIsdiP9YAAVsAw1 +AAy7Aut2ISPIBwAA7uMFBMpBAAAJAmEJAmEuIAcoIQny5SYV4BmlAP7lBhXgCwUA63YlLEUCgAD5 +BgAMce4BAOh2Ji90AoAADq4CBe4C/uSGFaAJtQDsEgIqbwKAAKbdKdad+YAHuVIAnQDAINEPAAAA +AP//fA2gCYUALiE9ZO4G/iAGFeAD7gCO2PfAB+CSAJ0ADEoRpqooop73AAij4gCdACyinQtICiiC +wwjMAevEAAYIQYAAsOmZ2Oe0AA3wfgAA/iAGFeABUgDqJAAJ2ASAAOwSASroBIAAWGhN0qDRDwAA +wMDAugvrNOvWCC5wpgAA+kBoHaAbxQD8ACIdoA0VAFhuvGP/wQAA6iQACtgEgABYafrSoNEPAIsQ ++kBoHaAMFQD7YwAV4A21AFhusmP/l8CgWa+2Hcyqjtj53+y4kgCdAGP/qgAAAOvEAAlQBIAAW+a5 ++5o6Ba/2/gCKJ40RwMDqrCAu2ASAAFhh29Kg0Q//9TwNoAsFAAAAAAAAW/78/iAIFe/0BgD+IAYV +4AoFAFmvnh3Mk47YjxAbzI/53/d4kgCdAP/8PA2gCwUAAAAA//vgDaAMBQDAygzsNP2hBhWv+94A +AAAAbBAK5CIHKlAEgACIIv5A8BWvzwUA5UEVLWcCgADsPAgCIIEAAA9EAaRU5ExALlgEgAD1gCXS +oe4BAC2wB+zc/i2wBIAA5IAIZugNAADAINEPH8xx7RYAJcCBAACYEx3MbPUAJJqiAJ0A5cxsHyAE +gAD1wB9iEgCdAAzrEaW7KbKe7hYBJkAhAAD5ICWbogCdACuynQ3oCiiCwwi7Aee0AAWgGYAAjfia +FNMP96AiyJIAnQApUq7rzNIUoEGAAC5SrS+y8xvMVQ/oAegWAibL/QAA/8AfhmIAnQCZuP/AH8Zi +AJ0ALiAULWAHrt36IIYVp90BAC0kFPWgIW3SAJ0AGczDH8zDjiCINO3MWhpfAoAA5bsID3YCgADx +AAT6UAU1AINjKiEkBewCKCAHLmEB/OBGFeAUhQCUc/zgJhWgiBEA7MxFHEKCgAD5BgAMcAQFAPjg +BhWgCCUA7AAFA+BBAABtigIMAmEtIQksIAeUdf7hJhWgOKUA43YILu0CgAD5pgAOscwBAO12Bi5k +AoAADKoCD6oCmnQpIQkCKgL+wCQVoAwFAOW2nSzdAoAA+WYADbANBQBYaU7AINEPiBOIgPWAIBWg +iRUA9cYACjeIwQB5iRmUce/MixZL/QAA/uAGFeGZHQD44EYV4ABSAJRxiBMZzIiZcIiBCFgUmHKP *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Mar 13 09:48:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51D0D152CE48; Wed, 13 Mar 2019 09:48:34 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E4CB870212; Wed, 13 Mar 2019 09:48:33 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2A628ABD; Wed, 13 Mar 2019 09:48:33 +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 x2D9mXIl094695; Wed, 13 Mar 2019 09:48:33 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2D9mXnG094693; Wed, 13 Mar 2019 09:48:33 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201903130948.x2D9mXnG094693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Wed, 13 Mar 2019 09:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345085 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 345085 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E4CB870212 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 09:48:34 -0000 Author: eugen Date: Wed Mar 13 09:48:33 2019 New Revision: 345085 URL: https://svnweb.freebsd.org/changeset/base/345085 Log: mfi.4, mrsas.4: document how to get ATA TRIM support for SSD while using LSI RAID adapters as it was completely obscure before: mfi has no TRIM support at all and mrsas provides TRIM if underlying adapter does it (for Non-RAID drives generally). Modified: head/share/man/man4/mfi.4 head/share/man/man4/mrsas.4 Modified: head/share/man/man4/mfi.4 ============================================================================== --- head/share/man/man4/mfi.4 Wed Mar 13 09:33:15 2019 (r345084) +++ head/share/man/man4/mfi.4 Wed Mar 13 09:48:33 2019 (r345085) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 15, 2013 +.Dd March 13, 2019 .Dt MFI 4 .Os .Sh NAME @@ -84,6 +84,12 @@ then the driver will reduce its probe priority to allo .Cd mrsas to attach to the card instead of .Nm . +.Pp +.Nm +does not provide ATA TRIM support. +Refer to +.Cd mrsas +if TRIM support is required. .Sh HARDWARE The .Nm Modified: head/share/man/man4/mrsas.4 ============================================================================== --- head/share/man/man4/mrsas.4 Wed Mar 13 09:33:15 2019 (r345084) +++ head/share/man/man4/mrsas.4 Wed Mar 13 09:48:33 2019 (r345085) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 8, 2014 +.Dd Mar 13, 2019 .Dt MRSAS 4 .Os .Sh NAME @@ -117,6 +117,12 @@ at probe call for device id's 0x005B, 0x005D, and 0x005F so that .Nm does not take control of these devices without user intervention. +.Pp +Solid-state drives (SSD) get ATA TRIM support with +.Nm +if underlying adapter allows it. +This may require configuring SSD as Non-RAID drive +rather then JBOD virtual mode. .Sh HARDWARE The .Nm From owner-svn-src-all@freebsd.org Wed Mar 13 15:18:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 248B21536601; Wed, 13 Mar 2019 15:18:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BB2D083C73; Wed, 13 Mar 2019 15:18:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72D2DC4EC; Wed, 13 Mar 2019 15:18:15 +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 x2DFIF5r066270; Wed, 13 Mar 2019 15:18:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DFIFDO066269; Wed, 13 Mar 2019 15:18:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903131518.x2DFIFDO066269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 13 Mar 2019 15:18:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345087 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 345087 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BB2D083C73 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 15:18:16 -0000 Author: emaste Date: Wed Mar 13 15:18:14 2019 New Revision: 345087 URL: https://svnweb.freebsd.org/changeset/base/345087 Log: Use consistent struct stat arg name in stat man page stat, lstat, and fstat use `*sb` as the stat struct pointer arg name, while fstatat previously used `*buf`. MFC after: 1 week Modified: head/lib/libc/sys/stat.2 Modified: head/lib/libc/sys/stat.2 ============================================================================== --- head/lib/libc/sys/stat.2 Wed Mar 13 13:41:05 2019 (r345086) +++ head/lib/libc/sys/stat.2 Wed Mar 13 15:18:14 2019 (r345087) @@ -48,7 +48,7 @@ .Ft int .Fn fstat "int fd" "struct stat *sb" .Ft int -.Fn fstatat "int fd" "const char *path" "struct stat *buf" "int flag" +.Fn fstatat "int fd" "const char *path" "struct stat *sb" "int flag" .Sh DESCRIPTION The .Fn stat From owner-svn-src-all@freebsd.org Wed Mar 13 17:00:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7AAB1539F31; Wed, 13 Mar 2019 17:00:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E66C89A88; Wed, 13 Mar 2019 17:00:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4DAF4D64C; Wed, 13 Mar 2019 17:00:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2DH0GoJ022978; Wed, 13 Mar 2019 17:00:16 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DH0GGY022977; Wed, 13 Mar 2019 17:00:16 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201903131700.x2DH0GGY022977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Wed, 13 Mar 2019 17:00:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345088 - head/libexec/rc X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/libexec/rc X-SVN-Commit-Revision: 345088 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5E66C89A88 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 17:00:16 -0000 Author: bz Date: Wed Mar 13 17:00:15 2019 New Revision: 345088 URL: https://svnweb.freebsd.org/changeset/base/345088 Log: Enhance IPv6 autoconf startup. Before this change we would only run rtsol on an interface which was set to accept_rtadv and did not have rtsold enabled. This change removes the latter condition and always runs rtsol (rather than the deferred rtsold) to reduce the delay until we send the first RS. This change will also handle the accept_rtadv before dhcp hence starting IPv6 auto-configuration before IPV4 DHCP. This change is intended for FreeBSD 13 and later only and will not be MFCed. Reviewed by: hrs Differential Revision: https://reviews.freebsd.org/D19488 Modified: head/libexec/rc/network.subr Modified: head/libexec/rc/network.subr ============================================================================== --- head/libexec/rc/network.subr Wed Mar 13 15:18:14 2019 (r345087) +++ head/libexec/rc/network.subr Wed Mar 13 17:00:15 2019 (r345088) @@ -229,6 +229,11 @@ ifconfig_up() ${IFCONFIG_CMD} $1 up fi + if ! noafif $1 && afexists inet6; then + ipv6_accept_rtadv_up $1 + _cfg=0 + fi + if dhcpif $1; then if [ $_cfg -ne 0 ] ; then ${IFCONFIG_CMD} $1 up @@ -686,7 +691,6 @@ ipv6_up() ifalias ${_if} inet6 alias && _ret=0 ipv6_prefix_hostid_addr_common ${_if} alias && _ret=0 - ipv6_accept_rtadv_up ${_if} && _ret=0 return $_ret } @@ -1198,8 +1202,8 @@ ipv6_accept_rtadv_up() { if ipv6_autoconfif $1; then ${IFCONFIG_CMD} $1 inet6 accept_rtadv up - if ! checkyesno rtsold_enable; then - rtsol ${rtsol_flags} $1 + if [ -x /sbin/rtsol ]; then + /sbin/rtsol ${rtsol_flags} $1 fi fi } From owner-svn-src-all@freebsd.org Wed Mar 13 17:30:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58DC2153ACB1; Wed, 13 Mar 2019 17:30:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F0E518B289; Wed, 13 Mar 2019 17:30:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E290DDB91; Wed, 13 Mar 2019 17:30:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2DHU3UM039303; Wed, 13 Mar 2019 17:30:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DHU3nB039302; Wed, 13 Mar 2019 17:30:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903131730.x2DHU3nB039302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 13 Mar 2019 17:30:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345089 - head/usr.bin/proccontrol X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/usr.bin/proccontrol X-SVN-Commit-Revision: 345089 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F0E518B289 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.935,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 17:30:04 -0000 Author: kib Date: Wed Mar 13 17:30:03 2019 New Revision: 345089 URL: https://svnweb.freebsd.org/changeset/base/345089 Log: Some fixes for proccontrol(1) man page. - Fix markup. - Mention that process can only allow tracing for itself. This is already stated in procctl(2), but requiring knowledge of the syscall description is too much for the tool user. - Clearly state that query mode only works for existing process. Noted and reviewed by: pho Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/usr.bin/proccontrol/proccontrol.1 Modified: head/usr.bin/proccontrol/proccontrol.1 ============================================================================== --- head/usr.bin/proccontrol/proccontrol.1 Wed Mar 13 17:00:15 2019 (r345088) +++ head/usr.bin/proccontrol/proccontrol.1 Wed Mar 13 17:30:03 2019 (r345089) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 22, 2019 +.Dd March 13, 2019 .Dt PROCCONTROL 1 .Os .Sh NAME @@ -62,12 +62,14 @@ Control the Address Space Layout Randomization. Only applicable to the new process spawned. .It Ar trace Control the permission for debuggers to attach. +Note that process is only allowed to enable tracing for itself, +not for any other process. .It Ar trapcap Controls the signalling of capability mode access violations. .El .Pp The -Ar control +.Ar control specifies if the selected .Ar mode should be enabled or disabled. @@ -84,9 +86,13 @@ for detailed description of each mode effects and inte process control facilities. .Pp The -.Op Fl q +.Fl q switch makes the utility query and print the current setting for the selected mode. +The +.Fl q +requires the query target process specification with +.Fl p . .Sh EXIT STATUS .Ex -std .Sh EXAMPLES From owner-svn-src-all@freebsd.org Wed Mar 13 17:42:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80438153B308; Wed, 13 Mar 2019 17:42:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 23C3F8BBE7; Wed, 13 Mar 2019 17:42:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 15943DEEF; Wed, 13 Mar 2019 17:42:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2DHgVrY049284; Wed, 13 Mar 2019 17:42:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DHgV7r049283; Wed, 13 Mar 2019 17:42:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131742.x2DHgV7r049283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 17:42:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345090 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 345090 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 23C3F8BBE7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 17:42:32 -0000 Author: hselasky Date: Wed Mar 13 17:42:31 2019 New Revision: 345090 URL: https://svnweb.freebsd.org/changeset/base/345090 Log: Implement dma_set_mask_and_coherent() in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Modified: head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Wed Mar 13 17:30:03 2019 (r345089) +++ head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Wed Mar 13 17:42:31 2019 (r345090) @@ -119,6 +119,17 @@ dma_set_coherent_mask(struct device *dev, u64 mask) return 0; } +static inline int +dma_set_mask_and_coherent(struct device *dev, u64 mask) +{ + int r; + + r = dma_set_mask(dev, mask); + if (r == 0) + dma_set_coherent_mask(dev, mask); + return (r); +} + static inline void * dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag) From owner-svn-src-all@freebsd.org Wed Mar 13 17:46:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2E4F153B481; Wed, 13 Mar 2019 17:46:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 573728BEA1; Wed, 13 Mar 2019 17:46:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43FB4DEF4; Wed, 13 Mar 2019 17:46:06 +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 x2DHk6t9049987; Wed, 13 Mar 2019 17:46:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DHk67B049986; Wed, 13 Mar 2019 17:46:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131746.x2DHk67B049986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 17:46:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345091 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 345091 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 573728BEA1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 17:46:06 -0000 Author: hselasky Date: Wed Mar 13 17:46:05 2019 New Revision: 345091 URL: https://svnweb.freebsd.org/changeset/base/345091 Log: Implement dev_err_once() function macro in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/device.h Modified: head/sys/compat/linuxkpi/common/include/linux/device.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/device.h Wed Mar 13 17:42:31 2019 (r345090) +++ head/sys/compat/linuxkpi/common/include/linux/device.h Wed Mar 13 17:46:05 2019 (r345091) @@ -183,6 +183,14 @@ show_class_attr_string(struct class *class, #define dev_printk(lvl, dev, fmt, ...) \ device_printf((dev)->bsddev, fmt, ##__VA_ARGS__) +#define dev_err_once(dev, ...) do { \ + static bool __dev_err_once; \ + if (!__dev_err_once) { \ + __dev_err_once = 1; \ + dev_err(dev, __VA_ARGS__); \ + } \ +} while (0) + #define dev_err_ratelimited(dev, ...) do { \ static linux_ratelimit_t __ratelimited; \ if (linux_ratelimited(&__ratelimited)) \ From owner-svn-src-all@freebsd.org Wed Mar 13 17:51:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEB54153B7C3; Wed, 13 Mar 2019 17:51:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F2828C34C; Wed, 13 Mar 2019 17:51:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D437DF2B; Wed, 13 Mar 2019 17:51:08 +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 x2DHp8dX054087; Wed, 13 Mar 2019 17:51:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DHp8we054086; Wed, 13 Mar 2019 17:51:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131751.x2DHp8we054086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 17:51:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345092 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 345092 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8F2828C34C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 17:51:09 -0000 Author: hselasky Date: Wed Mar 13 17:51:08 2019 New Revision: 345092 URL: https://svnweb.freebsd.org/changeset/base/345092 Log: Properly define the DMA attribute values in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/dma-attrs.h Modified: head/sys/compat/linuxkpi/common/include/linux/dma-attrs.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/dma-attrs.h Wed Mar 13 17:46:05 2019 (r345091) +++ head/sys/compat/linuxkpi/common/include/linux/dma-attrs.h Wed Mar 13 17:51:08 2019 (r345092) @@ -31,9 +31,16 @@ #ifndef _LINUX_DMA_ATTR_H_ #define _LINUX_DMA_ATTR_H_ -enum dma_attr { DMA_ATTR_WRITE_BARRIER, DMA_ATTR_WEAK_ORDERING, DMA_ATTR_MAX, }; - -#define __DMA_ATTRS_LONGS BITS_TO_LONGS(DMA_ATTR_MAX) +#define DMA_ATTR_WRITE_BARRIER (1 << 0) +#define DMA_ATTR_WEAK_ORDERING (1 << 1) +#define DMA_ATTR_WRITE_COMBINE (1 << 2) +#define DMA_ATTR_NON_CONSISTENT (1 << 3) +#define DMA_ATTR_NO_KERNEL_MAPPING (1 << 4) +#define DMA_ATTR_SKIP_CPU_SYNC (1 << 5) +#define DMA_ATTR_FORCE_CONTIGUOUS (1 << 6) +#define DMA_ATTR_ALLOC_SINGLE_PAGES (1 << 7) +#define DMA_ATTR_NO_WARN (1 << 8) +#define DMA_ATTR_PRIVILEGED (1 << 9) struct dma_attrs { unsigned long flags; From owner-svn-src-all@freebsd.org Wed Mar 13 17:55:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAAFA153BB63; Wed, 13 Mar 2019 17:55:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 508C78C96F; Wed, 13 Mar 2019 17:55:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E398E0A7; Wed, 13 Mar 2019 17:55:59 +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 x2DHtxqQ056668; Wed, 13 Mar 2019 17:55:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DHtxfT056667; Wed, 13 Mar 2019 17:55:59 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131755.x2DHtxfT056667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 17:55:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345093 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 345093 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 508C78C96F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 17:55:59 -0000 Author: hselasky Date: Wed Mar 13 17:55:58 2019 New Revision: 345093 URL: https://svnweb.freebsd.org/changeset/base/345093 Log: Implement BITS_PER_TYPE() function macro in the LinuxKPI. Fix some style while at it. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/bitops.h Wed Mar 13 17:51:08 2019 (r345092) +++ head/sys/compat/linuxkpi/common/include/linux/bitops.h Wed Mar 13 17:55:58 2019 (r345093) @@ -51,10 +51,11 @@ #define BITMAP_LAST_WORD_MASK(n) (~0UL >> (BITS_PER_LONG - (n))) #define BITS_TO_LONGS(n) howmany((n), BITS_PER_LONG) #define BIT_MASK(nr) (1UL << ((nr) & (BITS_PER_LONG - 1))) -#define BIT_WORD(nr) ((nr) / BITS_PER_LONG) +#define BIT_WORD(nr) ((nr) / BITS_PER_LONG) #define GENMASK(h, l) (((~0UL) >> (BITS_PER_LONG - (h) - 1)) & ((~0UL) << (l))) #define GENMASK_ULL(h, l) (((~0ULL) >> (BITS_PER_LONG_LONG - (h) - 1)) & ((~0ULL) << (l))) -#define BITS_PER_BYTE 8 +#define BITS_PER_BYTE 8 +#define BITS_PER_TYPE(t) (sizeof(t) * BITS_PER_BYTE) #define hweight8(x) bitcount((uint8_t)(x)) #define hweight16(x) bitcount16(x) From owner-svn-src-all@freebsd.org Wed Mar 13 18:00:26 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93B68153BD06; Wed, 13 Mar 2019 18:00:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 35BC78CBBF; Wed, 13 Mar 2019 18:00:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 274C1E0AE; Wed, 13 Mar 2019 18:00:26 +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 x2DI0QVL057564; Wed, 13 Mar 2019 18:00:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DI0QY3057563; Wed, 13 Mar 2019 18:00:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131800.x2DI0QY3057563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 18:00:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345094 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 345094 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 35BC78CBBF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 18:00:26 -0000 Author: hselasky Date: Wed Mar 13 18:00:25 2019 New Revision: 345094 URL: https://svnweb.freebsd.org/changeset/base/345094 Log: Implement DEFINE_STATIC_SRCU() function macro in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/srcu.h Modified: head/sys/compat/linuxkpi/common/include/linux/srcu.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/srcu.h Wed Mar 13 17:55:58 2019 (r345093) +++ head/sys/compat/linuxkpi/common/include/linux/srcu.h Wed Mar 13 18:00:25 2019 (r345094) @@ -34,6 +34,9 @@ struct srcu_struct { #define srcu_dereference(ptr,srcu) ((__typeof(*(ptr)) *)(ptr)) +#define DEFINE_STATIC_SRCU(name) \ + static struct srcu_struct name = {} + /* prototypes */ extern int srcu_read_lock(struct srcu_struct *); From owner-svn-src-all@freebsd.org Wed Mar 13 18:02:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC02F153BF3D; Wed, 13 Mar 2019 18:02:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F0DB8CFDC; Wed, 13 Mar 2019 18:02:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 74DB5E24D; Wed, 13 Mar 2019 18:02:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2DI2m6Y062821; Wed, 13 Mar 2019 18:02:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DI2mPA062820; Wed, 13 Mar 2019 18:02:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131802.x2DI2mPA062820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 18:02:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345095 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 345095 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8F0DB8CFDC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 18:02:49 -0000 Author: hselasky Date: Wed Mar 13 18:02:47 2019 New Revision: 345095 URL: https://svnweb.freebsd.org/changeset/base/345095 Log: Implement ida_free() and ida_alloc_max() in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/idr.h head/sys/compat/linuxkpi/common/src/linux_idr.c Modified: head/sys/compat/linuxkpi/common/include/linux/idr.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/idr.h Wed Mar 13 18:00:25 2019 (r345094) +++ head/sys/compat/linuxkpi/common/include/linux/idr.h Wed Mar 13 18:02:47 2019 (r345095) @@ -112,6 +112,7 @@ struct ida { int ida_pre_get(struct ida *ida, gfp_t gfp_mask); int ida_get_new_above(struct ida *ida, int starting_id, int *p_id); void ida_remove(struct ida *ida, int id); +void ida_free(struct ida *ida, int id); void ida_destroy(struct ida *ida); void ida_init(struct ida *ida); @@ -124,6 +125,13 @@ ida_get_new(struct ida *ida, int *p_id) { return (ida_get_new_above(ida, 0, p_id)); +} + +static inline int +ida_alloc_max(struct ida *ida, unsigned int max, gfp_t gfp) +{ + + return (ida_simple_get(ida, 0, max, gfp)); } static inline bool Modified: head/sys/compat/linuxkpi/common/src/linux_idr.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_idr.c Wed Mar 13 18:00:25 2019 (r345094) +++ head/sys/compat/linuxkpi/common/src/linux_idr.c Wed Mar 13 18:02:47 2019 (r345095) @@ -797,6 +797,13 @@ ida_remove(struct ida *ida, int id) } void +ida_free(struct ida *ida, int id) +{ + + ida_remove(ida, id); +} + +void ida_init(struct ida *ida) { idr_init(&ida->idr); From owner-svn-src-all@freebsd.org Wed Mar 13 18:19:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61A89153C723; Wed, 13 Mar 2019 18:19:37 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 C1C258DB8F; Wed, 13 Mar 2019 18:19:35 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2DIJQ5H021149; Wed, 13 Mar 2019 11:19:26 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2DIJQBY021148; Wed, 13 Mar 2019 11:19:26 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903131819.x2DIJQBY021148@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345088 - head/libexec/rc In-Reply-To: <201903131700.x2DH0GGY022977@repo.freebsd.org> To: "Bjoern A. Zeeb" Date: Wed, 13 Mar 2019 11:19:25 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: C1C258DB8F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 18:19:37 -0000 > Author: bz > Date: Wed Mar 13 17:00:15 2019 > New Revision: 345088 > URL: https://svnweb.freebsd.org/changeset/base/345088 > > Log: > Enhance IPv6 autoconf startup. > > Before this change we would only run rtsol on an interface which was > set to accept_rtadv and did not have rtsold enabled. This change > removes the latter condition and always runs rtsol (rather than the > deferred rtsold) to reduce the delay until we send the first RS. > > This change will also handle the accept_rtadv before dhcp hence > starting IPv6 auto-configuration before IPV4 DHCP. > > This change is intended for FreeBSD 13 and later only and will not be MFCed. May I ask why it has decided that this is not to be merged to stable/12? It looks to me that this fix is very applicable, and should not cause an issue, one simply gets out an RS packet earlier, and your v6 gets set sooner, allowing other configuration stuff that depends on v6 being up working rather than failing. Is there some prior work that is not mergable? Is there some danger of causing a problem? Thanks, Rod > Reviewed by: hrs > Differential Revision: https://reviews.freebsd.org/D19488 > > Modified: > head/libexec/rc/network.subr > > Modified: head/libexec/rc/network.subr > ============================================================================== > --- head/libexec/rc/network.subr Wed Mar 13 15:18:14 2019 (r345087) > +++ head/libexec/rc/network.subr Wed Mar 13 17:00:15 2019 (r345088) > @@ -229,6 +229,11 @@ ifconfig_up() > ${IFCONFIG_CMD} $1 up > fi > > + if ! noafif $1 && afexists inet6; then > + ipv6_accept_rtadv_up $1 > + _cfg=0 > + fi > + > if dhcpif $1; then > if [ $_cfg -ne 0 ] ; then > ${IFCONFIG_CMD} $1 up > @@ -686,7 +691,6 @@ ipv6_up() > > ifalias ${_if} inet6 alias && _ret=0 > ipv6_prefix_hostid_addr_common ${_if} alias && _ret=0 > - ipv6_accept_rtadv_up ${_if} && _ret=0 > > return $_ret > } > @@ -1198,8 +1202,8 @@ ipv6_accept_rtadv_up() > { > if ipv6_autoconfif $1; then > ${IFCONFIG_CMD} $1 inet6 accept_rtadv up > - if ! checkyesno rtsold_enable; then > - rtsol ${rtsol_flags} $1 > + if [ -x /sbin/rtsol ]; then > + /sbin/rtsol ${rtsol_flags} $1 > fi > fi > } > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Wed Mar 13 18:44:36 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47C8C153D561; Wed, 13 Mar 2019 18:44:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 813928FA18; Wed, 13 Mar 2019 18:44:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6B58E939; Wed, 13 Mar 2019 18:44:06 +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 x2DIi60S086427; Wed, 13 Mar 2019 18:44:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DIi6aT086426; Wed, 13 Mar 2019 18:44:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131844.x2DIi6aT086426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 18:44:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345096 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 345096 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 813928FA18 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 18:44:36 -0000 Author: hselasky Date: Wed Mar 13 18:44:06 2019 New Revision: 345096 URL: https://svnweb.freebsd.org/changeset/base/345096 Log: Implement dma_map_page_attrs() in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Modified: head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Wed Mar 13 18:02:47 2019 (r345095) +++ head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Wed Mar 13 18:44:06 2019 (r345096) @@ -185,6 +185,14 @@ dma_unmap_single_attrs(struct device *dev, dma_addr_t { } +static inline dma_addr_t +dma_map_page_attrs(struct device *dev, struct page *page, size_t offset, + size_t size, enum dma_data_direction dir, unsigned long attrs) +{ + + return (VM_PAGE_TO_PHYS(page) + offset); +} + static inline int dma_map_sg_attrs(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir, struct dma_attrs *attrs) From owner-svn-src-all@freebsd.org Wed Mar 13 18:47:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9117153D809; Wed, 13 Mar 2019 18:47:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C6BC68049; Wed, 13 Mar 2019 18:47:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4FA1BE949; Wed, 13 Mar 2019 18:47:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2DIlIZ1086601; Wed, 13 Mar 2019 18:47:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DIlIEw086600; Wed, 13 Mar 2019 18:47:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131847.x2DIlIEw086600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 18:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345097 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 345097 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6C6BC68049 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 18:47:19 -0000 Author: hselasky Date: Wed Mar 13 18:47:17 2019 New Revision: 345097 URL: https://svnweb.freebsd.org/changeset/base/345097 Log: Implement list_for_each_entry_from_reverse() and list_bulk_move_tail() in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/list.h Modified: head/sys/compat/linuxkpi/common/include/linux/list.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/list.h Wed Mar 13 18:44:06 2019 (r345096) +++ head/sys/compat/linuxkpi/common/include/linux/list.h Wed Mar 13 18:47:17 2019 (r345097) @@ -228,6 +228,10 @@ list_del_init(struct list_head *entry) #define list_for_each_prev(p, h) for (p = (h)->prev; p != (h); p = (p)->prev) +#define list_for_each_entry_from_reverse(p, h, field) \ + for (; &p->field != (h); \ + p = list_prev_entry(p, field)) + static inline void list_add(struct list_head *new, struct list_head *head) { @@ -256,6 +260,18 @@ list_move_tail(struct list_head *entry, struct list_he list_del(entry); list_add_tail(entry, head); +} + +static inline void +list_bulk_move_tail(struct list_head *head, struct list_head *first, + struct list_head *last) +{ + first->prev->next = last->next; + last->next->prev = first->prev; + head->prev->next = first; + first->prev = head->prev; + last->next = head; + head->prev = last; } static inline void From owner-svn-src-all@freebsd.org Wed Mar 13 18:51:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAC52153DAE1; Wed, 13 Mar 2019 18:51:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 78378684D3; Wed, 13 Mar 2019 18:51:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 30B22EAB1; Wed, 13 Mar 2019 18:51:34 +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 x2DIpYY4088363; Wed, 13 Mar 2019 18:51:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DIpXfR088361; Wed, 13 Mar 2019 18:51:33 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131851.x2DIpXfR088361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 18:51:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345098 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 345098 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 78378684D3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 18:51:35 -0000 Author: hselasky Date: Wed Mar 13 18:51:33 2019 New Revision: 345098 URL: https://svnweb.freebsd.org/changeset/base/345098 Log: Implement current_exiting() in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h head/sys/compat/linuxkpi/common/src/linux_current.c Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/sched.h Wed Mar 13 18:47:17 2019 (r345097) +++ head/sys/compat/linuxkpi/common/include/linux/sched.h Wed Mar 13 18:51:33 2019 (r345098) @@ -143,6 +143,11 @@ linux_schedule_save_interrupt_value(struct task_struct task->bsd_interrupt_value = value; } +bool linux_task_exiting(struct task_struct *task); + +#define current_exiting() \ + linux_task_exiting(current) + static inline int linux_schedule_get_interrupt_value(struct task_struct *task) { Modified: head/sys/compat/linuxkpi/common/src/linux_current.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_current.c Wed Mar 13 18:47:17 2019 (r345097) +++ head/sys/compat/linuxkpi/common/src/linux_current.c Wed Mar 13 18:51:33 2019 (r345098) @@ -215,6 +215,22 @@ linux_get_pid_task(pid_t pid) return (NULL); } +bool +linux_task_exiting(struct task_struct *task) +{ + struct proc *p; + bool ret; + + ret = false; + p = pfind(task->pid); + if (p != NULL) { + if ((p->p_flag & P_WEXIT) != 0) + ret = true; + PROC_UNLOCK(p); + } + return (ret); +} + static void linux_current_init(void *arg __unused) { From owner-svn-src-all@freebsd.org Wed Mar 13 18:53:30 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32FC5153DBAA; Wed, 13 Mar 2019 18:53:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C57C469AB6; Wed, 13 Mar 2019 18:53: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A90D7EB15; Wed, 13 Mar 2019 18:53:29 +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 x2DIrTEB091674; Wed, 13 Mar 2019 18:53:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DIrTWC091673; Wed, 13 Mar 2019 18:53:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131853.x2DIrTWC091673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 18:53:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345099 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 345099 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C57C469AB6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 18:53:30 -0000 Author: hselasky Date: Wed Mar 13 18:53:29 2019 New Revision: 345099 URL: https://svnweb.freebsd.org/changeset/base/345099 Log: Implement get_task_comm() in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/sched.h Wed Mar 13 18:51:33 2019 (r345098) +++ head/sys/compat/linuxkpi/common/include/linux/sched.h Wed Mar 13 18:53:29 2019 (r345099) @@ -183,4 +183,12 @@ local_clock(void) return ((uint64_t)ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec); } +static inline const char * +get_task_comm(char *buf, struct task_struct *task) +{ + + buf[0] = 0; /* buffer is too small */ + return (task->comm); +} + #endif /* _LINUX_SCHED_H_ */ From owner-svn-src-all@freebsd.org Wed Mar 13 18:55:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4AA1153DCFD; Wed, 13 Mar 2019 18:55:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7C1AC69D39; Wed, 13 Mar 2019 18:55:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C3EBEB1A; Wed, 13 Mar 2019 18:55:42 +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 x2DItgb1091825; Wed, 13 Mar 2019 18:55:42 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DItg7s091824; Wed, 13 Mar 2019 18:55:42 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131855.x2DItg7s091824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 18:55:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345100 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 345100 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7C1AC69D39 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 18:55:43 -0000 Author: hselasky Date: Wed Mar 13 18:55:41 2019 New Revision: 345100 URL: https://svnweb.freebsd.org/changeset/base/345100 Log: Implement task_euid() and get_task_state() function macros in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/sched.h Wed Mar 13 18:53:29 2019 (r345099) +++ head/sys/compat/linuxkpi/common/include/linux/sched.h Wed Mar 13 18:55:41 2019 (r345100) @@ -95,7 +95,9 @@ struct task_struct { #define get_pid(x) (x) #define put_pid(x) do { } while (0) #define current_euid() (curthread->td_ucred->cr_uid) +#define task_euid(task) ((task)->task_thread->td_ucred->cr_uid) +#define get_task_state(task) atomic_read(&(task)->state) #define set_task_state(task, x) atomic_set(&(task)->state, (x)) #define __set_task_state(task, x) ((task)->state.counter = (x)) #define set_current_state(x) set_task_state(current, x) From owner-svn-src-all@freebsd.org Wed Mar 13 19:01:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03189153DFC7; Wed, 13 Mar 2019 19:01:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9EF8B6A38C; Wed, 13 Mar 2019 19:01:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 91100EB8F; Wed, 13 Mar 2019 19:01:56 +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 x2DJ1uKn094644; Wed, 13 Mar 2019 19:01:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DJ1umx094332; Wed, 13 Mar 2019 19:01:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131901.x2DJ1umx094332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 19:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345101 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 345101 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9EF8B6A38C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 19:01:57 -0000 Author: hselasky Date: Wed Mar 13 19:01:55 2019 New Revision: 345101 URL: https://svnweb.freebsd.org/changeset/base/345101 Log: Implement si_meminfo() in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/mm.h head/sys/compat/linuxkpi/common/src/linux_page.c Modified: head/sys/compat/linuxkpi/common/include/linux/mm.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/mm.h Wed Mar 13 18:55:41 2019 (r345100) +++ head/sys/compat/linuxkpi/common/include/linux/mm.h Wed Mar 13 19:01:55 2019 (r345101) @@ -134,6 +134,12 @@ struct vm_operations_struct { int (*access) (struct vm_area_struct *, unsigned long, void *, int, int); }; +struct sysinfo { + uint64_t totalram; + uint64_t totalhigh; + uint32_t mem_unit; +}; + /* * Compute log2 of the power of two rounded up count of pages * needed for size bytes. @@ -268,5 +274,6 @@ vmalloc_to_page(const void *addr) } extern int is_vmalloc_addr(const void *addr); +void si_meminfo(struct sysinfo *si); #endif /* _LINUX_MM_H_ */ Modified: head/sys/compat/linuxkpi/common/src/linux_page.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_page.c Wed Mar 13 18:55:41 2019 (r345100) +++ head/sys/compat/linuxkpi/common/src/linux_page.c Wed Mar 13 19:01:55 2019 (r345101) @@ -63,6 +63,14 @@ __FBSDID("$FreeBSD$"); #include #include +void +si_meminfo(struct sysinfo *si) +{ + si->totalram = physmem; + si->totalhigh = 0; + si->mem_unit = PAGE_SIZE; +} + void * linux_page_address(struct page *page) { From owner-svn-src-all@freebsd.org Wed Mar 13 19:04:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D901B153E1D6; Wed, 13 Mar 2019 19:04:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7BD296A671; Wed, 13 Mar 2019 19:04:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D6CBECCF; Wed, 13 Mar 2019 19:04:06 +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 x2DJ4699097127; Wed, 13 Mar 2019 19:04:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DJ46eX097126; Wed, 13 Mar 2019 19:04:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131904.x2DJ46eX097126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 19:04:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345102 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 345102 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7BD296A671 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 19:04:07 -0000 Author: hselasky Date: Wed Mar 13 19:04:06 2019 New Revision: 345102 URL: https://svnweb.freebsd.org/changeset/base/345102 Log: Implement IS_ALIGNED() and DIV_ROUND_DOWN_ULL() function macros in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kernel.h Wed Mar 13 19:01:55 2019 (r345101) +++ head/sys/compat/linuxkpi/common/include/linux/kernel.h Wed Mar 13 19:04:06 2019 (r345102) @@ -130,9 +130,11 @@ #define ALIGN(x, y) roundup2((x), (y)) #undef PTR_ALIGN #define PTR_ALIGN(p, a) ((__typeof(p))ALIGN((uintptr_t)(p), (a))) +#define IS_ALIGNED(x, a) (((x) & ((__typeof(x))(a) - 1)) == 0) #define DIV_ROUND_UP(x, n) howmany(x, n) #define __KERNEL_DIV_ROUND_UP(x, n) howmany(x, n) #define DIV_ROUND_UP_ULL(x, n) DIV_ROUND_UP((unsigned long long)(x), (n)) +#define DIV_ROUND_DOWN_ULL(x, n) (((unsigned long long)(x) / (n)) * (n)) #define FIELD_SIZEOF(t, f) sizeof(((t *)0)->f) #define printk(...) printf(__VA_ARGS__) From owner-svn-src-all@freebsd.org Wed Mar 13 19:14:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5924153E996; Wed, 13 Mar 2019 19:14:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B15E6B00D; Wed, 13 Mar 2019 19:14:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x2DJElDs004443 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 13 Mar 2019 21:14:50 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x2DJElDs004443 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x2DJElfT004442; Wed, 13 Mar 2019 21:14:47 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 13 Mar 2019 21:14:47 +0200 From: Konstantin Belousov To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r345100 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <20190313191447.GC2492@kib.kiev.ua> References: <201903131855.x2DItg7s091824@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201903131855.x2DItg7s091824@repo.freebsd.org> User-Agent: Mutt/1.11.3 (2019-02-01) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 19:14:56 -0000 On Wed, Mar 13, 2019 at 06:55:42PM +0000, Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Mar 13 18:55:41 2019 > New Revision: 345100 > URL: https://svnweb.freebsd.org/changeset/base/345100 > > Log: > Implement task_euid() and get_task_state() function macros in the LinuxKPI. > > Submitted by: Johannes Lundberg > MFC after: 1 week > Sponsored by: Limelight Networks > Sponsored by: Mellanox Technologies > > Modified: > head/sys/compat/linuxkpi/common/include/linux/sched.h > > Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h > ============================================================================== > --- head/sys/compat/linuxkpi/common/include/linux/sched.h Wed Mar 13 18:53:29 2019 (r345099) > +++ head/sys/compat/linuxkpi/common/include/linux/sched.h Wed Mar 13 18:55:41 2019 (r345100) > @@ -95,7 +95,9 @@ struct task_struct { > #define get_pid(x) (x) > #define put_pid(x) do { } while (0) > #define current_euid() (curthread->td_ucred->cr_uid) > +#define task_euid(task) ((task)->task_thread->td_ucred->cr_uid) This looks very strange if you compare the definition of task_euid() with the definition of linux_task_exiting() in r345098. There you access td_ucred which is basically volatile and invalid unless the thread is known to be inhibited or sleeping (and not exiting). So to use the macro safely for task not associated with current thread, you must have very strong and unusual external guarantees. On the other hand, linux_task_exiting() correctly locks the target process. But, since the lock is dropped before the function returns, the process might exit wheh the callers gets to use the result. Again, some external guarantees must be ensured to give safe use for this macro as well, for the target process != curproc. > > +#define get_task_state(task) atomic_read(&(task)->state) > #define set_task_state(task, x) atomic_set(&(task)->state, (x)) > #define __set_task_state(task, x) ((task)->state.counter = (x)) > #define set_current_state(x) set_task_state(current, x) From owner-svn-src-all@freebsd.org Wed Mar 13 19:15:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFF83153EA33; Wed, 13 Mar 2019 19:15:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 636506B1B5; Wed, 13 Mar 2019 19:15: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4F35FEEC2; Wed, 13 Mar 2019 19:15: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 x2DJFbSR002503; Wed, 13 Mar 2019 19:15:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DJFbRk002502; Wed, 13 Mar 2019 19:15:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131915.x2DJFbRk002502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 19:15:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345103 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 345103 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 636506B1B5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 19:15:38 -0000 Author: hselasky Date: Wed Mar 13 19:15:36 2019 New Revision: 345103 URL: https://svnweb.freebsd.org/changeset/base/345103 Log: Implement more PCI speed related functions and macros in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/pci.h Wed Mar 13 19:04:06 2019 (r345102) +++ head/sys/compat/linuxkpi/common/include/linux/pci.h Wed Mar 13 19:15:36 2019 (r345103) @@ -139,10 +139,13 @@ struct pci_device_id { #define PCI_EXP_TYPE_RC_EC PCIEM_TYPE_ROOT_EC /* Root Complex Event Collector */ #define PCI_EXP_LNKCAP_SLS_2_5GB 0x01 /* Supported Link Speed 2.5GT/s */ #define PCI_EXP_LNKCAP_SLS_5_0GB 0x02 /* Supported Link Speed 5.0GT/s */ +#define PCI_EXP_LNKCAP_SLS_8_0GB 0x04 /* Supported Link Speed 8.0GT/s */ +#define PCI_EXP_LNKCAP_SLS_16_0GB 0x08 /* Supported Link Speed 16.0GT/s */ #define PCI_EXP_LNKCAP_MLW 0x03f0 /* Maximum Link Width */ #define PCI_EXP_LNKCAP2_SLS_2_5GB 0x02 /* Supported Link Speed 2.5GT/s */ #define PCI_EXP_LNKCAP2_SLS_5_0GB 0x04 /* Supported Link Speed 5.0GT/s */ #define PCI_EXP_LNKCAP2_SLS_8_0GB 0x08 /* Supported Link Speed 8.0GT/s */ +#define PCI_EXP_LNKCAP2_SLS_16_0GB 0x10 /* Supported Link Speed 16.0GT/s */ #define PCI_EXP_LNKCTL_HAWD PCIEM_LINK_CTL_HAWD #define PCI_EXP_LNKCAP_CLKPM 0x00040000 @@ -157,10 +160,19 @@ enum pci_bus_speed { PCIE_SPEED_2_5GT, PCIE_SPEED_5_0GT, PCIE_SPEED_8_0GT, + PCIE_SPEED_16_0GT, }; enum pcie_link_width { - PCIE_LNK_WIDTH_UNKNOWN = 0xFF, + PCIE_LNK_WIDTH_RESRV = 0x00, + PCIE_LNK_X1 = 0x01, + PCIE_LNK_X2 = 0x02, + PCIE_LNK_X4 = 0x04, + PCIE_LNK_X8 = 0x08, + PCIE_LNK_X12 = 0x0c, + PCIE_LNK_X16 = 0x10, + PCIE_LNK_X32 = 0x20, + PCIE_LNK_WIDTH_UNKNOWN = 0xff, }; typedef int pci_power_t; @@ -848,6 +860,67 @@ static inline int pci_num_vf(struct pci_dev *dev) { return (0); +} + +static inline enum pci_bus_speed +pcie_get_speed_cap(struct pci_dev *dev) +{ + device_t root; + uint32_t lnkcap, lnkcap2; + int error, pos; + + root = device_get_parent(dev->dev.bsddev); + if (root == NULL) + return (PCI_SPEED_UNKNOWN); + root = device_get_parent(root); + if (root == NULL) + return (PCI_SPEED_UNKNOWN); + root = device_get_parent(root); + if (root == NULL) + return (PCI_SPEED_UNKNOWN); + + if (pci_get_vendor(root) == PCI_VENDOR_ID_VIA || + pci_get_vendor(root) == PCI_VENDOR_ID_SERVERWORKS) + return (PCI_SPEED_UNKNOWN); + + if ((error = pci_find_cap(root, PCIY_EXPRESS, &pos)) != 0) + return (PCI_SPEED_UNKNOWN); + + lnkcap2 = pci_read_config(root, pos + PCIER_LINK_CAP2, 4); + + if (lnkcap2) { /* PCIe r3.0-compliant */ + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_2_5GB) + return (PCIE_SPEED_2_5GT); + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_5_0GB) + return (PCIE_SPEED_5_0GT); + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_8_0GB) + return (PCIE_SPEED_8_0GT); + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_16_0GB) + return (PCIE_SPEED_16_0GT); + } else { /* pre-r3.0 */ + lnkcap = pci_read_config(root, pos + PCIER_LINK_CAP, 4); + if (lnkcap & PCI_EXP_LNKCAP_SLS_2_5GB) + return (PCIE_SPEED_2_5GT); + if (lnkcap & PCI_EXP_LNKCAP_SLS_5_0GB) + return (PCIE_SPEED_5_0GT); + if (lnkcap & PCI_EXP_LNKCAP_SLS_8_0GB) + return (PCIE_SPEED_8_0GT); + if (lnkcap & PCI_EXP_LNKCAP_SLS_16_0GB) + return (PCIE_SPEED_16_0GT); + } + return (PCI_SPEED_UNKNOWN); +} + +static inline enum pcie_link_width +pcie_get_width_cap(struct pci_dev *dev) +{ + uint32_t lnkcap; + + pcie_capability_read_dword(dev, PCI_EXP_LNKCAP, &lnkcap); + if (lnkcap) + return ((lnkcap & PCI_EXP_LNKCAP_MLW) >> 4); + + return (PCIE_LNK_WIDTH_UNKNOWN); } #endif /* _LINUX_PCI_H_ */ From owner-svn-src-all@freebsd.org Wed Mar 13 19:17:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D88C6153EB93; Wed, 13 Mar 2019 19:17:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 788766B429; Wed, 13 Mar 2019 19:17: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 623A3EEC8; Wed, 13 Mar 2019 19:17: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 x2DJHrt1002785; Wed, 13 Mar 2019 19:17:53 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DJHr9g002781; Wed, 13 Mar 2019 19:17:53 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131917.x2DJHr9g002781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 19:17:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345104 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 345104 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 788766B429 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 19:17:54 -0000 Author: hselasky Date: Wed Mar 13 19:17:52 2019 New Revision: 345104 URL: https://svnweb.freebsd.org/changeset/base/345104 Log: Implement more malloc function macros in the LinuxKPI. Fix arguments for currently unused kvmalloc(). Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/slab.h Modified: head/sys/compat/linuxkpi/common/include/linux/slab.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/slab.h Wed Mar 13 19:15:36 2019 (r345103) +++ head/sys/compat/linuxkpi/common/include/linux/slab.h Wed Mar 13 19:17:52 2019 (r345104) @@ -42,7 +42,9 @@ MALLOC_DECLARE(M_KMALLOC); -#define kvmalloc(size) kmalloc(size, 0) +#define kvmalloc(size, flags) kmalloc(size, flags) +#define kvzalloc(size, flags) kmalloc(size, (flags) | __GFP_ZERO) +#define kvcalloc(n, size, flags) kvmalloc_array(n, size, (flags) | __GFP_ZERO) #define kzalloc(size, flags) kmalloc(size, (flags) | __GFP_ZERO) #define kzalloc_node(size, flags, node) kmalloc(size, (flags) | __GFP_ZERO) #define kfree_const(ptr) kfree(ptr) From owner-svn-src-all@freebsd.org Wed Mar 13 19:21:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2751F153EF1A; Wed, 13 Mar 2019 19:21:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDBA86B9D1; Wed, 13 Mar 2019 19:21:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AFEC0EEFF; Wed, 13 Mar 2019 19:21:19 +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 x2DJLJI1003818; Wed, 13 Mar 2019 19:21:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DJLJ0l003817; Wed, 13 Mar 2019 19:21:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131921.x2DJLJ0l003817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 19:21:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345105 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 345105 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BDBA86B9D1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 19:21:20 -0000 Author: hselasky Date: Wed Mar 13 19:21:19 2019 New Revision: 345105 URL: https://svnweb.freebsd.org/changeset/base/345105 Log: Honor SYSCTL function return values when creating sysfs nodes in the LinuxKPI. Return proper error code upon failure. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/sysfs.h Modified: head/sys/compat/linuxkpi/common/include/linux/sysfs.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/sysfs.h Wed Mar 13 19:17:52 2019 (r345104) +++ head/sys/compat/linuxkpi/common/include/linux/sysfs.h Wed Mar 13 19:21:19 2019 (r345105) @@ -132,10 +132,14 @@ out: static inline int sysfs_create_file(struct kobject *kobj, const struct attribute *attr) { + struct sysctl_oid *oid; - SYSCTL_ADD_OID(NULL, SYSCTL_CHILDREN(kobj->oidp), OID_AUTO, + oid = SYSCTL_ADD_OID(NULL, SYSCTL_CHILDREN(kobj->oidp), OID_AUTO, attr->name, CTLTYPE_STRING|CTLFLAG_RW|CTLFLAG_MPSAFE, kobj, (uintptr_t)attr, sysctl_handle_attr, "A", ""); + if (!oid) { + return (-ENOMEM); + } return (0); } @@ -176,9 +180,14 @@ sysfs_create_group(struct kobject *kobj, const struct static inline int sysfs_create_dir(struct kobject *kobj) { + struct sysctl_oid *oid; - kobj->oidp = SYSCTL_ADD_NODE(NULL, SYSCTL_CHILDREN(kobj->parent->oidp), + oid = SYSCTL_ADD_NODE(NULL, SYSCTL_CHILDREN(kobj->parent->oidp), OID_AUTO, kobj->name, CTLFLAG_RD|CTLFLAG_MPSAFE, NULL, kobj->name); + if (!oid) { + return (-ENOMEM); + } + kobj->oidp = oid; return (0); } From owner-svn-src-all@freebsd.org Wed Mar 13 19:24:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A91A153F05F; Wed, 13 Mar 2019 19:24:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E9256BCF4; Wed, 13 Mar 2019 19:24: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3147EF084; Wed, 13 Mar 2019 19:24:31 +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 x2DJOVlV007694; Wed, 13 Mar 2019 19:24:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DJOVt6007693; Wed, 13 Mar 2019 19:24:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131924.x2DJOVt6007693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 19:24:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345106 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 345106 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3E9256BCF4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 19:24:31 -0000 Author: hselasky Date: Wed Mar 13 19:24:30 2019 New Revision: 345106 URL: https://svnweb.freebsd.org/changeset/base/345106 Log: Define some RCU debug macros in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/rcupdate.h Modified: head/sys/compat/linuxkpi/common/include/linux/rcupdate.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/rcupdate.h Wed Mar 13 19:21:19 2019 (r345105) +++ head/sys/compat/linuxkpi/common/include/linux/rcupdate.h Wed Mar 13 19:24:30 2019 (r345106) @@ -100,4 +100,10 @@ extern void linux_rcu_read_lock(void); extern void linux_rcu_read_unlock(void); extern void linux_synchronize_rcu(void); +/* Empty implementation for !DEBUG */ +#define init_rcu_head(...) +#define destroy_rcu_head(...) +#define init_rcu_head_on_stack(...) +#define destroy_rcu_head_on_stack(...) + #endif /* _LINUX_RCUPDATE_H_ */ From owner-svn-src-all@freebsd.org Wed Mar 13 19:26:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A87CE153F14B; Wed, 13 Mar 2019 19:26:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 44CE16BEC6; Wed, 13 Mar 2019 19:26:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 36E5BF087; Wed, 13 Mar 2019 19:26:25 +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 x2DJQPZb007825; Wed, 13 Mar 2019 19:26:25 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DJQPnR007824; Wed, 13 Mar 2019 19:26:25 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131926.x2DJQPnR007824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 19:26:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345107 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 345107 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 44CE16BEC6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 19:26:25 -0000 Author: hselasky Date: Wed Mar 13 19:26:24 2019 New Revision: 345107 URL: https://svnweb.freebsd.org/changeset/base/345107 Log: Implement pr_info_ratelimited() function macro in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/printk.h Modified: head/sys/compat/linuxkpi/common/include/linux/printk.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/printk.h Wed Mar 13 19:24:30 2019 (r345106) +++ head/sys/compat/linuxkpi/common/include/linux/printk.h Wed Mar 13 19:26:24 2019 (r345107) @@ -121,4 +121,7 @@ print_hex_dump_bytes(const char *prefix_str, const int #define pr_err_ratelimited(fmt, ...) \ printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) +#define pr_info_ratelimited(fmt, ...) \ + printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) + #endif /* _LINUX_PRINTK_H_ */ From owner-svn-src-all@freebsd.org Wed Mar 13 19:30:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4060D153F241; Wed, 13 Mar 2019 19:30:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D78A16C114; Wed, 13 Mar 2019 19:30:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C9AECF09A; Wed, 13 Mar 2019 19:30:40 +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 x2DJUeYB008055; Wed, 13 Mar 2019 19:30:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DJUegV008054; Wed, 13 Mar 2019 19:30:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131930.x2DJUegV008054@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 19:30:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345108 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 345108 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D78A16C114 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 19:30:41 -0000 Author: hselasky Date: Wed Mar 13 19:30:40 2019 New Revision: 345108 URL: https://svnweb.freebsd.org/changeset/base/345108 Log: Define SG_CHAIN and SG_END in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Modified: head/sys/compat/linuxkpi/common/include/linux/scatterlist.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Wed Mar 13 19:26:24 2019 (r345107) +++ head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Wed Mar 13 19:30:40 2019 (r345108) @@ -69,6 +69,8 @@ struct sg_page_iter { #define SG_MAX_SINGLE_ALLOC (PAGE_SIZE / sizeof(struct scatterlist)) #define SG_MAGIC 0x87654321UL +#define SG_CHAIN SG_PAGE_LINK_CHAIN +#define SG_END SG_PAGE_LINK_LAST #define sg_is_chain(sg) ((sg)->page_link & SG_PAGE_LINK_CHAIN) #define sg_is_last(sg) ((sg)->page_link & SG_PAGE_LINK_LAST) From owner-svn-src-all@freebsd.org Wed Mar 13 19:31:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8641153F29E; Wed, 13 Mar 2019 19:31:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 453D86C422; Wed, 13 Mar 2019 19:31:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 39325F1F3; Wed, 13 Mar 2019 19:31:34 +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 x2DJVYGr012136; Wed, 13 Mar 2019 19:31:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DJVYlY012135; Wed, 13 Mar 2019 19:31:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131931.x2DJVYlY012135@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 19:31:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345109 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 345109 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 453D86C422 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 19:31:34 -0000 Author: hselasky Date: Wed Mar 13 19:31:33 2019 New Revision: 345109 URL: https://svnweb.freebsd.org/changeset/base/345109 Log: Implement sg_virt() function in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Modified: head/sys/compat/linuxkpi/common/include/linux/scatterlist.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Wed Mar 13 19:30:40 2019 (r345108) +++ head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Wed Mar 13 19:31:33 2019 (r345109) @@ -137,6 +137,13 @@ sg_phys(struct scatterlist *sg) return (VM_PAGE_TO_PHYS(sg_page(sg)) + sg->offset); } +static inline void * +sg_virt(struct scatterlist *sg) +{ + + return ((void *)((unsigned long)page_address(sg_page(sg)) + sg->offset)); +} + static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents, struct scatterlist *sgl) From owner-svn-src-all@freebsd.org Wed Mar 13 19:36:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F9DE153F5A4; Wed, 13 Mar 2019 19:36:50 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CF686C789; Wed, 13 Mar 2019 19:36:49 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [176.74.212.121]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 3CEA726027C; Wed, 13 Mar 2019 20:36:47 +0100 (CET) Subject: Re: svn commit: r345100 - head/sys/compat/linuxkpi/common/include/linux To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201903131855.x2DItg7s091824@repo.freebsd.org> <20190313191447.GC2492@kib.kiev.ua> From: Hans Petter Selasky Message-ID: <57128db9-2ea0-f4e7-87d9-205397c9cbd2@selasky.org> Date: Wed, 13 Mar 2019 20:36:22 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190313191447.GC2492@kib.kiev.ua> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 9CF686C789 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.979,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 19:36:50 -0000 On 3/13/19 8:14 PM, Konstantin Belousov wrote: > On Wed, Mar 13, 2019 at 06:55:42PM +0000, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Wed Mar 13 18:55:41 2019 >> New Revision: 345100 >> URL: https://svnweb.freebsd.org/changeset/base/345100 >> >> Log: >> Implement task_euid() and get_task_state() function macros in the LinuxKPI. >> >> Submitted by: Johannes Lundberg >> MFC after: 1 week >> Sponsored by: Limelight Networks >> Sponsored by: Mellanox Technologies >> >> Modified: >> head/sys/compat/linuxkpi/common/include/linux/sched.h >> >> Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h >> ============================================================================== >> --- head/sys/compat/linuxkpi/common/include/linux/sched.h Wed Mar 13 18:53:29 2019 (r345099) >> +++ head/sys/compat/linuxkpi/common/include/linux/sched.h Wed Mar 13 18:55:41 2019 (r345100) >> @@ -95,7 +95,9 @@ struct task_struct { >> #define get_pid(x) (x) >> #define put_pid(x) do { } while (0) >> #define current_euid() (curthread->td_ucred->cr_uid) >> +#define task_euid(task) ((task)->task_thread->td_ucred->cr_uid) > This looks very strange if you compare the definition of task_euid() > with the definition of linux_task_exiting() in r345098. > > There you access td_ucred which is basically volatile and invalid unless > the thread is known to be inhibited or sleeping (and not exiting). So > to use the macro safely for task not associated with current thread, > you must have very strong and unusual external guarantees. > > On the other hand, linux_task_exiting() correctly locks the target process. > But, since the lock is dropped before the function returns, the process > might exit wheh the callers gets to use the result. Again, some external > guarantees must be ensured to give safe use for this macro as well, for > the target process != curproc. Thanks for the feedback. I've forwarded it to Johannes Lundberg. There are more patches at: https://reviews.freebsd.org/D19565 --HPS From owner-svn-src-all@freebsd.org Wed Mar 13 19:53:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8127F153FCBD; Wed, 13 Mar 2019 19:53:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D7A566D1F6; Wed, 13 Mar 2019 19:53:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B6964F5C1; Wed, 13 Mar 2019 19:53:20 +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 x2DJrKPg023538; Wed, 13 Mar 2019 19:53:20 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DJrK21023537; Wed, 13 Mar 2019 19:53:20 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903131953.x2DJrK21023537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 13 Mar 2019 19:53:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345110 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 345110 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D7A566D1F6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 19:53:21 -0000 Author: hselasky Date: Wed Mar 13 19:53:20 2019 New Revision: 345110 URL: https://svnweb.freebsd.org/changeset/base/345110 Log: Resolve duplicate symbol name conflict after r345095, when building LINT. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/idr.h head/sys/compat/linuxkpi/common/src/linux_idr.c Modified: head/sys/compat/linuxkpi/common/include/linux/idr.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/idr.h Wed Mar 13 19:31:33 2019 (r345109) +++ head/sys/compat/linuxkpi/common/include/linux/idr.h Wed Mar 13 19:53:20 2019 (r345110) @@ -112,13 +112,19 @@ struct ida { int ida_pre_get(struct ida *ida, gfp_t gfp_mask); int ida_get_new_above(struct ida *ida, int starting_id, int *p_id); void ida_remove(struct ida *ida, int id); -void ida_free(struct ida *ida, int id); void ida_destroy(struct ida *ida); void ida_init(struct ida *ida); int ida_simple_get(struct ida *ida, unsigned int start, unsigned int end, gfp_t gfp_mask); void ida_simple_remove(struct ida *ida, unsigned int id); + +static inline void +ida_free(struct ida *ida, int id) +{ + + ida_remove(ida, id); +} static inline int ida_get_new(struct ida *ida, int *p_id) Modified: head/sys/compat/linuxkpi/common/src/linux_idr.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_idr.c Wed Mar 13 19:31:33 2019 (r345109) +++ head/sys/compat/linuxkpi/common/src/linux_idr.c Wed Mar 13 19:53:20 2019 (r345110) @@ -797,13 +797,6 @@ ida_remove(struct ida *ida, int id) } void -ida_free(struct ida *ida, int id) -{ - - ida_remove(ida, id); -} - -void ida_init(struct ida *ida) { idr_init(&ida->idr); From owner-svn-src-all@freebsd.org Wed Mar 13 20:26:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DFC61540F11; Wed, 13 Mar 2019 20:26:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDDF36EA0F; Wed, 13 Mar 2019 20:26:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6EDDFFAEE; Wed, 13 Mar 2019 20:26:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2DKQS51040053; Wed, 13 Mar 2019 20:26:28 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DKQSa6040052; Wed, 13 Mar 2019 20:26:28 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903132026.x2DKQSa6040052@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 13 Mar 2019 20:26:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345111 - stable/12/sys/cam/ctl X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cam/ctl X-SVN-Commit-Revision: 345111 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BDDF36EA0F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 20:26:33 -0000 Author: mav Date: Wed Mar 13 20:26:27 2019 New Revision: 345111 URL: https://svnweb.freebsd.org/changeset/base/345111 Log: MFC r344586: Scrap some debug printf's, unused for years. Modified: stable/12/sys/cam/ctl/ctl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/ctl/ctl.c ============================================================================== --- stable/12/sys/cam/ctl/ctl.c Wed Mar 13 19:53:20 2019 (r345110) +++ stable/12/sys/cam/ctl/ctl.c Wed Mar 13 20:26:27 2019 (r345111) @@ -1454,12 +1454,6 @@ ctl_isc_event_handler(ctl_ha_channel channel, ctl_ha_e if (softc->ha_mode != CTL_HA_MODE_XFER) io->io_hdr.flags |= CTL_FLAG_INT_COPY; io->io_hdr.nexus = msg->hdr.nexus; -#if 0 - printf("port %u, iid %u, lun %u\n", - io->io_hdr.nexus.targ_port, - io->io_hdr.nexus.initid, - io->io_hdr.nexus.targ_lun); -#endif io->scsiio.tag_num = msg->scsi.tag_num; io->scsiio.tag_type = msg->scsi.tag_type; #ifdef CTL_TIME_IO @@ -1539,11 +1533,6 @@ ctl_isc_event_handler(ctl_ha_channel channel, ctl_ha_e msg->dt.cur_sg_entries); i++, j++) { sgl[i].addr = msg->dt.sg_list[j].addr; sgl[i].len = msg->dt.sg_list[j].len; - -#if 0 - printf("%s: DATAMOVE: %p,%lu j=%d, i=%d\n", - __func__, sgl[i].addr, sgl[i].len, j, i); -#endif } /* @@ -6468,11 +6457,6 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) && (subpage == SMS_SUBPAGE_PAGE_0)) continue; -#if 0 - printf("found page %#x len %d\n", - page_index->page_code & SMPH_PC_MASK, - page_index->page_len); -#endif page_len += page_index->page_len; } break; @@ -6505,12 +6489,6 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) && (subpage != SMS_SUBPAGE_ALL)) continue; -#if 0 - printf("found page %#x len %d\n", - page_index->page_code & SMPH_PC_MASK, - page_index->page_len); -#endif - page_len += page_index->page_len; } @@ -6529,10 +6507,6 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) } total_len = header_len + page_len; -#if 0 - printf("header_len = %d, page_len = %d, total_len = %d\n", - header_len, page_len, total_len); -#endif ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; @@ -8220,10 +8194,6 @@ ctl_persistent_reserve_out(struct ctl_scsiio *ctsio) case SPRO_REGISTER: case SPRO_REG_IGNO: { -#if 0 - printf("Registration received\n"); -#endif - /* * We don't support any of these options, as we report in * the read capabilities request (see @@ -8336,9 +8306,6 @@ ctl_persistent_reserve_out(struct ctl_scsiio *ctsio) break; } case SPRO_RESERVE: -#if 0 - printf("Reserve executed type %d\n", type); -#endif mtx_lock(&lun->lun_lock); if (lun->flags & CTL_LUN_PR_RESERVED) { /* @@ -11900,15 +11867,8 @@ ctl_abort_task(union ctl_io *io) struct ctl_softc *softc = CTL_SOFTC(io); union ctl_io *xio; struct ctl_lun *lun; -#if 0 - struct sbuf sb; - char printbuf[128]; -#endif - int found; uint32_t targ_lun; - found = 0; - /* * Look up the LUN. */ @@ -11921,11 +11881,6 @@ ctl_abort_task(union ctl_io *io) return (1); } -#if 0 - printf("ctl_abort_task: called for lun %lld, tag %d type %d\n", - lun->lun, io->taskio.tag_num, io->taskio.tag_type); -#endif - mtx_lock(&lun->lun_lock); mtx_unlock(&softc->ctl_lock); /* @@ -11937,25 +11892,7 @@ ctl_abort_task(union ctl_io *io) */ for (xio = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); xio != NULL; xio = (union ctl_io *)TAILQ_NEXT(&xio->io_hdr, ooa_links)) { -#if 0 - sbuf_new(&sb, printbuf, sizeof(printbuf), SBUF_FIXEDLEN); - sbuf_printf(&sb, "LUN %lld tag %d type %d%s%s%s%s: ", - lun->lun, xio->scsiio.tag_num, - xio->scsiio.tag_type, - (xio->io_hdr.blocked_links.tqe_prev - == NULL) ? "" : " BLOCKED", - (xio->io_hdr.flags & - CTL_FLAG_DMA_INPROG) ? " DMA" : "", - (xio->io_hdr.flags & - CTL_FLAG_ABORT) ? " ABORT" : "", - (xio->io_hdr.flags & - CTL_FLAG_IS_WAS_ON_RTR ? " RTR" : "")); - ctl_scsi_command_string(&xio->scsiio, NULL, &sb); - sbuf_finish(&sb); - printf("%s\n", sbuf_data(&sb)); -#endif - if ((xio->io_hdr.nexus.targ_port != io->io_hdr.nexus.targ_port) || (xio->io_hdr.nexus.initid != io->io_hdr.nexus.initid) || (xio->io_hdr.flags & CTL_FLAG_ABORT)) @@ -11972,8 +11909,8 @@ ctl_abort_task(union ctl_io *io) #if 0 if (((xio->scsiio.tag_type == CTL_TAG_UNTAGGED) && (io->taskio.tag_type == CTL_TAG_UNTAGGED)) - || (xio->scsiio.tag_num == io->taskio.tag_num)) -#endif + || (xio->scsiio.tag_num == io->taskio.tag_num)) { +#else /* * XXX KDM we've got problems with FC, because it * doesn't send down a tag type with aborts. So we @@ -11982,8 +11919,8 @@ ctl_abort_task(union ctl_io *io) * Need to figure that out!! */ if (xio->scsiio.tag_num == io->taskio.tag_num) { +#endif xio->io_hdr.flags |= CTL_FLAG_ABORT; - found = 1; if ((io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) == 0 && !(lun->flags & CTL_LUN_PRIMARY_SC)) { union ctl_ha_msg msg_info; @@ -11995,34 +11932,12 @@ ctl_abort_task(union ctl_io *io) msg_info.hdr.msg_type = CTL_MSG_MANAGE_TASKS; msg_info.hdr.original_sc = NULL; msg_info.hdr.serializing_sc = NULL; -#if 0 - printf("Sent Abort to other side\n"); -#endif ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, sizeof(msg_info.task), M_NOWAIT); } -#if 0 - printf("ctl_abort_task: found I/O to abort\n"); -#endif } } mtx_unlock(&lun->lun_lock); - - if (found == 0) { - /* - * This isn't really an error. It's entirely possible for - * the abort and command completion to cross on the wire. - * This is more of an informative/diagnostic error. - */ -#if 0 - printf("ctl_abort_task: ABORT sent for nonexistent I/O: " - "%u:%u:%u tag %d type %d\n", - io->io_hdr.nexus.initid, - io->io_hdr.nexus.targ_port, - io->io_hdr.nexus.targ_lun, io->taskio.tag_num, - io->taskio.tag_type); -#endif - } io->taskio.task_status = CTL_TASK_FUNCTION_COMPLETE; return (0); } @@ -12590,11 +12505,6 @@ ctl_datamove_remote_write(union ctl_io *io) static int ctl_datamove_remote_dm_read_cb(union ctl_io *io) { -#if 0 - char str[256]; - char path_str[64]; - struct sbuf sb; -#endif uint32_t i; for (i = 0; i < io->scsiio.kern_sg_entries; i++) @@ -12603,23 +12513,6 @@ ctl_datamove_remote_dm_read_cb(union ctl_io *io) CTL_RSGL(io) = NULL; CTL_LSGL(io) = NULL; -#if 0 - scsi_path_string(io, path_str, sizeof(path_str)); - sbuf_new(&sb, str, sizeof(str), SBUF_FIXEDLEN); - sbuf_cat(&sb, path_str); - scsi_command_string(&io->scsiio, NULL, &sb); - sbuf_printf(&sb, "\n"); - sbuf_cat(&sb, path_str); - sbuf_printf(&sb, "Tag: 0x%04x, type %d\n", - io->scsiio.tag_num, io->scsiio.tag_type); - sbuf_cat(&sb, path_str); - sbuf_printf(&sb, "%s: flags %#x, status %#x\n", __func__, - io->io_hdr.flags, io->io_hdr.status); - sbuf_finish(&sb); - printk("%s", sbuf_data(&sb)); -#endif - - /* * The read is done, now we need to send status (good or bad) back * to the other side. @@ -12693,14 +12586,6 @@ ctl_datamove_remote_sgl_setup(union ctl_io *io) */ io->scsiio.kern_sg_entries = i; -#if 0 - printf("%s: kern_sg_entries = %d\n", __func__, - io->scsiio.kern_sg_entries); - for (i = 0; i < io->scsiio.kern_sg_entries; i++) - printf("%s: sg[%d] = %p, %lu\n", __func__, i, - local_sglist[i].addr, local_sglist[i].len); -#endif - return (retval); } @@ -12813,12 +12698,6 @@ ctl_datamove_remote_xfer(union ctl_io *io, unsigned co if (total_used >= io->scsiio.kern_data_len) rq->callback = callback; - -#if 0 - printf("%s: %s: local %p remote %p size %d\n", __func__, - (command == CTL_HA_DT_CMD_WRITE) ? "WRITE" : "READ", - rq->local, rq->remote, rq->size); -#endif isc_ret = ctl_dt_single(rq); if (isc_ret > CTL_HA_STATUS_SUCCESS) From owner-svn-src-all@freebsd.org Wed Mar 13 20:26:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A28D31540F65; Wed, 13 Mar 2019 20:26:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 429C56EB2B; Wed, 13 Mar 2019 20:26:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2F315FAEF; Wed, 13 Mar 2019 20:26:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2DKQlQF040131; Wed, 13 Mar 2019 20:26:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DKQkE7040130; Wed, 13 Mar 2019 20:26:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903132026.x2DKQkE7040130@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 13 Mar 2019 20:26:46 +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: r345112 - stable/11/sys/cam/ctl X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cam/ctl X-SVN-Commit-Revision: 345112 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 429C56EB2B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 20:26:47 -0000 Author: mav Date: Wed Mar 13 20:26:46 2019 New Revision: 345112 URL: https://svnweb.freebsd.org/changeset/base/345112 Log: MFC r344586: Scrap some debug printf's, unused for years. Modified: stable/11/sys/cam/ctl/ctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ctl/ctl.c ============================================================================== --- stable/11/sys/cam/ctl/ctl.c Wed Mar 13 20:26:27 2019 (r345111) +++ stable/11/sys/cam/ctl/ctl.c Wed Mar 13 20:26:46 2019 (r345112) @@ -1448,12 +1448,6 @@ ctl_isc_event_handler(ctl_ha_channel channel, ctl_ha_e if (softc->ha_mode != CTL_HA_MODE_XFER) io->io_hdr.flags |= CTL_FLAG_INT_COPY; io->io_hdr.nexus = msg->hdr.nexus; -#if 0 - printf("port %u, iid %u, lun %u\n", - io->io_hdr.nexus.targ_port, - io->io_hdr.nexus.initid, - io->io_hdr.nexus.targ_lun); -#endif io->scsiio.tag_num = msg->scsi.tag_num; io->scsiio.tag_type = msg->scsi.tag_type; #ifdef CTL_TIME_IO @@ -1533,11 +1527,6 @@ ctl_isc_event_handler(ctl_ha_channel channel, ctl_ha_e msg->dt.cur_sg_entries); i++, j++) { sgl[i].addr = msg->dt.sg_list[j].addr; sgl[i].len = msg->dt.sg_list[j].len; - -#if 0 - printf("%s: DATAMOVE: %p,%lu j=%d, i=%d\n", - __func__, sgl[i].addr, sgl[i].len, j, i); -#endif } /* @@ -6509,11 +6498,6 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) && (subpage == SMS_SUBPAGE_PAGE_0)) continue; -#if 0 - printf("found page %#x len %d\n", - page_index->page_code & SMPH_PC_MASK, - page_index->page_len); -#endif page_len += page_index->page_len; } break; @@ -6546,12 +6530,6 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) && (subpage != SMS_SUBPAGE_ALL)) continue; -#if 0 - printf("found page %#x len %d\n", - page_index->page_code & SMPH_PC_MASK, - page_index->page_len); -#endif - page_len += page_index->page_len; } @@ -6570,10 +6548,6 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) } total_len = header_len + page_len; -#if 0 - printf("header_len = %d, page_len = %d, total_len = %d\n", - header_len, page_len, total_len); -#endif ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; @@ -8261,10 +8235,6 @@ ctl_persistent_reserve_out(struct ctl_scsiio *ctsio) case SPRO_REGISTER: case SPRO_REG_IGNO: { -#if 0 - printf("Registration received\n"); -#endif - /* * We don't support any of these options, as we report in * the read capabilities request (see @@ -8377,9 +8347,6 @@ ctl_persistent_reserve_out(struct ctl_scsiio *ctsio) break; } case SPRO_RESERVE: -#if 0 - printf("Reserve executed type %d\n", type); -#endif mtx_lock(&lun->lun_lock); if (lun->flags & CTL_LUN_PR_RESERVED) { /* @@ -11932,15 +11899,8 @@ ctl_abort_task(union ctl_io *io) struct ctl_softc *softc = CTL_SOFTC(io); union ctl_io *xio; struct ctl_lun *lun; -#if 0 - struct sbuf sb; - char printbuf[128]; -#endif - int found; uint32_t targ_lun; - found = 0; - /* * Look up the LUN. */ @@ -11953,11 +11913,6 @@ ctl_abort_task(union ctl_io *io) return (1); } -#if 0 - printf("ctl_abort_task: called for lun %lld, tag %d type %d\n", - lun->lun, io->taskio.tag_num, io->taskio.tag_type); -#endif - mtx_lock(&lun->lun_lock); mtx_unlock(&softc->ctl_lock); /* @@ -11969,25 +11924,7 @@ ctl_abort_task(union ctl_io *io) */ for (xio = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); xio != NULL; xio = (union ctl_io *)TAILQ_NEXT(&xio->io_hdr, ooa_links)) { -#if 0 - sbuf_new(&sb, printbuf, sizeof(printbuf), SBUF_FIXEDLEN); - sbuf_printf(&sb, "LUN %lld tag %d type %d%s%s%s%s: ", - lun->lun, xio->scsiio.tag_num, - xio->scsiio.tag_type, - (xio->io_hdr.blocked_links.tqe_prev - == NULL) ? "" : " BLOCKED", - (xio->io_hdr.flags & - CTL_FLAG_DMA_INPROG) ? " DMA" : "", - (xio->io_hdr.flags & - CTL_FLAG_ABORT) ? " ABORT" : "", - (xio->io_hdr.flags & - CTL_FLAG_IS_WAS_ON_RTR ? " RTR" : "")); - ctl_scsi_command_string(&xio->scsiio, NULL, &sb); - sbuf_finish(&sb); - printf("%s\n", sbuf_data(&sb)); -#endif - if ((xio->io_hdr.nexus.targ_port != io->io_hdr.nexus.targ_port) || (xio->io_hdr.nexus.initid != io->io_hdr.nexus.initid) || (xio->io_hdr.flags & CTL_FLAG_ABORT)) @@ -12004,8 +11941,8 @@ ctl_abort_task(union ctl_io *io) #if 0 if (((xio->scsiio.tag_type == CTL_TAG_UNTAGGED) && (io->taskio.tag_type == CTL_TAG_UNTAGGED)) - || (xio->scsiio.tag_num == io->taskio.tag_num)) -#endif + || (xio->scsiio.tag_num == io->taskio.tag_num)) { +#else /* * XXX KDM we've got problems with FC, because it * doesn't send down a tag type with aborts. So we @@ -12014,8 +11951,8 @@ ctl_abort_task(union ctl_io *io) * Need to figure that out!! */ if (xio->scsiio.tag_num == io->taskio.tag_num) { +#endif xio->io_hdr.flags |= CTL_FLAG_ABORT; - found = 1; if ((io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) == 0 && !(lun->flags & CTL_LUN_PRIMARY_SC)) { union ctl_ha_msg msg_info; @@ -12027,34 +11964,12 @@ ctl_abort_task(union ctl_io *io) msg_info.hdr.msg_type = CTL_MSG_MANAGE_TASKS; msg_info.hdr.original_sc = NULL; msg_info.hdr.serializing_sc = NULL; -#if 0 - printf("Sent Abort to other side\n"); -#endif ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, sizeof(msg_info.task), M_NOWAIT); } -#if 0 - printf("ctl_abort_task: found I/O to abort\n"); -#endif } } mtx_unlock(&lun->lun_lock); - - if (found == 0) { - /* - * This isn't really an error. It's entirely possible for - * the abort and command completion to cross on the wire. - * This is more of an informative/diagnostic error. - */ -#if 0 - printf("ctl_abort_task: ABORT sent for nonexistent I/O: " - "%u:%u:%u tag %d type %d\n", - io->io_hdr.nexus.initid, - io->io_hdr.nexus.targ_port, - io->io_hdr.nexus.targ_lun, io->taskio.tag_num, - io->taskio.tag_type); -#endif - } io->taskio.task_status = CTL_TASK_FUNCTION_COMPLETE; return (0); } @@ -12622,11 +12537,6 @@ ctl_datamove_remote_write(union ctl_io *io) static int ctl_datamove_remote_dm_read_cb(union ctl_io *io) { -#if 0 - char str[256]; - char path_str[64]; - struct sbuf sb; -#endif uint32_t i; for (i = 0; i < io->scsiio.kern_sg_entries; i++) @@ -12635,23 +12545,6 @@ ctl_datamove_remote_dm_read_cb(union ctl_io *io) CTL_RSGL(io) = NULL; CTL_LSGL(io) = NULL; -#if 0 - scsi_path_string(io, path_str, sizeof(path_str)); - sbuf_new(&sb, str, sizeof(str), SBUF_FIXEDLEN); - sbuf_cat(&sb, path_str); - scsi_command_string(&io->scsiio, NULL, &sb); - sbuf_printf(&sb, "\n"); - sbuf_cat(&sb, path_str); - sbuf_printf(&sb, "Tag: 0x%04x, type %d\n", - io->scsiio.tag_num, io->scsiio.tag_type); - sbuf_cat(&sb, path_str); - sbuf_printf(&sb, "%s: flags %#x, status %#x\n", __func__, - io->io_hdr.flags, io->io_hdr.status); - sbuf_finish(&sb); - printk("%s", sbuf_data(&sb)); -#endif - - /* * The read is done, now we need to send status (good or bad) back * to the other side. @@ -12725,14 +12618,6 @@ ctl_datamove_remote_sgl_setup(union ctl_io *io) */ io->scsiio.kern_sg_entries = i; -#if 0 - printf("%s: kern_sg_entries = %d\n", __func__, - io->scsiio.kern_sg_entries); - for (i = 0; i < io->scsiio.kern_sg_entries; i++) - printf("%s: sg[%d] = %p, %lu\n", __func__, i, - local_sglist[i].addr, local_sglist[i].len); -#endif - return (retval); } @@ -12845,12 +12730,6 @@ ctl_datamove_remote_xfer(union ctl_io *io, unsigned co if (total_used >= io->scsiio.kern_data_len) rq->callback = callback; - -#if 0 - printf("%s: %s: local %p remote %p size %d\n", __func__, - (command == CTL_HA_DT_CMD_WRITE) ? "WRITE" : "READ", - rq->local, rq->remote, rq->size); -#endif isc_ret = ctl_dt_single(rq); if (isc_ret > CTL_HA_STATUS_SUCCESS) From owner-svn-src-all@freebsd.org Wed Mar 13 20:27:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F244A1541036; Wed, 13 Mar 2019 20:27:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A41BD6ECDA; Wed, 13 Mar 2019 20:27:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95698FAF2; Wed, 13 Mar 2019 20:27:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2DKRn6O040243; Wed, 13 Mar 2019 20:27:49 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DKRmOM040239; Wed, 13 Mar 2019 20:27:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903132027.x2DKRmOM040239@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 13 Mar 2019 20:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345113 - stable/12/sys/cam/ctl X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cam/ctl X-SVN-Commit-Revision: 345113 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A41BD6ECDA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 20:27:50 -0000 Author: mav Date: Wed Mar 13 20:27:48 2019 New Revision: 345113 URL: https://svnweb.freebsd.org/changeset/base/345113 Log: MFC r344636: Refactor command ordering/blocking mechanism in CTL. Replace long per-LUN queue of blocked commands, scanned on each command completion and sometimes even twice, causing up to O(n^^2) processing cost, by much shorter per-command blocked queues, scanned only when respective command completes, and check only commands before the previous blocker, reducing cost to O(n). While there, unblock aborted commands to make them "complete" ASAP to be removed from the OOA queue and so not waste time ordering other commands against them. Aborted commands that were not sent to execution yet should have no visible side effects, so this is safe and easy optimization now, comparing to commands already in processing, which are a still pain. Together those two optimizations should fix quite pathological case, when due to backend slowness CTL accumulated many thousands of blocked requests, partially aborted by initiator and so supposedly not even existing, but still wasting CTL CPU time. Modified: stable/12/sys/cam/ctl/ctl.c stable/12/sys/cam/ctl/ctl_frontend_ioctl.c stable/12/sys/cam/ctl/ctl_io.h stable/12/sys/cam/ctl/ctl_private.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/ctl/ctl.c ============================================================================== --- stable/12/sys/cam/ctl/ctl.c Wed Mar 13 20:26:46 2019 (r345112) +++ stable/12/sys/cam/ctl/ctl.c Wed Mar 13 20:27:48 2019 (r345113) @@ -502,8 +502,11 @@ static ctl_action ctl_extent_check_seq(union ctl_io *i static ctl_action ctl_check_for_blockage(struct ctl_lun *lun, union ctl_io *pending_io, union ctl_io *ooa_io); static ctl_action ctl_check_ooa(struct ctl_lun *lun, union ctl_io *pending_io, - union ctl_io *starting_io); -static int ctl_check_blocked(struct ctl_lun *lun); + union ctl_io **starting_io); +static void ctl_try_unblock_io(struct ctl_lun *lun, union ctl_io *io, + bool skip); +static void ctl_try_unblock_others(struct ctl_lun *lun, union ctl_io *io, + bool skip); static int ctl_scsiio_lun_check(struct ctl_lun *lun, const struct ctl_cmd_entry *entry, struct ctl_scsiio *ctsio); @@ -2281,6 +2284,7 @@ ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio) union ctl_ha_msg msg_info; struct ctl_lun *lun; const struct ctl_cmd_entry *entry; + union ctl_io *bio; uint32_t targ_lun; targ_lun = ctsio->io_hdr.nexus.targ_mapped_lun; @@ -2339,12 +2343,11 @@ ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio) #endif TAILQ_INSERT_TAIL(&lun->ooa_queue, &ctsio->io_hdr, ooa_links); - switch (ctl_check_ooa(lun, (union ctl_io *)ctsio, - (union ctl_io *)TAILQ_PREV(&ctsio->io_hdr, ctl_ooaq, - ooa_links))) { + bio = (union ctl_io *)TAILQ_PREV(&ctsio->io_hdr, ctl_ooaq, ooa_links); + switch (ctl_check_ooa(lun, (union ctl_io *)ctsio, &bio)) { case CTL_ACTION_BLOCK: - ctsio->io_hdr.flags |= CTL_FLAG_BLOCKED; - TAILQ_INSERT_TAIL(&lun->blocked_queue, &ctsio->io_hdr, + ctsio->io_hdr.blocker = bio; + TAILQ_INSERT_TAIL(&bio->io_hdr.blocked_queue, &ctsio->io_hdr, blocked_links); mtx_unlock(&lun->lun_lock); break; @@ -2426,7 +2429,7 @@ ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_ #endif bcopy(io->scsiio.cdb, entry->cdb, io->scsiio.cdb_len); entry->cdb_len = io->scsiio.cdb_len; - if (io->io_hdr.flags & CTL_FLAG_BLOCKED) + if (io->io_hdr.blocker != NULL) entry->cmd_flags |= CTL_OOACMD_FLAG_BLOCKED; if (io->io_hdr.flags & CTL_FLAG_DMA_INPROG) @@ -3891,6 +3894,7 @@ ctl_alloc_io(void *pool_ref) if (io != NULL) { io->io_hdr.pool = pool_ref; CTL_SOFTC(io) = pool->ctl_softc; + TAILQ_INIT(&io->io_hdr.blocked_queue); } return (io); } @@ -3905,6 +3909,7 @@ ctl_alloc_io_nowait(void *pool_ref) if (io != NULL) { io->io_hdr.pool = pool_ref; CTL_SOFTC(io) = pool->ctl_softc; + TAILQ_INIT(&io->io_hdr.blocked_queue); } return (io); } @@ -3936,6 +3941,7 @@ ctl_zero_io(union ctl_io *io) memset(io, 0, sizeof(*io)); io->io_hdr.pool = pool; CTL_SOFTC(io) = pool->ctl_softc; + TAILQ_INIT(&io->io_hdr.blocked_queue); } int @@ -4698,7 +4704,6 @@ fail: lun->last_busy = getsbinuptime(); #endif TAILQ_INIT(&lun->ooa_queue); - TAILQ_INIT(&lun->blocked_queue); STAILQ_INIT(&lun->error_list); lun->ie_reported = 1; callout_init_mtx(&lun->ie_callout, &lun->lun_lock, 0); @@ -5872,7 +5877,7 @@ ctl_unmap(struct ctl_scsiio *ctsio) ptrlen->ptr = (void *)buf; ptrlen->len = len; ptrlen->flags = byte2; - ctl_check_blocked(lun); + ctl_try_unblock_others(lun, (union ctl_io *)ctsio, FALSE); mtx_unlock(&lun->lun_lock); retval = lun->backend->config_write((union ctl_io *)ctsio); @@ -10761,6 +10766,14 @@ ctl_check_for_blockage(struct ctl_lun *lun, union ctl_ const ctl_serialize_action *serialize_row; /* + * Aborted commands are not going to be executed and may even + * not report completion, so we don't care about their order. + * Let them complete ASAP to clean the OOA queue. + */ + if (pending_io->io_hdr.flags & CTL_FLAG_ABORT) + return (CTL_ACTION_SKIP); + + /* * The initiator attempted multiple untagged commands at the same * time. Can't do that. */ @@ -10890,7 +10903,7 @@ ctl_check_for_blockage(struct ctl_lun *lun, union ctl_ */ static ctl_action ctl_check_ooa(struct ctl_lun *lun, union ctl_io *pending_io, - union ctl_io *starting_io) + union ctl_io **starting_io) { union ctl_io *ooa_io; ctl_action action; @@ -10903,150 +10916,152 @@ ctl_check_ooa(struct ctl_lun *lun, union ctl_io *pendi * queue. If starting_io is NULL, we'll just end up returning * CTL_ACTION_PASS. */ - for (ooa_io = starting_io; ooa_io != NULL; + for (ooa_io = *starting_io; ooa_io != NULL; ooa_io = (union ctl_io *)TAILQ_PREV(&ooa_io->io_hdr, ctl_ooaq, ooa_links)){ - - /* - * This routine just checks to see whether - * cur_blocked is blocked by ooa_io, which is ahead - * of it in the queue. It doesn't queue/dequeue - * cur_blocked. - */ action = ctl_check_for_blockage(lun, pending_io, ooa_io); - switch (action) { - case CTL_ACTION_BLOCK: - case CTL_ACTION_OVERLAP: - case CTL_ACTION_OVERLAP_TAG: - case CTL_ACTION_SKIP: - case CTL_ACTION_ERROR: + if (action != CTL_ACTION_PASS) { + *starting_io = ooa_io; return (action); - break; /* NOTREACHED */ - case CTL_ACTION_PASS: - break; - default: - panic("%s: Invalid action %d\n", __func__, action); } } + *starting_io = NULL; return (CTL_ACTION_PASS); } /* - * Assumptions: - * - An I/O has just completed, and has been removed from the per-LUN OOA - * queue, so some items on the blocked queue may now be unblocked. + * Try to unblock the specified I/O. + * + * skip parameter allows explicitly skip present blocker of the I/O, + * starting from the previous one on OOA queue. It can be used when + * we know for sure that the blocker I/O does no longer count. */ -static int -ctl_check_blocked(struct ctl_lun *lun) +static void +ctl_try_unblock_io(struct ctl_lun *lun, union ctl_io *io, bool skip) { struct ctl_softc *softc = lun->ctl_softc; - union ctl_io *cur_blocked, *next_blocked; + union ctl_io *bio, *obio; + const struct ctl_cmd_entry *entry; + union ctl_ha_msg msg_info; + ctl_action action; mtx_assert(&lun->lun_lock, MA_OWNED); - /* - * Run forward from the head of the blocked queue, checking each - * entry against the I/Os prior to it on the OOA queue to see if - * there is still any blockage. - * - * We cannot use the TAILQ_FOREACH() macro, because it can't deal - * with our removing a variable on it while it is traversing the - * list. - */ - for (cur_blocked = (union ctl_io *)TAILQ_FIRST(&lun->blocked_queue); - cur_blocked != NULL; cur_blocked = next_blocked) { - union ctl_io *prev_ooa; - ctl_action action; + if (io->io_hdr.blocker == NULL) + return; - next_blocked = (union ctl_io *)TAILQ_NEXT(&cur_blocked->io_hdr, - blocked_links); + obio = bio = io->io_hdr.blocker; + if (skip) + bio = (union ctl_io *)TAILQ_PREV(&bio->io_hdr, ctl_ooaq, + ooa_links); + action = ctl_check_ooa(lun, io, &bio); + if (action == CTL_ACTION_BLOCK) { + /* Still blocked, but may be by different I/O now. */ + if (bio != obio) { + TAILQ_REMOVE(&obio->io_hdr.blocked_queue, + &io->io_hdr, blocked_links); + TAILQ_INSERT_TAIL(&bio->io_hdr.blocked_queue, + &io->io_hdr, blocked_links); + io->io_hdr.blocker = bio; + } + return; + } - prev_ooa = (union ctl_io *)TAILQ_PREV(&cur_blocked->io_hdr, - ctl_ooaq, ooa_links); + /* No longer blocked, one way or another. */ + TAILQ_REMOVE(&obio->io_hdr.blocked_queue, &io->io_hdr, blocked_links); + io->io_hdr.blocker = NULL; + switch (action) { + case CTL_ACTION_OVERLAP: + ctl_set_overlapped_cmd(&io->scsiio); + goto error; + case CTL_ACTION_OVERLAP_TAG: + ctl_set_overlapped_tag(&io->scsiio, + io->scsiio.tag_num & 0xff); + goto error; + case CTL_ACTION_PASS: + case CTL_ACTION_SKIP: + + /* Serializing commands from the other SC retire there. */ + if ((io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) && + (softc->ha_mode != CTL_HA_MODE_XFER)) { + io->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE; + msg_info.hdr.original_sc = io->io_hdr.remote_io; + msg_info.hdr.serializing_sc = io; + msg_info.hdr.msg_type = CTL_MSG_R2R; + ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, + sizeof(msg_info.hdr), M_NOWAIT); + break; + } + /* - * If cur_blocked happens to be the first item in the OOA - * queue now, prev_ooa will be NULL, and the action - * returned will just be CTL_ACTION_PASS. + * Check this I/O for LUN state changes that may have happened + * while this command was blocked. The LUN state may have been + * changed by a command ahead of us in the queue. */ - action = ctl_check_ooa(lun, cur_blocked, prev_ooa); - - switch (action) { - case CTL_ACTION_BLOCK: - /* Nothing to do here, still blocked */ + entry = ctl_get_cmd_entry(&io->scsiio, NULL); + if (ctl_scsiio_lun_check(lun, entry, &io->scsiio) != 0) { + ctl_done(io); break; - case CTL_ACTION_OVERLAP: - case CTL_ACTION_OVERLAP_TAG: - /* - * This shouldn't happen! In theory we've already - * checked this command for overlap... - */ - break; - case CTL_ACTION_PASS: - case CTL_ACTION_SKIP: { - const struct ctl_cmd_entry *entry; + } - /* - * The skip case shouldn't happen, this transaction - * should have never made it onto the blocked queue. - */ - /* - * This I/O is no longer blocked, we can remove it - * from the blocked queue. Since this is a TAILQ - * (doubly linked list), we can do O(1) removals - * from any place on the list. - */ - TAILQ_REMOVE(&lun->blocked_queue, &cur_blocked->io_hdr, - blocked_links); - cur_blocked->io_hdr.flags &= ~CTL_FLAG_BLOCKED; + io->io_hdr.flags |= CTL_FLAG_IS_WAS_ON_RTR; + ctl_enqueue_rtr(io); + break; + case CTL_ACTION_ERROR: + default: + ctl_set_internal_failure(&io->scsiio, + /*sks_valid*/ 0, + /*retry_count*/ 0); - if ((softc->ha_mode != CTL_HA_MODE_XFER) && - (cur_blocked->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC)){ - /* - * Need to send IO back to original side to - * run - */ - union ctl_ha_msg msg_info; +error: + /* Serializing commands from the other SC are done here. */ + if ((io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) && + (softc->ha_mode != CTL_HA_MODE_XFER)) { + ctl_try_unblock_others(lun, io, TRUE); + TAILQ_REMOVE(&lun->ooa_queue, &io->io_hdr, ooa_links); - cur_blocked->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE; - msg_info.hdr.original_sc = - cur_blocked->io_hdr.remote_io; - msg_info.hdr.serializing_sc = cur_blocked; - msg_info.hdr.msg_type = CTL_MSG_R2R; - ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, - sizeof(msg_info.hdr), M_NOWAIT); - break; - } - entry = ctl_get_cmd_entry(&cur_blocked->scsiio, NULL); - - /* - * Check this I/O for LUN state changes that may - * have happened while this command was blocked. - * The LUN state may have been changed by a command - * ahead of us in the queue, so we need to re-check - * for any states that can be caused by SCSI - * commands. - */ - if (ctl_scsiio_lun_check(lun, entry, - &cur_blocked->scsiio) == 0) { - cur_blocked->io_hdr.flags |= - CTL_FLAG_IS_WAS_ON_RTR; - ctl_enqueue_rtr(cur_blocked); - } else - ctl_done(cur_blocked); + ctl_copy_sense_data_back(io, &msg_info); + msg_info.hdr.original_sc = io->io_hdr.remote_io; + msg_info.hdr.serializing_sc = NULL; + msg_info.hdr.msg_type = CTL_MSG_BAD_JUJU; + ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, + sizeof(msg_info.scsi), M_WAITOK); + ctl_free_io(io); break; } - default: - /* - * This probably shouldn't happen -- we shouldn't - * get CTL_ACTION_ERROR, or anything else. - */ - break; - } + + ctl_done(io); + break; } +} - return (CTL_RETVAL_COMPLETE); +/* + * Try to unblock I/Os blocked by the specified I/O. + * + * skip parameter allows explicitly skip the specified I/O as blocker, + * starting from the previous one on the OOA queue. It can be used when + * we know for sure that the specified I/O does no longer count (done). + * It has to be still on OOA queue though so that we know where to start. + */ +static void +ctl_try_unblock_others(struct ctl_lun *lun, union ctl_io *bio, bool skip) +{ + union ctl_io *io, *next_io; + + mtx_assert(&lun->lun_lock, MA_OWNED); + + for (io = (union ctl_io *)TAILQ_FIRST(&bio->io_hdr.blocked_queue); + io != NULL; io = next_io) { + next_io = (union ctl_io *)TAILQ_NEXT(&io->io_hdr, blocked_links); + + KASSERT(io->io_hdr.blocker != NULL, + ("I/O %p on blocked list without blocker", io)); + ctl_try_unblock_io(lun, io, skip); + } + KASSERT(!skip || TAILQ_EMPTY(&bio->io_hdr.blocked_queue), + ("blocked_queue is not empty after skipping %p", bio)); } /* @@ -11214,6 +11229,8 @@ ctl_failover_lun(union ctl_io *rio) if (io->flags & CTL_FLAG_IO_ACTIVE) { io->flags |= CTL_FLAG_ABORT; io->flags |= CTL_FLAG_FAILOVER; + ctl_try_unblock_io(lun, + (union ctl_io *)io, FALSE); } else { /* This can be only due to DATAMOVE */ io->msg_type = CTL_MSG_DATAMOVE_DONE; io->flags &= ~CTL_FLAG_DMA_INPROG; @@ -11221,7 +11238,7 @@ ctl_failover_lun(union ctl_io *rio) io->port_status = 31340; ctl_enqueue_isc((union ctl_io *)io); } - } + } else /* We are slave */ if (io->flags & CTL_FLAG_SENT_2OTHER_SC) { io->flags &= ~CTL_FLAG_SENT_2OTHER_SC; @@ -11235,23 +11252,19 @@ ctl_failover_lun(union ctl_io *rio) } } } else { /* SERIALIZE modes */ - TAILQ_FOREACH_SAFE(io, &lun->blocked_queue, blocked_links, - next_io) { - /* We are master */ - if (io->flags & CTL_FLAG_FROM_OTHER_SC) { - TAILQ_REMOVE(&lun->blocked_queue, io, - blocked_links); - io->flags &= ~CTL_FLAG_BLOCKED; - TAILQ_REMOVE(&lun->ooa_queue, io, ooa_links); - ctl_free_io((union ctl_io *)io); - } - } TAILQ_FOREACH_SAFE(io, &lun->ooa_queue, ooa_links, next_io) { /* We are master */ if (io->flags & CTL_FLAG_FROM_OTHER_SC) { + if (io->blocker != NULL) { + TAILQ_REMOVE(&io->blocker->io_hdr.blocked_queue, + io, blocked_links); + io->blocker = NULL; + } + ctl_try_unblock_others(lun, (union ctl_io *)io, + TRUE); TAILQ_REMOVE(&lun->ooa_queue, io, ooa_links); ctl_free_io((union ctl_io *)io); - } + } else /* We are slave */ if (io->flags & CTL_FLAG_SENT_2OTHER_SC) { io->flags &= ~CTL_FLAG_SENT_2OTHER_SC; @@ -11262,7 +11275,6 @@ ctl_failover_lun(union ctl_io *rio) } } } - ctl_check_blocked(lun); } mtx_unlock(&lun->lun_lock); } @@ -11272,6 +11284,7 @@ ctl_scsiio_precheck(struct ctl_softc *softc, struct ct { struct ctl_lun *lun; const struct ctl_cmd_entry *entry; + union ctl_io *bio; uint32_t initidx, targ_lun; int retval = 0; @@ -11447,12 +11460,11 @@ ctl_scsiio_precheck(struct ctl_softc *softc, struct ct return (retval); } - switch (ctl_check_ooa(lun, (union ctl_io *)ctsio, - (union ctl_io *)TAILQ_PREV(&ctsio->io_hdr, - ctl_ooaq, ooa_links))) { + bio = (union ctl_io *)TAILQ_PREV(&ctsio->io_hdr, ctl_ooaq, ooa_links); + switch (ctl_check_ooa(lun, (union ctl_io *)ctsio, &bio)) { case CTL_ACTION_BLOCK: - ctsio->io_hdr.flags |= CTL_FLAG_BLOCKED; - TAILQ_INSERT_TAIL(&lun->blocked_queue, &ctsio->io_hdr, + ctsio->io_hdr.blocker = bio; + TAILQ_INSERT_TAIL(&bio->io_hdr.blocked_queue, &ctsio->io_hdr, blocked_links); mtx_unlock(&lun->lun_lock); return (retval); @@ -11665,6 +11677,7 @@ ctl_do_lun_reset(struct ctl_lun *lun, uint32_t initidx for (xio = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); xio != NULL; xio = (union ctl_io *)TAILQ_NEXT(&xio->io_hdr, ooa_links)) { xio->io_hdr.flags |= CTL_FLAG_ABORT | CTL_FLAG_ABORT_STATUS; + ctl_try_unblock_io(lun, xio, FALSE); } /* Clear CA. */ for (i = 0; i < ctl_max_ports; i++) { @@ -11763,6 +11776,7 @@ ctl_abort_tasks_lun(struct ctl_lun *lun, uint32_t targ ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, sizeof(msg_info.task), M_NOWAIT); } + ctl_try_unblock_io(lun, xio, FALSE); } } } @@ -11935,6 +11949,7 @@ ctl_abort_task(union ctl_io *io) ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, sizeof(msg_info.task), M_NOWAIT); } + ctl_try_unblock_io(lun, xio, FALSE); } } mtx_unlock(&lun->lun_lock); @@ -12110,8 +12125,8 @@ ctl_handle_isc(union ctl_io *io) break; } mtx_lock(&lun->lun_lock); + ctl_try_unblock_others(lun, io, TRUE); TAILQ_REMOVE(&lun->ooa_queue, &io->io_hdr, ooa_links); - ctl_check_blocked(lun); mtx_unlock(&lun->lun_lock); ctl_free_io(io); break; @@ -12935,6 +12950,13 @@ ctl_process_done(union ctl_io *io) } /* + * Run through the blocked queue of this I/O and see if anything + * can be unblocked, now that this I/O is done and will be removed. + * We need to do it before removal to have OOA position to start. + */ + ctl_try_unblock_others(lun, io, TRUE); + + /* * Remove this from the OOA queue. */ TAILQ_REMOVE(&lun->ooa_queue, &io->io_hdr, ooa_links); @@ -12944,12 +12966,6 @@ ctl_process_done(union ctl_io *io) #endif /* - * Run through the blocked queue on this LUN and see if anything - * has become unblocked, now that this transaction is done. - */ - ctl_check_blocked(lun); - - /* * If the LUN has been invalidated, free it if there is nothing * left on its OOA queue. */ @@ -13104,7 +13120,7 @@ ctl_serseq_done(union ctl_io *io) return; mtx_lock(&lun->lun_lock); io->io_hdr.flags |= CTL_FLAG_SERSEQ_DONE; - ctl_check_blocked(lun); + ctl_try_unblock_others(lun, io, FALSE); mtx_unlock(&lun->lun_lock); } Modified: stable/12/sys/cam/ctl/ctl_frontend_ioctl.c ============================================================================== --- stable/12/sys/cam/ctl/ctl_frontend_ioctl.c Wed Mar 13 20:26:46 2019 (r345112) +++ stable/12/sys/cam/ctl/ctl_frontend_ioctl.c Wed Mar 13 20:27:48 2019 (r345113) @@ -620,6 +620,7 @@ ctl_ioctl_io(struct cdev *dev, u_long cmd, caddr_t add memcpy(io, (void *)addr, sizeof(*io)); io->io_hdr.pool = pool_tmp; CTL_SOFTC(io) = sc_tmp; + TAILQ_INIT(&io->io_hdr.blocked_queue); /* * No status yet, so make sure the status is set properly. Modified: stable/12/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/12/sys/cam/ctl/ctl_io.h Wed Mar 13 20:26:46 2019 (r345112) +++ stable/12/sys/cam/ctl/ctl_io.h Wed Mar 13 20:27:48 2019 (r345113) @@ -87,7 +87,6 @@ typedef enum { CTL_FLAG_DO_AUTOSENSE = 0x00000020, /* grab sense info */ CTL_FLAG_USER_REQ = 0x00000040, /* request came from userland */ CTL_FLAG_ALLOCATED = 0x00000100, /* data space allocated */ - CTL_FLAG_BLOCKED = 0x00000200, /* on the blocked queue */ CTL_FLAG_ABORT_STATUS = 0x00000400, /* return TASK ABORTED status */ CTL_FLAG_ABORT = 0x00000800, /* this I/O should be aborted */ CTL_FLAG_DMA_INPROG = 0x00001000, /* DMA in progress */ @@ -239,14 +238,13 @@ struct ctl_io_hdr { #endif /* CTL_TIME_IO */ uint32_t num_dmas; /* Number of DMAs */ union ctl_io *remote_io; /* I/O counterpart on remote HA side */ - void *pad1; + union ctl_io *blocker; /* I/O blocking this one */ void *pool; /* I/O pool */ union ctl_priv ctl_private[CTL_NUM_PRIV];/* CTL private area */ - void *pad2; - void *pad3; + TAILQ_HEAD(, ctl_io_hdr) blocked_queue; /* I/Os blocked by this one */ STAILQ_ENTRY(ctl_io_hdr) links; /* linked list pointer */ - TAILQ_ENTRY(ctl_io_hdr) ooa_links; - TAILQ_ENTRY(ctl_io_hdr) blocked_links; + TAILQ_ENTRY(ctl_io_hdr) ooa_links; /* ooa_queue links */ + TAILQ_ENTRY(ctl_io_hdr) blocked_links; /* blocked_queue links */ }; typedef enum { Modified: stable/12/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/12/sys/cam/ctl/ctl_private.h Wed Mar 13 20:26:46 2019 (r345112) +++ stable/12/sys/cam/ctl/ctl_private.h Wed Mar 13 20:27:48 2019 (r345113) @@ -390,7 +390,6 @@ struct ctl_lun { sbintime_t last_busy; #endif TAILQ_HEAD(ctl_ooaq, ctl_io_hdr) ooa_queue; - TAILQ_HEAD(ctl_blockq,ctl_io_hdr) blocked_queue; STAILQ_ENTRY(ctl_lun) links; struct scsi_sense_data **pending_sense; ctl_ua_type **pending_ua; From owner-svn-src-all@freebsd.org Wed Mar 13 20:28:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24DA51541077; Wed, 13 Mar 2019 20:28:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4C116EDD9; Wed, 13 Mar 2019 20:28:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B727EFAF3; Wed, 13 Mar 2019 20:28:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2DKS803040318; Wed, 13 Mar 2019 20:28:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DKS7m1040314; Wed, 13 Mar 2019 20:28:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903132028.x2DKS7m1040314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 13 Mar 2019 20:28:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r345114 - stable/11/sys/cam/ctl X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cam/ctl X-SVN-Commit-Revision: 345114 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C4C116EDD9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 20:28:09 -0000 Author: mav Date: Wed Mar 13 20:28:07 2019 New Revision: 345114 URL: https://svnweb.freebsd.org/changeset/base/345114 Log: MFC r344636: Refactor command ordering/blocking mechanism in CTL. Replace long per-LUN queue of blocked commands, scanned on each command completion and sometimes even twice, causing up to O(n^^2) processing cost, by much shorter per-command blocked queues, scanned only when respective command completes, and check only commands before the previous blocker, reducing cost to O(n). While there, unblock aborted commands to make them "complete" ASAP to be removed from the OOA queue and so not waste time ordering other commands against them. Aborted commands that were not sent to execution yet should have no visible side effects, so this is safe and easy optimization now, comparing to commands already in processing, which are a still pain. Together those two optimizations should fix quite pathological case, when due to backend slowness CTL accumulated many thousands of blocked requests, partially aborted by initiator and so supposedly not even existing, but still wasting CTL CPU time. Modified: stable/11/sys/cam/ctl/ctl.c stable/11/sys/cam/ctl/ctl_frontend_ioctl.c stable/11/sys/cam/ctl/ctl_io.h stable/11/sys/cam/ctl/ctl_private.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ctl/ctl.c ============================================================================== --- stable/11/sys/cam/ctl/ctl.c Wed Mar 13 20:27:48 2019 (r345113) +++ stable/11/sys/cam/ctl/ctl.c Wed Mar 13 20:28:07 2019 (r345114) @@ -496,8 +496,11 @@ static ctl_action ctl_extent_check_seq(union ctl_io *i static ctl_action ctl_check_for_blockage(struct ctl_lun *lun, union ctl_io *pending_io, union ctl_io *ooa_io); static ctl_action ctl_check_ooa(struct ctl_lun *lun, union ctl_io *pending_io, - union ctl_io *starting_io); -static int ctl_check_blocked(struct ctl_lun *lun); + union ctl_io **starting_io); +static void ctl_try_unblock_io(struct ctl_lun *lun, union ctl_io *io, + bool skip); +static void ctl_try_unblock_others(struct ctl_lun *lun, union ctl_io *io, + bool skip); static int ctl_scsiio_lun_check(struct ctl_lun *lun, const struct ctl_cmd_entry *entry, struct ctl_scsiio *ctsio); @@ -2274,6 +2277,7 @@ ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio) union ctl_ha_msg msg_info; struct ctl_lun *lun; const struct ctl_cmd_entry *entry; + union ctl_io *bio; uint32_t targ_lun; targ_lun = ctsio->io_hdr.nexus.targ_mapped_lun; @@ -2332,12 +2336,11 @@ ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio) #endif TAILQ_INSERT_TAIL(&lun->ooa_queue, &ctsio->io_hdr, ooa_links); - switch (ctl_check_ooa(lun, (union ctl_io *)ctsio, - (union ctl_io *)TAILQ_PREV(&ctsio->io_hdr, ctl_ooaq, - ooa_links))) { + bio = (union ctl_io *)TAILQ_PREV(&ctsio->io_hdr, ctl_ooaq, ooa_links); + switch (ctl_check_ooa(lun, (union ctl_io *)ctsio, &bio)) { case CTL_ACTION_BLOCK: - ctsio->io_hdr.flags |= CTL_FLAG_BLOCKED; - TAILQ_INSERT_TAIL(&lun->blocked_queue, &ctsio->io_hdr, + ctsio->io_hdr.blocker = bio; + TAILQ_INSERT_TAIL(&bio->io_hdr.blocked_queue, &ctsio->io_hdr, blocked_links); mtx_unlock(&lun->lun_lock); break; @@ -2419,7 +2422,7 @@ ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_ #endif bcopy(io->scsiio.cdb, entry->cdb, io->scsiio.cdb_len); entry->cdb_len = io->scsiio.cdb_len; - if (io->io_hdr.flags & CTL_FLAG_BLOCKED) + if (io->io_hdr.blocker != NULL) entry->cmd_flags |= CTL_OOACMD_FLAG_BLOCKED; if (io->io_hdr.flags & CTL_FLAG_DMA_INPROG) @@ -3914,6 +3917,7 @@ ctl_alloc_io(void *pool_ref) if (io != NULL) { io->io_hdr.pool = pool_ref; CTL_SOFTC(io) = pool->ctl_softc; + TAILQ_INIT(&io->io_hdr.blocked_queue); } return (io); } @@ -3928,6 +3932,7 @@ ctl_alloc_io_nowait(void *pool_ref) if (io != NULL) { io->io_hdr.pool = pool_ref; CTL_SOFTC(io) = pool->ctl_softc; + TAILQ_INIT(&io->io_hdr.blocked_queue); } return (io); } @@ -3959,6 +3964,7 @@ ctl_zero_io(union ctl_io *io) memset(io, 0, sizeof(*io)); io->io_hdr.pool = pool; CTL_SOFTC(io) = pool->ctl_softc; + TAILQ_INIT(&io->io_hdr.blocked_queue); } int @@ -4719,7 +4725,6 @@ fail: lun->last_busy = getsbinuptime(); #endif TAILQ_INIT(&lun->ooa_queue); - TAILQ_INIT(&lun->blocked_queue); STAILQ_INIT(&lun->error_list); lun->ie_reported = 1; callout_init_mtx(&lun->ie_callout, &lun->lun_lock, 0); @@ -5906,7 +5911,7 @@ ctl_unmap(struct ctl_scsiio *ctsio) ptrlen->ptr = (void *)buf; ptrlen->len = len; ptrlen->flags = byte2; - ctl_check_blocked(lun); + ctl_try_unblock_others(lun, (union ctl_io *)ctsio, FALSE); mtx_unlock(&lun->lun_lock); retval = lun->backend->config_write((union ctl_io *)ctsio); @@ -10793,6 +10798,14 @@ ctl_check_for_blockage(struct ctl_lun *lun, union ctl_ const ctl_serialize_action *serialize_row; /* + * Aborted commands are not going to be executed and may even + * not report completion, so we don't care about their order. + * Let them complete ASAP to clean the OOA queue. + */ + if (pending_io->io_hdr.flags & CTL_FLAG_ABORT) + return (CTL_ACTION_SKIP); + + /* * The initiator attempted multiple untagged commands at the same * time. Can't do that. */ @@ -10922,7 +10935,7 @@ ctl_check_for_blockage(struct ctl_lun *lun, union ctl_ */ static ctl_action ctl_check_ooa(struct ctl_lun *lun, union ctl_io *pending_io, - union ctl_io *starting_io) + union ctl_io **starting_io) { union ctl_io *ooa_io; ctl_action action; @@ -10935,150 +10948,152 @@ ctl_check_ooa(struct ctl_lun *lun, union ctl_io *pendi * queue. If starting_io is NULL, we'll just end up returning * CTL_ACTION_PASS. */ - for (ooa_io = starting_io; ooa_io != NULL; + for (ooa_io = *starting_io; ooa_io != NULL; ooa_io = (union ctl_io *)TAILQ_PREV(&ooa_io->io_hdr, ctl_ooaq, ooa_links)){ - - /* - * This routine just checks to see whether - * cur_blocked is blocked by ooa_io, which is ahead - * of it in the queue. It doesn't queue/dequeue - * cur_blocked. - */ action = ctl_check_for_blockage(lun, pending_io, ooa_io); - switch (action) { - case CTL_ACTION_BLOCK: - case CTL_ACTION_OVERLAP: - case CTL_ACTION_OVERLAP_TAG: - case CTL_ACTION_SKIP: - case CTL_ACTION_ERROR: + if (action != CTL_ACTION_PASS) { + *starting_io = ooa_io; return (action); - break; /* NOTREACHED */ - case CTL_ACTION_PASS: - break; - default: - panic("%s: Invalid action %d\n", __func__, action); } } + *starting_io = NULL; return (CTL_ACTION_PASS); } /* - * Assumptions: - * - An I/O has just completed, and has been removed from the per-LUN OOA - * queue, so some items on the blocked queue may now be unblocked. + * Try to unblock the specified I/O. + * + * skip parameter allows explicitly skip present blocker of the I/O, + * starting from the previous one on OOA queue. It can be used when + * we know for sure that the blocker I/O does no longer count. */ -static int -ctl_check_blocked(struct ctl_lun *lun) +static void +ctl_try_unblock_io(struct ctl_lun *lun, union ctl_io *io, bool skip) { struct ctl_softc *softc = lun->ctl_softc; - union ctl_io *cur_blocked, *next_blocked; + union ctl_io *bio, *obio; + const struct ctl_cmd_entry *entry; + union ctl_ha_msg msg_info; + ctl_action action; mtx_assert(&lun->lun_lock, MA_OWNED); - /* - * Run forward from the head of the blocked queue, checking each - * entry against the I/Os prior to it on the OOA queue to see if - * there is still any blockage. - * - * We cannot use the TAILQ_FOREACH() macro, because it can't deal - * with our removing a variable on it while it is traversing the - * list. - */ - for (cur_blocked = (union ctl_io *)TAILQ_FIRST(&lun->blocked_queue); - cur_blocked != NULL; cur_blocked = next_blocked) { - union ctl_io *prev_ooa; - ctl_action action; + if (io->io_hdr.blocker == NULL) + return; - next_blocked = (union ctl_io *)TAILQ_NEXT(&cur_blocked->io_hdr, - blocked_links); + obio = bio = io->io_hdr.blocker; + if (skip) + bio = (union ctl_io *)TAILQ_PREV(&bio->io_hdr, ctl_ooaq, + ooa_links); + action = ctl_check_ooa(lun, io, &bio); + if (action == CTL_ACTION_BLOCK) { + /* Still blocked, but may be by different I/O now. */ + if (bio != obio) { + TAILQ_REMOVE(&obio->io_hdr.blocked_queue, + &io->io_hdr, blocked_links); + TAILQ_INSERT_TAIL(&bio->io_hdr.blocked_queue, + &io->io_hdr, blocked_links); + io->io_hdr.blocker = bio; + } + return; + } - prev_ooa = (union ctl_io *)TAILQ_PREV(&cur_blocked->io_hdr, - ctl_ooaq, ooa_links); + /* No longer blocked, one way or another. */ + TAILQ_REMOVE(&obio->io_hdr.blocked_queue, &io->io_hdr, blocked_links); + io->io_hdr.blocker = NULL; + switch (action) { + case CTL_ACTION_OVERLAP: + ctl_set_overlapped_cmd(&io->scsiio); + goto error; + case CTL_ACTION_OVERLAP_TAG: + ctl_set_overlapped_tag(&io->scsiio, + io->scsiio.tag_num & 0xff); + goto error; + case CTL_ACTION_PASS: + case CTL_ACTION_SKIP: + + /* Serializing commands from the other SC retire there. */ + if ((io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) && + (softc->ha_mode != CTL_HA_MODE_XFER)) { + io->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE; + msg_info.hdr.original_sc = io->io_hdr.remote_io; + msg_info.hdr.serializing_sc = io; + msg_info.hdr.msg_type = CTL_MSG_R2R; + ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, + sizeof(msg_info.hdr), M_NOWAIT); + break; + } + /* - * If cur_blocked happens to be the first item in the OOA - * queue now, prev_ooa will be NULL, and the action - * returned will just be CTL_ACTION_PASS. + * Check this I/O for LUN state changes that may have happened + * while this command was blocked. The LUN state may have been + * changed by a command ahead of us in the queue. */ - action = ctl_check_ooa(lun, cur_blocked, prev_ooa); - - switch (action) { - case CTL_ACTION_BLOCK: - /* Nothing to do here, still blocked */ + entry = ctl_get_cmd_entry(&io->scsiio, NULL); + if (ctl_scsiio_lun_check(lun, entry, &io->scsiio) != 0) { + ctl_done(io); break; - case CTL_ACTION_OVERLAP: - case CTL_ACTION_OVERLAP_TAG: - /* - * This shouldn't happen! In theory we've already - * checked this command for overlap... - */ - break; - case CTL_ACTION_PASS: - case CTL_ACTION_SKIP: { - const struct ctl_cmd_entry *entry; + } - /* - * The skip case shouldn't happen, this transaction - * should have never made it onto the blocked queue. - */ - /* - * This I/O is no longer blocked, we can remove it - * from the blocked queue. Since this is a TAILQ - * (doubly linked list), we can do O(1) removals - * from any place on the list. - */ - TAILQ_REMOVE(&lun->blocked_queue, &cur_blocked->io_hdr, - blocked_links); - cur_blocked->io_hdr.flags &= ~CTL_FLAG_BLOCKED; + io->io_hdr.flags |= CTL_FLAG_IS_WAS_ON_RTR; + ctl_enqueue_rtr(io); + break; + case CTL_ACTION_ERROR: + default: + ctl_set_internal_failure(&io->scsiio, + /*sks_valid*/ 0, + /*retry_count*/ 0); - if ((softc->ha_mode != CTL_HA_MODE_XFER) && - (cur_blocked->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC)){ - /* - * Need to send IO back to original side to - * run - */ - union ctl_ha_msg msg_info; +error: + /* Serializing commands from the other SC are done here. */ + if ((io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) && + (softc->ha_mode != CTL_HA_MODE_XFER)) { + ctl_try_unblock_others(lun, io, TRUE); + TAILQ_REMOVE(&lun->ooa_queue, &io->io_hdr, ooa_links); - cur_blocked->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE; - msg_info.hdr.original_sc = - cur_blocked->io_hdr.remote_io; - msg_info.hdr.serializing_sc = cur_blocked; - msg_info.hdr.msg_type = CTL_MSG_R2R; - ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, - sizeof(msg_info.hdr), M_NOWAIT); - break; - } - entry = ctl_get_cmd_entry(&cur_blocked->scsiio, NULL); - - /* - * Check this I/O for LUN state changes that may - * have happened while this command was blocked. - * The LUN state may have been changed by a command - * ahead of us in the queue, so we need to re-check - * for any states that can be caused by SCSI - * commands. - */ - if (ctl_scsiio_lun_check(lun, entry, - &cur_blocked->scsiio) == 0) { - cur_blocked->io_hdr.flags |= - CTL_FLAG_IS_WAS_ON_RTR; - ctl_enqueue_rtr(cur_blocked); - } else - ctl_done(cur_blocked); + ctl_copy_sense_data_back(io, &msg_info); + msg_info.hdr.original_sc = io->io_hdr.remote_io; + msg_info.hdr.serializing_sc = NULL; + msg_info.hdr.msg_type = CTL_MSG_BAD_JUJU; + ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, + sizeof(msg_info.scsi), M_WAITOK); + ctl_free_io(io); break; } - default: - /* - * This probably shouldn't happen -- we shouldn't - * get CTL_ACTION_ERROR, or anything else. - */ - break; - } + + ctl_done(io); + break; } +} - return (CTL_RETVAL_COMPLETE); +/* + * Try to unblock I/Os blocked by the specified I/O. + * + * skip parameter allows explicitly skip the specified I/O as blocker, + * starting from the previous one on the OOA queue. It can be used when + * we know for sure that the specified I/O does no longer count (done). + * It has to be still on OOA queue though so that we know where to start. + */ +static void +ctl_try_unblock_others(struct ctl_lun *lun, union ctl_io *bio, bool skip) +{ + union ctl_io *io, *next_io; + + mtx_assert(&lun->lun_lock, MA_OWNED); + + for (io = (union ctl_io *)TAILQ_FIRST(&bio->io_hdr.blocked_queue); + io != NULL; io = next_io) { + next_io = (union ctl_io *)TAILQ_NEXT(&io->io_hdr, blocked_links); + + KASSERT(io->io_hdr.blocker != NULL, + ("I/O %p on blocked list without blocker", io)); + ctl_try_unblock_io(lun, io, skip); + } + KASSERT(!skip || TAILQ_EMPTY(&bio->io_hdr.blocked_queue), + ("blocked_queue is not empty after skipping %p", bio)); } /* @@ -11246,6 +11261,8 @@ ctl_failover_lun(union ctl_io *rio) if (io->flags & CTL_FLAG_IO_ACTIVE) { io->flags |= CTL_FLAG_ABORT; io->flags |= CTL_FLAG_FAILOVER; + ctl_try_unblock_io(lun, + (union ctl_io *)io, FALSE); } else { /* This can be only due to DATAMOVE */ io->msg_type = CTL_MSG_DATAMOVE_DONE; io->flags &= ~CTL_FLAG_DMA_INPROG; @@ -11253,7 +11270,7 @@ ctl_failover_lun(union ctl_io *rio) io->port_status = 31340; ctl_enqueue_isc((union ctl_io *)io); } - } + } else /* We are slave */ if (io->flags & CTL_FLAG_SENT_2OTHER_SC) { io->flags &= ~CTL_FLAG_SENT_2OTHER_SC; @@ -11267,23 +11284,19 @@ ctl_failover_lun(union ctl_io *rio) } } } else { /* SERIALIZE modes */ - TAILQ_FOREACH_SAFE(io, &lun->blocked_queue, blocked_links, - next_io) { - /* We are master */ - if (io->flags & CTL_FLAG_FROM_OTHER_SC) { - TAILQ_REMOVE(&lun->blocked_queue, io, - blocked_links); - io->flags &= ~CTL_FLAG_BLOCKED; - TAILQ_REMOVE(&lun->ooa_queue, io, ooa_links); - ctl_free_io((union ctl_io *)io); - } - } TAILQ_FOREACH_SAFE(io, &lun->ooa_queue, ooa_links, next_io) { /* We are master */ if (io->flags & CTL_FLAG_FROM_OTHER_SC) { + if (io->blocker != NULL) { + TAILQ_REMOVE(&io->blocker->io_hdr.blocked_queue, + io, blocked_links); + io->blocker = NULL; + } + ctl_try_unblock_others(lun, (union ctl_io *)io, + TRUE); TAILQ_REMOVE(&lun->ooa_queue, io, ooa_links); ctl_free_io((union ctl_io *)io); - } + } else /* We are slave */ if (io->flags & CTL_FLAG_SENT_2OTHER_SC) { io->flags &= ~CTL_FLAG_SENT_2OTHER_SC; @@ -11294,7 +11307,6 @@ ctl_failover_lun(union ctl_io *rio) } } } - ctl_check_blocked(lun); } mtx_unlock(&lun->lun_lock); } @@ -11304,6 +11316,7 @@ ctl_scsiio_precheck(struct ctl_softc *softc, struct ct { struct ctl_lun *lun; const struct ctl_cmd_entry *entry; + union ctl_io *bio; uint32_t initidx, targ_lun; int retval = 0; @@ -11479,12 +11492,11 @@ ctl_scsiio_precheck(struct ctl_softc *softc, struct ct return (retval); } - switch (ctl_check_ooa(lun, (union ctl_io *)ctsio, - (union ctl_io *)TAILQ_PREV(&ctsio->io_hdr, - ctl_ooaq, ooa_links))) { + bio = (union ctl_io *)TAILQ_PREV(&ctsio->io_hdr, ctl_ooaq, ooa_links); + switch (ctl_check_ooa(lun, (union ctl_io *)ctsio, &bio)) { case CTL_ACTION_BLOCK: - ctsio->io_hdr.flags |= CTL_FLAG_BLOCKED; - TAILQ_INSERT_TAIL(&lun->blocked_queue, &ctsio->io_hdr, + ctsio->io_hdr.blocker = bio; + TAILQ_INSERT_TAIL(&bio->io_hdr.blocked_queue, &ctsio->io_hdr, blocked_links); mtx_unlock(&lun->lun_lock); return (retval); @@ -11697,6 +11709,7 @@ ctl_do_lun_reset(struct ctl_lun *lun, uint32_t initidx for (xio = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); xio != NULL; xio = (union ctl_io *)TAILQ_NEXT(&xio->io_hdr, ooa_links)) { xio->io_hdr.flags |= CTL_FLAG_ABORT | CTL_FLAG_ABORT_STATUS; + ctl_try_unblock_io(lun, xio, FALSE); } /* Clear CA. */ for (i = 0; i < ctl_max_ports; i++) { @@ -11795,6 +11808,7 @@ ctl_abort_tasks_lun(struct ctl_lun *lun, uint32_t targ ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, sizeof(msg_info.task), M_NOWAIT); } + ctl_try_unblock_io(lun, xio, FALSE); } } } @@ -11967,6 +11981,7 @@ ctl_abort_task(union ctl_io *io) ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, sizeof(msg_info.task), M_NOWAIT); } + ctl_try_unblock_io(lun, xio, FALSE); } } mtx_unlock(&lun->lun_lock); @@ -12142,8 +12157,8 @@ ctl_handle_isc(union ctl_io *io) break; } mtx_lock(&lun->lun_lock); + ctl_try_unblock_others(lun, io, TRUE); TAILQ_REMOVE(&lun->ooa_queue, &io->io_hdr, ooa_links); - ctl_check_blocked(lun); mtx_unlock(&lun->lun_lock); ctl_free_io(io); break; @@ -12982,6 +12997,13 @@ ctl_process_done(union ctl_io *io) } /* + * Run through the blocked queue of this I/O and see if anything + * can be unblocked, now that this I/O is done and will be removed. + * We need to do it before removal to have OOA position to start. + */ + ctl_try_unblock_others(lun, io, TRUE); + + /* * Remove this from the OOA queue. */ TAILQ_REMOVE(&lun->ooa_queue, &io->io_hdr, ooa_links); @@ -12991,12 +13013,6 @@ ctl_process_done(union ctl_io *io) #endif /* - * Run through the blocked queue on this LUN and see if anything - * has become unblocked, now that this transaction is done. - */ - ctl_check_blocked(lun); - - /* * If the LUN has been invalidated, free it if there is nothing * left on its OOA queue. */ @@ -13151,7 +13167,7 @@ ctl_serseq_done(union ctl_io *io) return; mtx_lock(&lun->lun_lock); io->io_hdr.flags |= CTL_FLAG_SERSEQ_DONE; - ctl_check_blocked(lun); + ctl_try_unblock_others(lun, io, FALSE); mtx_unlock(&lun->lun_lock); } Modified: stable/11/sys/cam/ctl/ctl_frontend_ioctl.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_frontend_ioctl.c Wed Mar 13 20:27:48 2019 (r345113) +++ stable/11/sys/cam/ctl/ctl_frontend_ioctl.c Wed Mar 13 20:28:07 2019 (r345114) @@ -413,6 +413,7 @@ ctl_ioctl_io(struct cdev *dev, u_long cmd, caddr_t add memcpy(io, (void *)addr, sizeof(*io)); io->io_hdr.pool = pool_tmp; CTL_SOFTC(io) = sc_tmp; + TAILQ_INIT(&io->io_hdr.blocked_queue); /* * No status yet, so make sure the status is set properly. Modified: stable/11/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/11/sys/cam/ctl/ctl_io.h Wed Mar 13 20:27:48 2019 (r345113) +++ stable/11/sys/cam/ctl/ctl_io.h Wed Mar 13 20:28:07 2019 (r345114) @@ -85,7 +85,6 @@ typedef enum { CTL_FLAG_DO_AUTOSENSE = 0x00000020, /* grab sense info */ CTL_FLAG_USER_REQ = 0x00000040, /* request came from userland */ CTL_FLAG_ALLOCATED = 0x00000100, /* data space allocated */ - CTL_FLAG_BLOCKED = 0x00000200, /* on the blocked queue */ CTL_FLAG_ABORT_STATUS = 0x00000400, /* return TASK ABORTED status */ CTL_FLAG_ABORT = 0x00000800, /* this I/O should be aborted */ CTL_FLAG_DMA_INPROG = 0x00001000, /* DMA in progress */ @@ -237,14 +236,13 @@ struct ctl_io_hdr { #endif /* CTL_TIME_IO */ uint32_t num_dmas; /* Number of DMAs */ union ctl_io *remote_io; /* I/O counterpart on remote HA side */ - void *pad1; + union ctl_io *blocker; /* I/O blocking this one */ void *pool; /* I/O pool */ union ctl_priv ctl_private[CTL_NUM_PRIV];/* CTL private area */ - void *pad2; - void *pad3; + TAILQ_HEAD(, ctl_io_hdr) blocked_queue; /* I/Os blocked by this one */ STAILQ_ENTRY(ctl_io_hdr) links; /* linked list pointer */ - TAILQ_ENTRY(ctl_io_hdr) ooa_links; - TAILQ_ENTRY(ctl_io_hdr) blocked_links; + TAILQ_ENTRY(ctl_io_hdr) ooa_links; /* ooa_queue links */ + TAILQ_ENTRY(ctl_io_hdr) blocked_links; /* blocked_queue links */ }; typedef enum { Modified: stable/11/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/11/sys/cam/ctl/ctl_private.h Wed Mar 13 20:27:48 2019 (r345113) +++ stable/11/sys/cam/ctl/ctl_private.h Wed Mar 13 20:28:07 2019 (r345114) @@ -388,7 +388,6 @@ struct ctl_lun { sbintime_t last_busy; #endif TAILQ_HEAD(ctl_ooaq, ctl_io_hdr) ooa_queue; - TAILQ_HEAD(ctl_blockq,ctl_io_hdr) blocked_queue; STAILQ_ENTRY(ctl_lun) links; struct scsi_sense_data **pending_sense; ctl_ua_type **pending_ua; From owner-svn-src-all@freebsd.org Wed Mar 13 20:28:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB0A415410F3; Wed, 13 Mar 2019 20:28:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D20E6EF04; Wed, 13 Mar 2019 20:28:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B691FAF4; Wed, 13 Mar 2019 20:28:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2DKSntv040398; Wed, 13 Mar 2019 20:28:49 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DKSnVp040397; Wed, 13 Mar 2019 20:28:49 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903132028.x2DKSnVp040397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 13 Mar 2019 20:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345115 - stable/12/usr.bin/ctlstat X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/usr.bin/ctlstat X-SVN-Commit-Revision: 345115 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6D20E6EF04 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 20:28:50 -0000 Author: mav Date: Wed Mar 13 20:28:48 2019 New Revision: 345115 URL: https://svnweb.freebsd.org/changeset/base/345115 Log: MFC r344844: Flush stdout after each iteration. Without this, if output is redirected from the console, it is buffered for too long, making tool quite unusable. Modified: stable/12/usr.bin/ctlstat/ctlstat.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/ctlstat/ctlstat.c ============================================================================== --- stable/12/usr.bin/ctlstat/ctlstat.c Wed Mar 13 20:28:07 2019 (r345114) +++ stable/12/usr.bin/ctlstat/ctlstat.c Wed Mar 13 20:28:48 2019 (r345115) @@ -717,6 +717,7 @@ main(int argc, char **argv) } fprintf(stdout, "\n"); + fflush(stdout); ctx.flags &= ~CTLSTAT_FLAG_FIRST_RUN; if (count != 1) sleep(waittime); From owner-svn-src-all@freebsd.org Wed Mar 13 20:29:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC3E11541142; Wed, 13 Mar 2019 20:29:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6BA7C6F03B; Wed, 13 Mar 2019 20:29:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 58526FAF5; Wed, 13 Mar 2019 20:29:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2DKTBKh040474; Wed, 13 Mar 2019 20:29:11 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DKTBtO040473; Wed, 13 Mar 2019 20:29:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903132029.x2DKTBtO040473@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 13 Mar 2019 20:29:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r345116 - stable/11/usr.bin/ctlstat X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/usr.bin/ctlstat X-SVN-Commit-Revision: 345116 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6BA7C6F03B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 20:29:12 -0000 Author: mav Date: Wed Mar 13 20:29:10 2019 New Revision: 345116 URL: https://svnweb.freebsd.org/changeset/base/345116 Log: MFC r344844: Flush stdout after each iteration. Without this, if output is redirected from the console, it is buffered for too long, making tool quite unusable. Modified: stable/11/usr.bin/ctlstat/ctlstat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/ctlstat/ctlstat.c ============================================================================== --- stable/11/usr.bin/ctlstat/ctlstat.c Wed Mar 13 20:28:48 2019 (r345115) +++ stable/11/usr.bin/ctlstat/ctlstat.c Wed Mar 13 20:29:10 2019 (r345116) @@ -717,6 +717,7 @@ main(int argc, char **argv) } fprintf(stdout, "\n"); + fflush(stdout); ctx.flags &= ~CTLSTAT_FLAG_FIRST_RUN; if (count != 1) sleep(waittime); From owner-svn-src-all@freebsd.org Wed Mar 13 20:37:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCC8D1541748; Wed, 13 Mar 2019 20:37:02 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 81C616F9D3; Wed, 13 Mar 2019 20:37:02 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f50.google.com with SMTP id x4so2964172ion.2; Wed, 13 Mar 2019 13:37:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=D9xWOUv3OfQQ7pBLU4Ila9Cpw1QMZuA31AyESu/kZp0=; b=RlxNyIKv34dObOw60wMHCm2ggT5cpzsInJCYgl1Ctm2E6ghKqsaWj1dnR2d7vqYfpP wuO17FDIganMf8+3JfXc5Hx1vOAiTuNnTuZ87tf5zzdxnrvEuf5DanKK2fPYsjRUyJ63 Jgwhr+3ErRjMwKqQ+DuoH4O+Se1rAy+55eg3Yaap9jlbfMpy4nJA8hlSzV3T0FVQn0qS mMhFGiLtqJoanlYMBpbGNb0lZ1G8DeVBsEvg/Oe2piChDLgI8rAnaos49gKX+Rk7zPNJ oUAOobw+T2v3QjmIyrgH/qBjbl/r42mDVjH9cOguMRdax8izhQGrGv6CVfqox6B/PrOz gKjA== X-Gm-Message-State: APjAAAW6mDr0bZ2r6YaM1c2K0dm+V2b3aoA+w0OARtCbrmWk4+4l/DkG 0ESyXGK5O06jTkDX4/Z/fbUVqDHi X-Google-Smtp-Source: APXvYqyJFLD0rvuvhSIItKM32jlesn11Sf8IuPJVdI5dlM+o166jXab0i/XZ9pqkriTlZsBxUNvuRw== X-Received: by 2002:a5e:dd44:: with SMTP id u4mr5755409iop.44.1552509416303; Wed, 13 Mar 2019 13:36:56 -0700 (PDT) Received: from mail-io1-f48.google.com (mail-io1-f48.google.com. [209.85.166.48]) by smtp.gmail.com with ESMTPSA id a8sm4113608iol.35.2019.03.13.13.36.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Mar 2019 13:36:55 -0700 (PDT) Received: by mail-io1-f48.google.com with SMTP id f6so2971197iop.3; Wed, 13 Mar 2019 13:36:55 -0700 (PDT) X-Received: by 2002:a5e:a710:: with SMTP id b16mr8377098iod.233.1552509415750; Wed, 13 Mar 2019 13:36:55 -0700 (PDT) MIME-Version: 1.0 References: <201903131915.x2DJFbRk002502@repo.freebsd.org> In-Reply-To: <201903131915.x2DJFbRk002502@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Wed, 13 Mar 2019 13:36:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r345103 - head/sys/compat/linuxkpi/common/include/linux To: Hans Petter Selasky , Johannes Lundberg Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 81C616F9D3 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 20:37:03 -0000 Hi, A lot of the information about PCIe devices is read by PCI probe and cached on the (BSD) device. You could access it out of device_get_ivars(bsddev)->cfg.pcie and avoid the MMIO latency. On Wed, Mar 13, 2019 at 12:15 PM Hans Petter Selasky wrote: > +static inline enum pci_bus_speed > +pcie_get_speed_cap(struct pci_dev *dev) > +{ > + device_t root; > + uint32_t lnkcap, lnkcap2; > + int error, pos; > + > + root = device_get_parent(dev->dev.bsddev); > + if (root == NULL) > + return (PCI_SPEED_UNKNOWN); > + root = device_get_parent(root); > + if (root == NULL) > + return (PCI_SPEED_UNKNOWN); > + root = device_get_parent(root); > + if (root == NULL) > + return (PCI_SPEED_UNKNOWN); What is this mechanism trying to accomplish? It seems incredibly fragile. Looking for pci0? pcib0? > + if ((error = pci_find_cap(root, PCIY_EXPRESS, &pos)) != 0) > + return (PCI_SPEED_UNKNOWN); Cached as non-zero cfg.pcie.pcie_location value in ivars. > + lnkcap2 = pci_read_config(root, pos + PCIER_LINK_CAP2, 4); This one we don't cache, unfortunately, but could. Ditto LINK_CAP below. Usually "pos + PCIEfoo" is spelled "pcie_read_config(..., PCIEfoo...)." > + > + if (lnkcap2) { /* PCIe r3.0-compliant */ > + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_2_5GB) > + return (PCIE_SPEED_2_5GT); Seems like these definitions would be better suited as native PCIEM_LINK_CAP2_foo definitions in pcireg.h > + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_5_0GB) > + return (PCIE_SPEED_5_0GT); > + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_8_0GB) > + return (PCIE_SPEED_8_0GT); > + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_16_0GB) > + return (PCIE_SPEED_16_0GT); > + } else { /* pre-r3.0 */ > + lnkcap = pci_read_config(root, pos + PCIER_LINK_CAP, 4); > + if (lnkcap & PCI_EXP_LNKCAP_SLS_2_5GB) > + return (PCIE_SPEED_2_5GT); > + if (lnkcap & PCI_EXP_LNKCAP_SLS_5_0GB) > + return (PCIE_SPEED_5_0GT); > + if (lnkcap & PCI_EXP_LNKCAP_SLS_8_0GB) > + return (PCIE_SPEED_8_0GT); > + if (lnkcap & PCI_EXP_LNKCAP_SLS_16_0GB) > + return (PCIE_SPEED_16_0GT); > + } > + return (PCI_SPEED_UNKNOWN); > +} > + > +static inline enum pcie_link_width > +pcie_get_width_cap(struct pci_dev *dev) > +{ > + uint32_t lnkcap; > + > + pcie_capability_read_dword(dev, PCI_EXP_LNKCAP, &lnkcap); Better spelled as PCIER_LINK_CAP. > + if (lnkcap) > + return ((lnkcap & PCI_EXP_LNKCAP_MLW) >> 4); And PCIEM_LINK_CAP_MAX_WIDTH. > + > + return (PCIE_LNK_WIDTH_UNKNOWN); > } > > #endif /* _LINUX_PCI_H_ */ > Best, Conrad From owner-svn-src-all@freebsd.org Wed Mar 13 21:53:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FAC31543042; Wed, 13 Mar 2019 21:53:13 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1084C72248; Wed, 13 Mar 2019 21:53:13 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DFB8B18A61; Wed, 13 Mar 2019 21:53:12 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2DLrCqf087288; Wed, 13 Mar 2019 21:53:12 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DLrB2N087278; Wed, 13 Mar 2019 21:53:11 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201903132153.x2DLrB2N087278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Wed, 13 Mar 2019 21:53:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345117 - in stable/12/bin/sh: . tests/expansion X-SVN-Group: stable-12 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: in stable/12/bin/sh: . tests/expansion X-SVN-Commit-Revision: 345117 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1084C72248 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 21:53:13 -0000 Author: jilles Date: Wed Mar 13 21:53:10 2019 New Revision: 345117 URL: https://svnweb.freebsd.org/changeset/base/345117 Log: MFC r342880,r343981,r344902: sh: Fix $((-9223372036854775808)) Since $((9223372036854775808)) overflows, $((-9223372036854775808)) was not parsed correctly (with x=-9223372036854775808, $((x)) already worked, since that parses the value with the minus sign in one step). Values further from zero are still clamped to 9223372036854775807. Also, allow the full 64 bits in octal and hexadecimal. Added: stable/12/bin/sh/tests/expansion/arith15.0 - copied, changed from r342880, head/bin/sh/tests/expansion/arith15.0 stable/12/bin/sh/tests/expansion/arith16.0 - copied unchanged from r343981, head/bin/sh/tests/expansion/arith16.0 stable/12/bin/sh/tests/expansion/arith17.0 - copied unchanged from r343981, head/bin/sh/tests/expansion/arith17.0 Modified: stable/12/bin/sh/arith_yacc.c stable/12/bin/sh/arith_yacc.h stable/12/bin/sh/arith_yylex.c stable/12/bin/sh/shell.h stable/12/bin/sh/tests/expansion/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/bin/sh/arith_yacc.c ============================================================================== --- stable/12/bin/sh/arith_yacc.c Wed Mar 13 20:29:10 2019 (r345116) +++ stable/12/bin/sh/arith_yacc.c Wed Mar 13 21:53:10 2019 (r345117) @@ -104,7 +104,7 @@ static arith_t arith_lookupvarint(char *varname) if (str == NULL || *str == '\0') str = "0"; errno = 0; - result = strtoarith_t(str, &p, 0); + result = strtoarith_t(str, &p); if (errno != 0 || *p != '\0') yyerror("variable conversion error"); return result; Modified: stable/12/bin/sh/arith_yacc.h ============================================================================== --- stable/12/bin/sh/arith_yacc.h Wed Mar 13 20:29:10 2019 (r345116) +++ stable/12/bin/sh/arith_yacc.h Wed Mar 13 21:53:10 2019 (r345117) @@ -90,4 +90,5 @@ union yystype { extern union yystype yylval; +arith_t strtoarith_t(const char *restrict nptr, char **restrict endptr); int yylex(void); Modified: stable/12/bin/sh/arith_yylex.c ============================================================================== --- stable/12/bin/sh/arith_yylex.c Wed Mar 13 20:29:10 2019 (r345116) +++ stable/12/bin/sh/arith_yylex.c Wed Mar 13 21:53:10 2019 (r345117) @@ -35,6 +35,8 @@ #include __FBSDID("$FreeBSD$"); +#include +#include #include #include #include @@ -50,6 +52,32 @@ __FBSDID("$FreeBSD$"); #error Arithmetic tokens are out of order. #endif +arith_t +strtoarith_t(const char *restrict nptr, char **restrict endptr) +{ + arith_t val; + + while (isspace((unsigned char)*nptr)) + nptr++; + switch (*nptr) { + case '-': + return strtoimax(nptr, endptr, 0); + case '0': + return (arith_t)strtoumax(nptr, endptr, 0); + default: + val = (arith_t)strtoumax(nptr, endptr, 0); + if (val >= 0) + return val; + else if (val == ARITH_MIN) { + errno = ERANGE; + return ARITH_MIN; + } else { + errno = ERANGE; + return ARITH_MAX; + } + } +} + int yylex(void) { @@ -78,7 +106,7 @@ yylex(void) case '7': case '8': case '9': - yylval.val = strtoarith_t(buf, &end, 0); + yylval.val = strtoarith_t(buf, &end); arith_buf = end; return ARITH_NUM; case 'A': Modified: stable/12/bin/sh/shell.h ============================================================================== --- stable/12/bin/sh/shell.h Wed Mar 13 20:29:10 2019 (r345116) +++ stable/12/bin/sh/shell.h Wed Mar 13 21:53:10 2019 (r345117) @@ -59,8 +59,6 @@ */ typedef intmax_t arith_t; #define ARITH_FORMAT_STR "%" PRIdMAX -#define atoarith_t(arg) strtoimax(arg, NULL, 0) -#define strtoarith_t(nptr, endptr, base) strtoimax(nptr, endptr, base) #define ARITH_MIN INTMAX_MIN #define ARITH_MAX INTMAX_MAX Modified: stable/12/bin/sh/tests/expansion/Makefile ============================================================================== --- stable/12/bin/sh/tests/expansion/Makefile Wed Mar 13 20:29:10 2019 (r345116) +++ stable/12/bin/sh/tests/expansion/Makefile Wed Mar 13 21:53:10 2019 (r345117) @@ -21,6 +21,9 @@ ${PACKAGE}FILES+= arith11.0 ${PACKAGE}FILES+= arith12.0 ${PACKAGE}FILES+= arith13.0 ${PACKAGE}FILES+= arith14.0 +${PACKAGE}FILES+= arith15.0 +${PACKAGE}FILES+= arith16.0 +${PACKAGE}FILES+= arith17.0 ${PACKAGE}FILES+= assign1.0 ${PACKAGE}FILES+= cmdsubst1.0 ${PACKAGE}FILES+= cmdsubst2.0 Copied and modified: stable/12/bin/sh/tests/expansion/arith15.0 (from r342880, head/bin/sh/tests/expansion/arith15.0) ============================================================================== --- head/bin/sh/tests/expansion/arith15.0 Wed Jan 9 09:36:54 2019 (r342880, copy source) +++ stable/12/bin/sh/tests/expansion/arith15.0 Wed Mar 13 21:53:10 2019 (r345117) @@ -12,9 +12,9 @@ check() { XXX=-9223372036854775808 check "XXX" -9223372036854775808 check "XXX - 1" 9223372036854775807 -check $(($XXX - 1)) 9223372036854775807 -check $(($XXX - 2)) 9223372036854775806 -check $((0x8000000000000000 == 0x7fffffffffffffff)) \ +check "$XXX - 1" 9223372036854775807 +check "$XXX - 2" 9223372036854775806 +check "0x8000000000000000 == 0x7fffffffffffffff" \ 0 exit $((failures != 0)) Copied: stable/12/bin/sh/tests/expansion/arith16.0 (from r343981, head/bin/sh/tests/expansion/arith16.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/expansion/arith16.0 Wed Mar 13 21:53:10 2019 (r345117, copy of r343981, head/bin/sh/tests/expansion/arith16.0) @@ -0,0 +1,26 @@ +# $FreeBSD$ + +failures=0 + +for x in \ + 0x10000000000000000 \ + -0x8000000000000001 \ + 0xfffffffffffffffffffffffffffffffff \ + -0xfffffffffffffffffffffffffffffffff \ + 02000000000000000000000 \ + 9223372036854775808 \ + 9223372036854775809 \ + -9223372036854775809 \ + 9999999999999999999999999 \ + -9999999999999999999999999 +do + msg=$({ + v=$((x)) || : + } 3>&1 >&2 2>&3 3>&-) + r=$? + if [ "$r" = 0 ] || [ -z "$msg" ]; then + printf 'Failed: %s\n' "$x" + : $((failures += 1)) + fi +done +exit $((failures > 0)) Copied: stable/12/bin/sh/tests/expansion/arith17.0 (from r343981, head/bin/sh/tests/expansion/arith17.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/expansion/arith17.0 Wed Mar 13 21:53:10 2019 (r345117, copy of r343981, head/bin/sh/tests/expansion/arith17.0) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +[ $((9223372036854775809)) -gt 0 ] From owner-svn-src-all@freebsd.org Wed Mar 13 23:39:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D01D1544976; Wed, 13 Mar 2019 23:39:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B3F27522E; Wed, 13 Mar 2019 23:39:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 76281CB27; Wed, 13 Mar 2019 23:39:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r345103 - head/sys/compat/linuxkpi/common/include/linux To: cem@freebsd.org, Hans Petter Selasky , Johannes Lundberg Cc: src-committers , svn-src-all , svn-src-head References: <201903131915.x2DJFbRk002502@repo.freebsd.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Wed, 13 Mar 2019 16:39:42 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8B3F27522E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.89 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.89)[-0.885,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 23:39:46 -0000 On 3/13/19 1:36 PM, Conrad Meyer wrote: > Hi, > > A lot of the information about PCIe devices is read by PCI probe and > cached on the (BSD) device. You could access it out of > device_get_ivars(bsddev)->cfg.pcie and avoid the MMIO latency. Agreed when possible, though I'm not sure caching lnkcap is really all that useful. > On Wed, Mar 13, 2019 at 12:15 PM Hans Petter Selasky > wrote: >> +static inline enum pci_bus_speed >> +pcie_get_speed_cap(struct pci_dev *dev) >> +{ >> + device_t root; >> + uint32_t lnkcap, lnkcap2; >> + int error, pos; >> + >> + root = device_get_parent(dev->dev.bsddev); >> + if (root == NULL) >> + return (PCI_SPEED_UNKNOWN); >> + root = device_get_parent(root); >> + if (root == NULL) >> + return (PCI_SPEED_UNKNOWN); >> + root = device_get_parent(root); >> + if (root == NULL) >> + return (PCI_SPEED_UNKNOWN); > > What is this mechanism trying to accomplish? It seems incredibly > fragile. Looking for pci0? pcib0? It does seem broken, or maybe that it only works for DRM drivers and nothing else. For non-DRM drivers, 'bsddev' is a PCI-e endpoint. You would then go up two layers (pciX and pcibX) to get to the parent bridge. However, this is assuming a DRM layout where it has to go drm0 -> vgapci0 -> pciX -> pcibX due to the vgapci pseudo-driver. As a result, this function can't possibly work on anything other than a DRM driver. Since it would try to use pci ivars on some PCI bus instance (or worse), it's likely to cause random panics if used from a non-DRM driver. Furthermore, it's not at all clear to me why you can't just read lnkcap/lnkcap2 from the endpoint device directly vs heading up to the parent bridge though. Hmm, I guess it's trying to infer the capabilities of the "slot", so that's why it needs the grandparent. You will have to do something less fragile to find the grandparent. The simplest way may be to walk up to the first "pcib" device you see and then stop. You will still want to see if it's a "real" PCI device by seeing if it's parent is a "pci" device (meaning that the "pcib" device will have valid PCI IVARs and PCI config registers you can read). pci_find_pcie_root_port has some similar code for this, but that function would walk too far up for what you want here, so you can't reuse it as-is. >> + if ((error = pci_find_cap(root, PCIY_EXPRESS, &pos)) != 0) >> + return (PCI_SPEED_UNKNOWN); > > Cached as non-zero cfg.pcie.pcie_location value in ivars. > >> + lnkcap2 = pci_read_config(root, pos + PCIER_LINK_CAP2, 4); > > This one we don't cache, unfortunately, but could. Ditto LINK_CAP > below. Usually "pos + PCIEfoo" is spelled "pcie_read_config(..., > PCIEfoo...)." Yes, pcie_read_config is what you normally would use. That uses the cached pcie_location for you. pcie_read_config(dev->dev.bsddev, PCIER_LINK_CAP2, 2); But also, you should be checking the PCIe version to see if this register exists instead of reading it unconditionally. Specifically, you should read the version field (PCIEM_FLAGS_VERSION) from PCIER_FLAGS. LINK_CAP2 only exists if the version >= 2. >> + >> + if (lnkcap2) { /* PCIe r3.0-compliant */ >> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_2_5GB) >> + return (PCIE_SPEED_2_5GT); > > Seems like these definitions would be better suited as native > PCIEM_LINK_CAP2_foo definitions in pcireg.h I feel less strongly about those since we have to provide the constants anyway for consumers to use. >> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_5_0GB) >> + return (PCIE_SPEED_5_0GT); >> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_8_0GB) >> + return (PCIE_SPEED_8_0GT); >> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_16_0GB) >> + return (PCIE_SPEED_16_0GT); >> + } else { /* pre-r3.0 */ >> + lnkcap = pci_read_config(root, pos + PCIER_LINK_CAP, 4); >> + if (lnkcap & PCI_EXP_LNKCAP_SLS_2_5GB) >> + return (PCIE_SPEED_2_5GT); >> + if (lnkcap & PCI_EXP_LNKCAP_SLS_5_0GB) >> + return (PCIE_SPEED_5_0GT); >> + if (lnkcap & PCI_EXP_LNKCAP_SLS_8_0GB) >> + return (PCIE_SPEED_8_0GT); >> + if (lnkcap & PCI_EXP_LNKCAP_SLS_16_0GB) >> + return (PCIE_SPEED_16_0GT); >> + } >> + return (PCI_SPEED_UNKNOWN); >> +} >> + >> +static inline enum pcie_link_width >> +pcie_get_width_cap(struct pci_dev *dev) >> +{ >> + uint32_t lnkcap; >> + >> + pcie_capability_read_dword(dev, PCI_EXP_LNKCAP, &lnkcap); > > Better spelled as PCIER_LINK_CAP. > >> + if (lnkcap) >> + return ((lnkcap & PCI_EXP_LNKCAP_MLW) >> 4); > > And PCIEM_LINK_CAP_MAX_WIDTH. Given that this is using a linuxkpi API (pcie_capability_read_dword instead of pcie_read_config()) then the rest of this function is written in the Linux KPI, so I think using Linux' native constants is actually more consistent for this function. -- John Baldwin From owner-svn-src-all@freebsd.org Thu Mar 14 00:57:36 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57F511546968; Thu, 14 Mar 2019 00:57:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EF6E6802F2; Thu, 14 Mar 2019 00:57:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B82A81A8E1; Thu, 14 Mar 2019 00:57:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2E0vZSb082555; Thu, 14 Mar 2019 00:57:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2E0vZs5082554; Thu, 14 Mar 2019 00:57:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903140057.x2E0vZs5082554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 14 Mar 2019 00:57:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345120 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 345120 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EF6E6802F2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 00:57:36 -0000 Author: mav Date: Thu Mar 14 00:57:35 2019 New Revision: 345120 URL: https://svnweb.freebsd.org/changeset/base/345120 Log: MFC r344866: Add respective tunables to few ZFS sysctls. Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Mar 14 00:12:59 2019 (r345119) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Mar 14 00:57:35 2019 (r345120) @@ -1420,22 +1420,22 @@ boolean_t l2arc_noprefetch = B_TRUE; /* don't cache p boolean_t l2arc_feed_again = B_TRUE; /* turbo warmup */ boolean_t l2arc_norw = B_TRUE; /* no reads during writes */ -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_max, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_max, CTLFLAG_RWTUN, &l2arc_write_max, 0, "max write size"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_boost, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_boost, CTLFLAG_RWTUN, &l2arc_write_boost, 0, "extra write during warmup"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_headroom, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_headroom, CTLFLAG_RWTUN, &l2arc_headroom, 0, "number of dev writes"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_secs, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_secs, CTLFLAG_RWTUN, &l2arc_feed_secs, 0, "interval seconds"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_min_ms, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_min_ms, CTLFLAG_RWTUN, &l2arc_feed_min_ms, 0, "min interval milliseconds"); -SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_noprefetch, CTLFLAG_RW, +SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_noprefetch, CTLFLAG_RWTUN, &l2arc_noprefetch, 0, "don't cache prefetch bufs"); -SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_feed_again, CTLFLAG_RW, +SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_feed_again, CTLFLAG_RWTUN, &l2arc_feed_again, 0, "turbo warmup"); -SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_norw, CTLFLAG_RW, +SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_norw, CTLFLAG_RWTUN, &l2arc_norw, 0, "no reads during writes"); SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_size, CTLFLAG_RD, Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Thu Mar 14 00:12:59 2019 (r345119) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Thu Mar 14 00:57:35 2019 (r345120) @@ -152,7 +152,7 @@ static boolean_t vdev_trim_on_init = B_TRUE; SYSCTL_DECL(_vfs_zfs_vdev); -SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, trim_on_init, CTLFLAG_RW, +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, trim_on_init, CTLFLAG_RWTUN, &vdev_trim_on_init, 0, "Enable/disable full vdev trim on initialisation"); /* From owner-svn-src-all@freebsd.org Thu Mar 14 00:57:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E458154699D; Thu, 14 Mar 2019 00:57:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A206F80407; Thu, 14 Mar 2019 00:57:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 936971A8E2; Thu, 14 Mar 2019 00:57:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2E0vtWI082624; Thu, 14 Mar 2019 00:57:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2E0vt9L082623; Thu, 14 Mar 2019 00:57:55 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903140057.x2E0vt9L082623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 14 Mar 2019 00:57: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: r345121 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 345121 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A206F80407 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 00:57:56 -0000 Author: mav Date: Thu Mar 14 00:57:54 2019 New Revision: 345121 URL: https://svnweb.freebsd.org/changeset/base/345121 Log: MFC r344866: Add respective tunables to few ZFS sysctls. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Mar 14 00:57:35 2019 (r345120) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Mar 14 00:57:54 2019 (r345121) @@ -1343,22 +1343,22 @@ boolean_t l2arc_noprefetch = B_TRUE; /* don't cache p boolean_t l2arc_feed_again = B_TRUE; /* turbo warmup */ boolean_t l2arc_norw = B_TRUE; /* no reads during writes */ -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_max, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_max, CTLFLAG_RWTUN, &l2arc_write_max, 0, "max write size"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_boost, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_boost, CTLFLAG_RWTUN, &l2arc_write_boost, 0, "extra write during warmup"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_headroom, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_headroom, CTLFLAG_RWTUN, &l2arc_headroom, 0, "number of dev writes"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_secs, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_secs, CTLFLAG_RWTUN, &l2arc_feed_secs, 0, "interval seconds"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_min_ms, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_min_ms, CTLFLAG_RWTUN, &l2arc_feed_min_ms, 0, "min interval milliseconds"); -SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_noprefetch, CTLFLAG_RW, +SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_noprefetch, CTLFLAG_RWTUN, &l2arc_noprefetch, 0, "don't cache prefetch bufs"); -SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_feed_again, CTLFLAG_RW, +SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_feed_again, CTLFLAG_RWTUN, &l2arc_feed_again, 0, "turbo warmup"); -SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_norw, CTLFLAG_RW, +SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_norw, CTLFLAG_RWTUN, &l2arc_norw, 0, "no reads during writes"); SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_size, CTLFLAG_RD, Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Thu Mar 14 00:57:35 2019 (r345120) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Thu Mar 14 00:57:54 2019 (r345121) @@ -152,7 +152,7 @@ static boolean_t vdev_trim_on_init = B_TRUE; SYSCTL_DECL(_vfs_zfs_vdev); -SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, trim_on_init, CTLFLAG_RW, +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, trim_on_init, CTLFLAG_RWTUN, &vdev_trim_on_init, 0, "Enable/disable full vdev trim on initialisation"); /* From owner-svn-src-all@freebsd.org Thu Mar 14 00:58:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE8D61546A28; Thu, 14 Mar 2019 00:58:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 58F0980539; Thu, 14 Mar 2019 00:58:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B3901A8E4; Thu, 14 Mar 2019 00:58:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2E0wdVn082711; Thu, 14 Mar 2019 00:58:39 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2E0wdqD082710; Thu, 14 Mar 2019 00:58:39 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903140058.x2E0wdqD082710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 14 Mar 2019 00:58:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345122 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 345122 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 58F0980539 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 00:58:40 -0000 Author: mav Date: Thu Mar 14 00:58:39 2019 New Revision: 345122 URL: https://svnweb.freebsd.org/changeset/base/345122 Log: MFC r344903: Improve entropy for ZFS taskqueue selection. I just found that at least on Skylake CPUs cpu_ticks() never returns odd values, only even, and possibly has even bigger step (176/2?), that makes its lower bits very bad entropy source, leaving half of taskqueues unused. Switch to sbinuptime(), closer to upstreams, mitigates the problem by the rate conversion working as kind of hash function. In case that is somehow not enough (timer rate is too low or too divisible) mix in curcpu. Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Thu Mar 14 00:57:54 2019 (r345121) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Thu Mar 14 00:58:39 2019 (r345122) @@ -1070,7 +1070,8 @@ spa_taskq_dispatch_ent(spa_t *spa, zio_type_t t, zio_t tq = tqs->stqs_taskq[0]; } else { #ifdef _KERNEL - tq = tqs->stqs_taskq[cpu_ticks() % tqs->stqs_count]; + tq = tqs->stqs_taskq[(u_int)(sbinuptime() + curcpu) % + tqs->stqs_count]; #else tq = tqs->stqs_taskq[gethrtime() % tqs->stqs_count]; #endif From owner-svn-src-all@freebsd.org Thu Mar 14 00:58:58 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C0B81546A80; Thu, 14 Mar 2019 00:58:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B711980662; Thu, 14 Mar 2019 00:58:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABB5D1A8E5; Thu, 14 Mar 2019 00:58:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2E0wvvL082779; Thu, 14 Mar 2019 00:58:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2E0wvR7082778; Thu, 14 Mar 2019 00:58:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903140058.x2E0wvR7082778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 14 Mar 2019 00:58: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: r345123 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 345123 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B711980662 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 00:58:58 -0000 Author: mav Date: Thu Mar 14 00:58:57 2019 New Revision: 345123 URL: https://svnweb.freebsd.org/changeset/base/345123 Log: MFC r344903: Improve entropy for ZFS taskqueue selection. I just found that at least on Skylake CPUs cpu_ticks() never returns odd values, only even, and possibly has even bigger step (176/2?), that makes its lower bits very bad entropy source, leaving half of taskqueues unused. Switch to sbinuptime(), closer to upstreams, mitigates the problem by the rate conversion working as kind of hash function. In case that is somehow not enough (timer rate is too low or too divisible) mix in curcpu. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Thu Mar 14 00:58:39 2019 (r345122) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Thu Mar 14 00:58:57 2019 (r345123) @@ -1063,7 +1063,8 @@ spa_taskq_dispatch_ent(spa_t *spa, zio_type_t t, zio_t tq = tqs->stqs_taskq[0]; } else { #ifdef _KERNEL - tq = tqs->stqs_taskq[cpu_ticks() % tqs->stqs_count]; + tq = tqs->stqs_taskq[(u_int)(sbinuptime() + curcpu) % + tqs->stqs_count]; #else tq = tqs->stqs_taskq[gethrtime() % tqs->stqs_count]; #endif From owner-svn-src-all@freebsd.org Thu Mar 14 02:46:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FDFF15250E0; Thu, 14 Mar 2019 02:46:06 +0000 (UTC) (envelope-from sef@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E54384E6A; Thu, 14 Mar 2019 02:46:06 +0000 (UTC) (envelope-from sef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 001A41BF30; Thu, 14 Mar 2019 02:46:05 +0000 (UTC) (envelope-from sef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2E2k5U6039820; Thu, 14 Mar 2019 02:46:05 GMT (envelope-from sef@FreeBSD.org) Received: (from sef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2E2k3wv039808; Thu, 14 Mar 2019 02:46:03 GMT (envelope-from sef@FreeBSD.org) Message-Id: <201903140246.x2E2k3wv039808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sef set sender to sef@FreeBSD.org using -f From: Sean Eric Fagan Date: Thu, 14 Mar 2019 02:46:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345124 - in stable/12: sys/conf sys/modules/crypto sys/opencrypto tools/tools/crypto X-SVN-Group: stable-12 X-SVN-Commit-Author: sef X-SVN-Commit-Paths: in stable/12: sys/conf sys/modules/crypto sys/opencrypto tools/tools/crypto X-SVN-Commit-Revision: 345124 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0E54384E6A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 02:46:06 -0000 Author: sef Date: Thu Mar 14 02:46:03 2019 New Revision: 345124 URL: https://svnweb.freebsd.org/changeset/base/345124 Log: MFC r344140,r344141,r344142,r344143,r344388,r344547 r344140: Add CBC-MAC authentication. r344141: Add AES-CCM encryption, and plumb into OCF. r344142: Pasting in a source control line missed the last quote. Fixed. r344143: Fix another issue from r344141, having to do with size of a shift amount. This did not show up in my testing. r344388: It turns out that setting the IV length is necessary with CCM in OpenSSL. This adds that back. r344547: Fix another bug introduced during the review process of r344140: the tag wasn't being computed properly due to chaning a >= comparison to an == comparison. Added: stable/12/sys/opencrypto/cbc_mac.c - copied, changed from r344140, head/sys/opencrypto/cbc_mac.c stable/12/sys/opencrypto/cbc_mac.h - copied unchanged from r344140, head/sys/opencrypto/cbc_mac.h stable/12/sys/opencrypto/xform_cbc_mac.c - copied unchanged from r344140, head/sys/opencrypto/xform_cbc_mac.c Modified: stable/12/sys/conf/files stable/12/sys/modules/crypto/Makefile stable/12/sys/opencrypto/cryptodev.c stable/12/sys/opencrypto/cryptodev.h stable/12/sys/opencrypto/cryptosoft.c stable/12/sys/opencrypto/xform_aes_icm.c stable/12/sys/opencrypto/xform_auth.h stable/12/sys/opencrypto/xform_enc.h stable/12/tools/tools/crypto/cryptocheck.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/files ============================================================================== --- stable/12/sys/conf/files Thu Mar 14 00:58:57 2019 (r345123) +++ stable/12/sys/conf/files Thu Mar 14 02:46:03 2019 (r345124) @@ -4856,6 +4856,8 @@ crypto/libsodium/randombytes.c optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include -I$S/crypto/libsodium" crypto/libsodium/utils.c optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include -I$S/crypto/libsodium" +opencrypto/cbc_mac.c optional crypto +opencrypto/xform_cbc_mac.c optional crypto rpc/auth_none.c optional krpc | nfslockd | nfscl | nfsd rpc/auth_unix.c optional krpc | nfslockd | nfscl | nfsd rpc/authunix_prot.c optional krpc | nfslockd | nfscl | nfsd Modified: stable/12/sys/modules/crypto/Makefile ============================================================================== --- stable/12/sys/modules/crypto/Makefile Thu Mar 14 00:58:57 2019 (r345123) +++ stable/12/sys/modules/crypto/Makefile Thu Mar 14 02:46:03 2019 (r345124) @@ -68,5 +68,7 @@ CFLAGS.utils.c += -I${LIBSODIUM_INC} -I${LIBSODIUM_C SRCS += opt_param.h cryptodev_if.h bus_if.h device_if.h SRCS += opt_ddb.h +SRCS += cbc_mac.c +SRCS += xform_cbc_mac.c .include Copied and modified: stable/12/sys/opencrypto/cbc_mac.c (from r344140, head/sys/opencrypto/cbc_mac.c) ============================================================================== --- head/sys/opencrypto/cbc_mac.c Fri Feb 15 03:46:39 2019 (r344140, copy source) +++ stable/12/sys/opencrypto/cbc_mac.c Thu Mar 14 02:46:03 2019 (r345124) @@ -23,7 +23,7 @@ */ #include -__FBSDID("$FreeBSD$); +__FBSDID("$FreeBSD$"); #include #include @@ -124,23 +124,31 @@ AES_CBC_MAC_Reinit(struct aes_cbc_mac_ctx *ctx, const rijndaelEncrypt(ctx->keysched, ctx->rounds, b0, ctx->block); /* If there is auth data, we need to set up the staging block */ if (ctx->authDataLength) { + size_t addLength; if (ctx->authDataLength < ((1<<16) - (1<<8))) { uint16_t sizeVal = htobe16(ctx->authDataLength); bcopy(&sizeVal, ctx->staging_block, sizeof(sizeVal)); - ctx->blockIndex = sizeof(sizeVal); - } else if (ctx->authDataLength < (1UL<<32)) { + addLength = sizeof(sizeVal); + } else if (ctx->authDataLength < (1ULL<<32)) { uint32_t sizeVal = htobe32(ctx->authDataLength); ctx->staging_block[0] = 0xff; ctx->staging_block[1] = 0xfe; bcopy(&sizeVal, ctx->staging_block+2, sizeof(sizeVal)); - ctx->blockIndex = 2 + sizeof(sizeVal); + addLength = 2 + sizeof(sizeVal); } else { uint64_t sizeVal = htobe64(ctx->authDataLength); ctx->staging_block[0] = 0xff; ctx->staging_block[1] = 0xff; bcopy(&sizeVal, ctx->staging_block+2, sizeof(sizeVal)); - ctx->blockIndex = 2 + sizeof(sizeVal); + addLength = 2 + sizeof(sizeVal); } + ctx->blockIndex = addLength; + /* + * The length descriptor goes into the AAD buffer, so we + * need to account for it. + */ + ctx->authDataLength += addLength; + ctx->authDataCount = addLength; } } @@ -181,10 +189,9 @@ AES_CBC_MAC_Update(struct aes_cbc_mac_ctx *ctx, const ctx->authDataCount += copy_amt; ctx->blockIndex += copy_amt; ctx->blockIndex %= sizeof(ctx->staging_block); - if (ctx->authDataCount == ctx->authDataLength) - length = 0; + if (ctx->blockIndex == 0 || - ctx->authDataCount >= ctx->authDataLength) { + ctx->authDataCount == ctx->authDataLength) { /* * We're done with this block, so we * xor staging_block with block, and then @@ -193,8 +200,17 @@ AES_CBC_MAC_Update(struct aes_cbc_mac_ctx *ctx, const xor_and_encrypt(ctx, ctx->staging_block, ctx->block); bzero(ctx->staging_block, sizeof(ctx->staging_block)); ctx->blockIndex = 0; + if (ctx->authDataCount >= ctx->authDataLength) + break; } } + /* + * We'd like to be able to check length == 0 and return + * here, but the way OCF calls us, length is always + * blksize (16, in this case). So we have to count on + * the fact that OCF calls us separately for the AAD and + * for the real data. + */ return (0); } /* Copied: stable/12/sys/opencrypto/cbc_mac.h (from r344140, head/sys/opencrypto/cbc_mac.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/opencrypto/cbc_mac.h Thu Mar 14 02:46:03 2019 (r345124, copy of r344140, head/sys/opencrypto/cbc_mac.h) @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2014 The FreeBSD Foundation + * Copyright (c) 2018, iXsystems Inc. + * All rights reserved. + * + * This software was developed by Sean Eric Fagan, with lots of references + * to existing AES-CCM (gmac) code. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * + */ + +#ifndef _CBC_CCM_H +# define _CBC_CCM_H + +# include +# include + +# define CCM_CBC_BLOCK_LEN 16 /* 128 bits */ +# define CCM_CBC_MAX_DIGEST_LEN 16 +# define CCM_CBC_MIN_DIGEST_LEN 4 + +/* + * This is the authentication context structure; + * the encryption one is similar. + */ +struct aes_cbc_mac_ctx { + uint64_t authDataLength, authDataCount; + uint64_t cryptDataLength, cryptDataCount; + int blockIndex; + uint8_t staging_block[CCM_CBC_BLOCK_LEN]; + uint8_t block[CCM_CBC_BLOCK_LEN]; + const uint8_t *nonce; + int nonceLength; /* This one is in bytes, not bits! */ + /* AES state data */ + int rounds; + uint32_t keysched[4*(RIJNDAEL_MAXNR+1)]; +}; + +void AES_CBC_MAC_Init(struct aes_cbc_mac_ctx *); +void AES_CBC_MAC_Setkey(struct aes_cbc_mac_ctx *, const uint8_t *, uint16_t); +void AES_CBC_MAC_Reinit(struct aes_cbc_mac_ctx *, const uint8_t *, uint16_t); +int AES_CBC_MAC_Update(struct aes_cbc_mac_ctx *, const uint8_t *, uint16_t); +void AES_CBC_MAC_Final(uint8_t *, struct aes_cbc_mac_ctx *); + +#endif /* _CBC_CCM_H */ Modified: stable/12/sys/opencrypto/cryptodev.c ============================================================================== --- stable/12/sys/opencrypto/cryptodev.c Thu Mar 14 00:58:57 2019 (r345123) +++ stable/12/sys/opencrypto/cryptodev.c Thu Mar 14 02:46:03 2019 (r345124) @@ -444,6 +444,9 @@ cryptof_ioctl( case CRYPTO_CHACHA20: txform = &enc_xform_chacha20; break; + case CRYPTO_AES_CCM_16: + txform = &enc_xform_ccm; + break; default: CRYPTDEB("invalid cipher"); @@ -488,6 +491,25 @@ cryptof_ioctl( thash = &auth_hash_nist_gmac_aes_256; break; + case CRYPTO_AES_CCM_CBC_MAC: + switch (sop->keylen) { + case 16: + thash = &auth_hash_ccm_cbc_mac_128; + break; + case 24: + thash = &auth_hash_ccm_cbc_mac_192; + break; + case 32: + thash = &auth_hash_ccm_cbc_mac_256; + break; + default: + CRYPTDEB("Invalid CBC MAC key size %d", + sop->keylen); + SDT_PROBE1(opencrypto, dev, ioctl, + error, __LINE__); + return (EINVAL); + } + break; #ifdef notdef case CRYPTO_MD5: thash = &auth_hash_md5; @@ -1003,12 +1025,13 @@ cryptodev_aead( } /* - * For GCM, crd_len covers only the AAD. For other ciphers + * For GCM/CCM, crd_len covers only the AAD. For other ciphers * chained with an HMAC, crd_len covers both the AAD and the * cipher text. */ crda->crd_skip = 0; - if (cse->cipher == CRYPTO_AES_NIST_GCM_16) + if (cse->cipher == CRYPTO_AES_NIST_GCM_16 || + cse->cipher == CRYPTO_AES_CCM_16) crda->crd_len = caead->aadlen; else crda->crd_len = caead->aadlen + caead->len; Modified: stable/12/sys/opencrypto/cryptodev.h ============================================================================== --- stable/12/sys/opencrypto/cryptodev.h Thu Mar 14 00:58:57 2019 (r345123) +++ stable/12/sys/opencrypto/cryptodev.h Thu Mar 14 02:46:03 2019 (r345124) @@ -86,6 +86,7 @@ #define SHA1_KPDK_HASH_LEN 20 #define AES_GMAC_HASH_LEN 16 #define POLY1305_HASH_LEN 16 +#define AES_CBC_MAC_HASH_LEN 16 /* Maximum hash algorithm result length */ #define HASH_MAX_LEN SHA2_512_HASH_LEN /* Keep this updated */ @@ -107,6 +108,9 @@ #define AES_128_GMAC_KEY_LEN 16 #define AES_192_GMAC_KEY_LEN 24 #define AES_256_GMAC_KEY_LEN 32 +#define AES_128_CBC_MAC_KEY_LEN 16 +#define AES_192_CBC_MAC_KEY_LEN 24 +#define AES_256_CBC_MAC_KEY_LEN 32 #define POLY1305_KEY_LEN 32 @@ -129,6 +133,7 @@ #define ARC4_IV_LEN 1 #define AES_GCM_IV_LEN 12 +#define AES_CCM_IV_LEN 12 #define AES_XTS_IV_LEN 8 #define AES_XTS_ALPHA 0x87 /* GF(2^128) generator polynomial */ @@ -199,7 +204,9 @@ #define CRYPTO_SHA2_384 36 #define CRYPTO_SHA2_512 37 #define CRYPTO_POLY1305 38 -#define CRYPTO_ALGORITHM_MAX 38 /* Keep updated - see below */ +#define CRYPTO_AES_CCM_CBC_MAC 39 /* auth side */ +#define CRYPTO_AES_CCM_16 40 /* cipher side */ +#define CRYPTO_ALGORITHM_MAX 40 /* Keep updated - see below */ #define CRYPTO_ALGO_VALID(x) ((x) >= CRYPTO_ALGORITHM_MIN && \ (x) <= CRYPTO_ALGORITHM_MAX) Modified: stable/12/sys/opencrypto/cryptosoft.c ============================================================================== --- stable/12/sys/opencrypto/cryptosoft.c Thu Mar 14 00:58:57 2019 (r345123) +++ stable/12/sys/opencrypto/cryptosoft.c Thu Mar 14 02:46:03 2019 (r345124) @@ -62,6 +62,9 @@ __FBSDID("$FreeBSD$"); #include #include "cryptodev_if.h" +_Static_assert(AES_CCM_IV_LEN == AES_GCM_IV_LEN, + "AES_GCM_IV_LEN must currently be the same as AES_CCM_IV_LEN"); + static int32_t swcr_id; u_int8_t hmac_ipad_buffer[HMAC_MAX_BLOCK_LEN]; @@ -506,6 +509,7 @@ swcr_authenc(struct cryptop *crp) caddr_t buf = (caddr_t)crp->crp_buf; uint32_t *blkp; int aadlen, blksz, i, ivlen, len, iskip, oskip, r; + int isccm = 0; ivlen = blksz = iskip = oskip = 0; @@ -520,13 +524,18 @@ swcr_authenc(struct cryptop *crp) sw = &ses->swcr_algorithms[i]; switch (sw->sw_alg) { + case CRYPTO_AES_CCM_16: case CRYPTO_AES_NIST_GCM_16: case CRYPTO_AES_NIST_GMAC: swe = sw; crde = crd; exf = swe->sw_exf; - ivlen = 12; + /* AES_CCM_IV_LEN and AES_GCM_IV_LEN are both 12 */ + ivlen = AES_CCM_IV_LEN; break; + case CRYPTO_AES_CCM_CBC_MAC: + isccm = 1; + /* FALLTHROUGH */ case CRYPTO_AES_128_NIST_GMAC: case CRYPTO_AES_192_NIST_GMAC: case CRYPTO_AES_256_NIST_GMAC: @@ -544,8 +553,26 @@ swcr_authenc(struct cryptop *crp) } if (crde == NULL || crda == NULL) return (EINVAL); + /* + * We need to make sure that the auth algorithm matches the + * encr algorithm. Specifically, for AES-GCM must go with + * AES NIST GMAC, and AES-CCM must go with CBC-MAC. + */ + if (crde->crd_alg == CRYPTO_AES_NIST_GCM_16) { + switch (crda->crd_alg) { + case CRYPTO_AES_128_NIST_GMAC: + case CRYPTO_AES_192_NIST_GMAC: + case CRYPTO_AES_256_NIST_GMAC: + break; /* Good! */ + default: + return (EINVAL); /* Not good! */ + } + } else if (crde->crd_alg == CRYPTO_AES_CCM_16 && + crda->crd_alg != CRYPTO_AES_CCM_CBC_MAC) + return (EINVAL); - if (crde->crd_alg == CRYPTO_AES_NIST_GCM_16 && + if ((crde->crd_alg == CRYPTO_AES_NIST_GCM_16 || + crde->crd_alg == CRYPTO_AES_CCM_16) && (crde->crd_flags & CRD_F_IV_EXPLICIT) == 0) return (EINVAL); @@ -576,6 +603,15 @@ swcr_authenc(struct cryptop *crp) } } + if (swa->sw_alg == CRYPTO_AES_CCM_CBC_MAC) { + /* + * AES CCM-CBC needs to know the length of + * both the auth data, and payload data, before + * doing the auth computation. + */ + ctx.aes_cbc_mac_ctx.authDataLength = crda->crd_len; + ctx.aes_cbc_mac_ctx.cryptDataLength = crde->crd_len; + } /* Supply MAC with IV */ if (axf->Reinit) axf->Reinit(&ctx, iv, ivlen); @@ -610,16 +646,30 @@ swcr_authenc(struct cryptop *crp) bzero(blk, blksz); crypto_copydata(crp->crp_flags, buf, crde->crd_skip + i, len, blk); + /* + * One of the problems with CCM+CBC is that the authentication + * is done on the unecncrypted data. As a result, we have + * to do the authentication update at different times, + * depending on whether it's CCM or not. + */ if (crde->crd_flags & CRD_F_ENCRYPT) { + if (isccm) + axf->Update(&ctx, blk, len); if (exf->encrypt_multi != NULL) exf->encrypt_multi(swe->sw_kschedule, blk, len); else exf->encrypt(swe->sw_kschedule, blk); - axf->Update(&ctx, blk, len); + if (!isccm) + axf->Update(&ctx, blk, len); crypto_copyback(crp->crp_flags, buf, crde->crd_skip + i, len, blk); } else { + if (isccm) { + KASSERT(exf->encrypt_multi == NULL, + ("assume CCM is single-block only")); + exf->decrypt(swe->sw_kschedule, blk); + } axf->Update(&ctx, blk, len); } } @@ -650,6 +700,11 @@ swcr_authenc(struct cryptop *crp) r = timingsafe_bcmp(aalg, uaalg, axf->hashsize); if (r == 0) { /* tag matches, decrypt data */ + if (isccm) { + KASSERT(exf->reinit != NULL, + ("AES-CCM reinit function must be set")); + exf->reinit(swe->sw_kschedule, iv); + } for (i = 0; i < crde->crd_len; i += blksz) { len = MIN(crde->crd_len - i, blksz); if (len < blksz) @@ -799,6 +854,9 @@ swcr_newsession(device_t dev, crypto_session_t cses, s case CRYPTO_AES_NIST_GCM_16: txf = &enc_xform_aes_nist_gcm; goto enccommon; + case CRYPTO_AES_CCM_16: + txf = &enc_xform_ccm; + goto enccommon; case CRYPTO_AES_NIST_GMAC: txf = &enc_xform_aes_nist_gmac; swd->sw_exf = txf; @@ -943,6 +1001,22 @@ swcr_newsession(device_t dev, crypto_session_t cses, s swd->sw_axf = axf; break; + case CRYPTO_AES_CCM_CBC_MAC: + switch (cri->cri_klen) { + case 128: + axf = &auth_hash_ccm_cbc_mac_128; + break; + case 192: + axf = &auth_hash_ccm_cbc_mac_192; + break; + case 256: + axf = &auth_hash_ccm_cbc_mac_256; + break; + default: + swcr_freesession(dev, cses); + return EINVAL; + } + goto auth4common; case CRYPTO_AES_128_NIST_GMAC: axf = &auth_hash_nist_gmac_aes_128; goto auth4common; @@ -1042,6 +1116,7 @@ swcr_freesession(device_t dev, crypto_session_t cses) case CRYPTO_CAMELLIA_CBC: case CRYPTO_NULL_CBC: case CRYPTO_CHACHA20: + case CRYPTO_AES_CCM_16: txf = swd->sw_exf; if (swd->sw_kschedule) @@ -1056,6 +1131,7 @@ swcr_freesession(device_t dev, crypto_session_t cses) case CRYPTO_SHA2_512_HMAC: case CRYPTO_RIPEMD160_HMAC: case CRYPTO_NULL_HMAC: + case CRYPTO_AES_CCM_CBC_MAC: axf = swd->sw_axf; if (swd->sw_ictx) { @@ -1201,6 +1277,8 @@ swcr_process(device_t dev, struct cryptop *crp, int hi case CRYPTO_AES_128_NIST_GMAC: case CRYPTO_AES_192_NIST_GMAC: case CRYPTO_AES_256_NIST_GMAC: + case CRYPTO_AES_CCM_16: + case CRYPTO_AES_CCM_CBC_MAC: crp->crp_etype = swcr_authenc(crp); goto done; @@ -1291,6 +1369,8 @@ swcr_attach(device_t dev) REGISTER(CRYPTO_BLAKE2B); REGISTER(CRYPTO_BLAKE2S); REGISTER(CRYPTO_CHACHA20); + REGISTER(CRYPTO_AES_CCM_16); + REGISTER(CRYPTO_AES_CCM_CBC_MAC); REGISTER(CRYPTO_POLY1305); #undef REGISTER Modified: stable/12/sys/opencrypto/xform_aes_icm.c ============================================================================== --- stable/12/sys/opencrypto/xform_aes_icm.c Thu Mar 14 00:58:57 2019 (r345123) +++ stable/12/sys/opencrypto/xform_aes_icm.c Thu Mar 14 02:46:03 2019 (r345124) @@ -57,6 +57,7 @@ static void aes_icm_crypt(caddr_t, u_int8_t *); static void aes_icm_zerokey(u_int8_t **); static void aes_icm_reinit(caddr_t, u_int8_t *); static void aes_gcm_reinit(caddr_t, u_int8_t *); +static void aes_ccm_reinit(caddr_t, u_int8_t *); /* Encryption instances */ struct enc_xform enc_xform_aes_icm = { @@ -79,6 +80,18 @@ struct enc_xform enc_xform_aes_nist_gcm = { aes_gcm_reinit, }; +struct enc_xform enc_xform_ccm = { + .type = CRYPTO_AES_CCM_16, + .name = "AES-CCM", + .blocksize = AES_ICM_BLOCK_LEN, .ivsize = AES_CCM_IV_LEN, + .minkey = AES_MIN_KEY, .maxkey = AES_MAX_KEY, + .encrypt = aes_icm_crypt, + .decrypt = aes_icm_crypt, + .setkey = aes_icm_setkey, + .zerokey = aes_icm_zerokey, + .reinit = aes_ccm_reinit, +}; + /* * Encryption wrapper routines. */ @@ -102,6 +115,21 @@ aes_gcm_reinit(caddr_t key, u_int8_t *iv) /* GCM starts with 2 as counter 1 is used for final xor of tag. */ bzero(&ctx->ac_block[AESICM_BLOCKSIZE - 4], 4); ctx->ac_block[AESICM_BLOCKSIZE - 1] = 2; +} + +static void +aes_ccm_reinit(caddr_t key, u_int8_t *iv) +{ + struct aes_icm_ctx *ctx; + + ctx = (struct aes_icm_ctx*)key; + + /* CCM has flags, then the IV, then the counter, which starts at 1 */ + bzero(ctx->ac_block, sizeof(ctx->ac_block)); + /* 3 bytes for length field; this gives a nonce of 12 bytes */ + ctx->ac_block[0] = (15 - AES_CCM_IV_LEN) - 1; + bcopy(iv, ctx->ac_block+1, AES_CCM_IV_LEN); + ctx->ac_block[AESICM_BLOCKSIZE - 1] = 1; } static void Modified: stable/12/sys/opencrypto/xform_auth.h ============================================================================== --- stable/12/sys/opencrypto/xform_auth.h Thu Mar 14 00:58:57 2019 (r345123) +++ stable/12/sys/opencrypto/xform_auth.h Thu Mar 14 02:46:03 2019 (r345124) @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -85,6 +86,9 @@ extern struct auth_hash auth_hash_nist_gmac_aes_256; extern struct auth_hash auth_hash_blake2b; extern struct auth_hash auth_hash_blake2s; extern struct auth_hash auth_hash_poly1305; +extern struct auth_hash auth_hash_ccm_cbc_mac_128; +extern struct auth_hash auth_hash_ccm_cbc_mac_192; +extern struct auth_hash auth_hash_ccm_cbc_mac_256; union authctx { MD5_CTX md5ctx; @@ -95,6 +99,7 @@ union authctx { SHA384_CTX sha384ctx; SHA512_CTX sha512ctx; struct aes_gmac_ctx aes_gmac_ctx; + struct aes_cbc_mac_ctx aes_cbc_mac_ctx; }; #endif /* _CRYPTO_XFORM_AUTH_H_ */ Copied: stable/12/sys/opencrypto/xform_cbc_mac.c (from r344140, head/sys/opencrypto/xform_cbc_mac.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/opencrypto/xform_cbc_mac.c Thu Mar 14 02:46:03 2019 (r345124, copy of r344140, head/sys/opencrypto/xform_cbc_mac.c) @@ -0,0 +1,55 @@ +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +/* Authentication instances */ +struct auth_hash auth_hash_ccm_cbc_mac_128 = { + .type = CRYPTO_AES_CCM_CBC_MAC, + .name = "CBC-CCM-AES-128", + .keysize = AES_128_CBC_MAC_KEY_LEN, + .hashsize = AES_CBC_MAC_HASH_LEN, + .ctxsize = sizeof(struct aes_cbc_mac_ctx), + .blocksize = CCM_CBC_BLOCK_LEN, + .Init = (void (*)(void *)) AES_CBC_MAC_Init, + .Setkey = + (void (*)(void *, const u_int8_t *, u_int16_t))AES_CBC_MAC_Setkey, + .Reinit = + (void (*)(void *, const u_int8_t *, u_int16_t)) AES_CBC_MAC_Reinit, + .Update = + (int (*)(void *, const u_int8_t *, u_int16_t)) AES_CBC_MAC_Update, + .Final = (void (*)(u_int8_t *, void *)) AES_CBC_MAC_Final, +}; +struct auth_hash auth_hash_ccm_cbc_mac_192 = { + .type = CRYPTO_AES_CCM_CBC_MAC, + .name = "CBC-CCM-AES-192", + .keysize = AES_192_CBC_MAC_KEY_LEN, + .hashsize = AES_CBC_MAC_HASH_LEN, + .ctxsize = sizeof(struct aes_cbc_mac_ctx), + .blocksize = CCM_CBC_BLOCK_LEN, + .Init = (void (*)(void *)) AES_CBC_MAC_Init, + .Setkey = + (void (*)(void *, const u_int8_t *, u_int16_t)) AES_CBC_MAC_Setkey, + .Reinit = + (void (*)(void *, const u_int8_t *, u_int16_t)) AES_CBC_MAC_Reinit, + .Update = + (int (*)(void *, const u_int8_t *, u_int16_t)) AES_CBC_MAC_Update, + .Final = (void (*)(u_int8_t *, void *)) AES_CBC_MAC_Final, +}; +struct auth_hash auth_hash_ccm_cbc_mac_256 = { + .type = CRYPTO_AES_CCM_CBC_MAC, + .name = "CBC-CCM-AES-256", + .keysize = AES_256_CBC_MAC_KEY_LEN, + .hashsize = AES_CBC_MAC_HASH_LEN, + .ctxsize = sizeof(struct aes_cbc_mac_ctx), + .blocksize = CCM_CBC_BLOCK_LEN, + .Init = (void (*)(void *)) AES_CBC_MAC_Init, + .Setkey = + (void (*)(void *, const u_int8_t *, u_int16_t)) AES_CBC_MAC_Setkey, + .Reinit = + (void (*)(void *, const u_int8_t *, u_int16_t)) AES_CBC_MAC_Reinit, + .Update = + (int (*)(void *, const u_int8_t *, u_int16_t)) AES_CBC_MAC_Update, + .Final = (void (*)(u_int8_t *, void *)) AES_CBC_MAC_Final, +}; Modified: stable/12/sys/opencrypto/xform_enc.h ============================================================================== --- stable/12/sys/opencrypto/xform_enc.h Thu Mar 14 00:58:57 2019 (r345123) +++ stable/12/sys/opencrypto/xform_enc.h Thu Mar 14 02:46:03 2019 (r345124) @@ -84,6 +84,7 @@ extern struct enc_xform enc_xform_aes_xts; extern struct enc_xform enc_xform_arc4; extern struct enc_xform enc_xform_camellia; extern struct enc_xform enc_xform_chacha20; +extern struct enc_xform enc_xform_ccm; struct aes_icm_ctx { u_int32_t ac_ek[4*(RIJNDAEL_MAXNR + 1)]; Modified: stable/12/tools/tools/crypto/cryptocheck.c ============================================================================== --- stable/12/tools/tools/crypto/cryptocheck.c Thu Mar 14 00:58:57 2019 (r345123) +++ stable/12/tools/tools/crypto/cryptocheck.c Thu Mar 14 02:46:03 2019 (r345124) @@ -105,6 +105,9 @@ * aes-gcm 128-bit aes gcm * aes-gcm192 192-bit aes gcm * aes-gcm256 256-bit aes gcm + * aes-ccm 128-bit aes ccm + * aes-ccm192 192-bit aes ccm + * aes-ccm256 256-bit aes ccm */ #include @@ -131,7 +134,7 @@ struct alg { const char *name; int cipher; int mac; - enum { T_HASH, T_HMAC, T_BLKCIPHER, T_AUTHENC, T_GCM } type; + enum { T_HASH, T_HMAC, T_BLKCIPHER, T_AUTHENC, T_GCM, T_CCM } type; const EVP_CIPHER *(*evp_cipher)(void); const EVP_MD *(*evp_md)(void); } algs[] = { @@ -186,6 +189,15 @@ struct alg { { .name = "aes-gcm256", .cipher = CRYPTO_AES_NIST_GCM_16, .mac = CRYPTO_AES_256_NIST_GMAC, .type = T_GCM, .evp_cipher = EVP_aes_256_gcm }, + { .name = "aes-ccm", .cipher = CRYPTO_AES_CCM_16, + .mac = CRYPTO_AES_CCM_CBC_MAC, .type = T_CCM, + .evp_cipher = EVP_aes_128_ccm }, + { .name = "aes-ccm192", .cipher = CRYPTO_AES_CCM_16, + .mac = CRYPTO_AES_CCM_CBC_MAC, .type = T_CCM, + .evp_cipher = EVP_aes_192_ccm }, + { .name = "aes-ccm256", .cipher = CRYPTO_AES_CCM_16, + .mac = CRYPTO_AES_CCM_CBC_MAC, .type = T_CCM, + .evp_cipher = EVP_aes_256_ccm }, }; static bool verbose; @@ -1159,6 +1171,217 @@ out: } static void +openssl_ccm_encrypt(struct alg *alg, const EVP_CIPHER *cipher, const char *key, + const char *iv, size_t iv_len, const char *aad, size_t aad_len, + const char *input, char *output, size_t size, char *tag) +{ + EVP_CIPHER_CTX *ctx; + int outl, total; + + ctx = EVP_CIPHER_CTX_new(); + if (ctx == NULL) + errx(1, "OpenSSL %s (%zu) ctx new failed: %s", alg->name, + size, ERR_error_string(ERR_get_error(), NULL)); + if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) + errx(1, "OpenSSL %s (%zu) ctx init failed: %s", alg->name, + size, ERR_error_string(ERR_get_error(), NULL)); + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_SET_IVLEN, iv_len, NULL) != 1) + errx(1, "OpenSSL %s (%zu) setting iv length failed: %s", alg->name, + size, ERR_error_string(ERR_get_error(), NULL)); + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_SET_TAG, AES_CBC_MAC_HASH_LEN, NULL) != 1) + errx(1, "OpenSSL %s (%zu) setting tag length failed: %s", alg->name, + size, ERR_error_string(ERR_get_error(), NULL)); + if (EVP_EncryptInit_ex(ctx, NULL, NULL, (const u_char *)key, + (const u_char *)iv) != 1) + errx(1, "OpenSSL %s (%zu) ctx init failed: %s", alg->name, + size, ERR_error_string(ERR_get_error(), NULL)); + if (EVP_EncryptUpdate(ctx, NULL, &outl, NULL, size) != 1) + errx(1, "OpenSSL %s (%zu) unable to set data length: %s", alg->name, + size, ERR_error_string(ERR_get_error(), NULL)); + + if (aad != NULL) { + if (EVP_EncryptUpdate(ctx, NULL, &outl, (const u_char *)aad, + aad_len) != 1) + errx(1, "OpenSSL %s (%zu) aad update failed: %s", + alg->name, size, + ERR_error_string(ERR_get_error(), NULL)); + } + if (EVP_EncryptUpdate(ctx, (u_char *)output, &outl, + (const u_char *)input, size) != 1) + errx(1, "OpenSSL %s (%zu) encrypt update failed: %s", alg->name, + size, ERR_error_string(ERR_get_error(), NULL)); + total = outl; + if (EVP_EncryptFinal_ex(ctx, (u_char *)output + outl, &outl) != 1) + errx(1, "OpenSSL %s (%zu) encrypt final failed: %s", alg->name, + size, ERR_error_string(ERR_get_error(), NULL)); + total += outl; + if (total != size) + errx(1, "OpenSSL %s (%zu) encrypt size mismatch: %d", alg->name, + size, total); + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_GET_TAG, AES_CBC_MAC_HASH_LEN, + tag) != 1) + errx(1, "OpenSSL %s (%zu) get tag failed: %s", alg->name, + size, ERR_error_string(ERR_get_error(), NULL)); + EVP_CIPHER_CTX_free(ctx); +} + +static bool +ocf_ccm(struct alg *alg, const char *key, size_t key_len, const char *iv, + size_t iv_len, const char *aad, size_t aad_len, const char *input, + char *output, size_t size, char *tag, int enc, int *cridp) +{ + struct session2_op sop; + struct crypt_aead caead; + int fd; + bool rv; + + memset(&sop, 0, sizeof(sop)); + memset(&caead, 0, sizeof(caead)); + sop.crid = crid; + sop.keylen = key_len; + sop.key = (char *)key; + sop.cipher = alg->cipher; + sop.mackeylen = key_len; + sop.mackey = (char *)key; + sop.mac = alg->mac; + fd = crget(); + if (ioctl(fd, CIOCGSESSION2, &sop) < 0) { + warn("cryptodev %s not supported for device %s", + alg->name, crfind(crid)); + close(fd); + return (false); + } + + caead.ses = sop.ses; + caead.op = enc ? COP_ENCRYPT : COP_DECRYPT; + caead.len = size; + caead.aadlen = aad_len; + caead.ivlen = iv_len; + caead.src = (char *)input; + caead.dst = output; + caead.aad = (char *)aad; + caead.tag = tag; + caead.iv = (char *)iv; + + if (ioctl(fd, CIOCCRYPTAEAD, &caead) < 0) { + warn("cryptodev %s (%zu) failed for device %s", + alg->name, size, crfind(crid)); + rv = false; + } else + rv = true; + + if (ioctl(fd, CIOCFSESSION, &sop.ses) < 0) + warn("ioctl(CIOCFSESSION)"); + + close(fd); + *cridp = sop.crid; + return (rv); +} + +static void +run_ccm_test(struct alg *alg, size_t size) +{ + const EVP_CIPHER *cipher; + char *aad, *buffer, *cleartext, *ciphertext; + char *iv, *key; + u_int iv_len, key_len; + int crid; + char control_tag[AES_CBC_MAC_HASH_LEN], test_tag[AES_CBC_MAC_HASH_LEN]; + + cipher = alg->evp_cipher(); + if (size % EVP_CIPHER_block_size(cipher) != 0) { + if (verbose) + printf( + "%s (%zu): invalid buffer size (block size %d)\n", + alg->name, size, EVP_CIPHER_block_size(cipher)); + return; + } + + memset(control_tag, 0x3c, sizeof(control_tag)); + memset(test_tag, 0x3c, sizeof(test_tag)); + + /* + * We only have one algorithm constant for CBC-MAC; however, the + * alg structure uses the different openssl types, which gives us + * the key length. We need that for the OCF code. + */ + key_len = EVP_CIPHER_key_length(cipher); + + /* + * AES-CCM can have varying IV lengths; however, for the moment + * we only support AES_CCM_IV_LEN (12). So if the sizes are + * different, we'll fail. + */ + iv_len = EVP_CIPHER_iv_length(cipher); + if (iv_len != AES_CCM_IV_LEN) { + if (verbose) + printf("OpenSSL CCM IV length (%d) != AES_CCM_IV_LEN", + iv_len); + return; + } + + key = alloc_buffer(key_len); + iv = generate_iv(iv_len, alg); + cleartext = alloc_buffer(size); + buffer = malloc(size); + ciphertext = malloc(size); + if (aad_len != 0) + aad = alloc_buffer(aad_len); + else + aad = NULL; + + /* OpenSSL encrypt */ + openssl_ccm_encrypt(alg, cipher, key, iv, iv_len, aad, aad_len, cleartext, + ciphertext, size, control_tag); + + /* OCF encrypt */ + if (!ocf_ccm(alg, key, key_len, iv, iv_len, aad, aad_len, cleartext, + buffer, size, test_tag, 1, &crid)) + goto out; + if (memcmp(ciphertext, buffer, size) != 0) { + printf("%s (%zu) encryption mismatch:\n", alg->name, size); + printf("control:\n"); + hexdump(ciphertext, size, NULL, 0); + printf("test (cryptodev device %s):\n", crfind(crid)); + hexdump(buffer, size, NULL, 0); + goto out; + } + if (memcmp(control_tag, test_tag, sizeof(control_tag)) != 0) { + printf("%s (%zu) enc tag mismatch:\n", alg->name, size); + printf("control:\n"); + hexdump(control_tag, sizeof(control_tag), NULL, 0); + printf("test (cryptodev device %s):\n", crfind(crid)); + hexdump(test_tag, sizeof(test_tag), NULL, 0); + goto out; + } + + /* OCF decrypt */ + if (!ocf_ccm(alg, key, key_len, iv, iv_len, aad, aad_len, ciphertext, + buffer, size, control_tag, 0, &crid)) + goto out; + if (memcmp(cleartext, buffer, size) != 0) { + printf("%s (%zu) decryption mismatch:\n", alg->name, size); + printf("control:\n"); + hexdump(cleartext, size, NULL, 0); + printf("test (cryptodev device %s):\n", crfind(crid)); + hexdump(buffer, size, NULL, 0); + goto out; + } + + if (verbose) + printf("%s (%zu) matched (cryptodev device %s)\n", + alg->name, size, crfind(crid)); + +out: + free(aad); + free(ciphertext); + free(buffer); + free(cleartext); + free(iv); + free(key); +} + +static void run_test(struct alg *alg, size_t size) { @@ -1178,6 +1401,9 @@ run_test(struct alg *alg, size_t size) case T_GCM: run_gcm_test(alg, size); break; + case T_CCM: + run_ccm_test(alg, size); + break; } } @@ -1247,7 +1473,8 @@ run_aead_tests(size_t *sizes, u_int nsizes) u_int i; for (i = 0; i < nitems(algs); i++) - if (algs[i].type == T_GCM) + if (algs[i].type == T_GCM || + algs[i].type == T_CCM) run_test_sizes(&algs[i], sizes, nsizes); } From owner-svn-src-all@freebsd.org Thu Mar 14 08:25:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59076153603D; Thu, 14 Mar 2019 08:25:29 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EC22B6B261; Thu, 14 Mar 2019 08:25:28 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DDE4D1FB6B; Thu, 14 Mar 2019 08:25:28 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2E8PS0R016587; Thu, 14 Mar 2019 08:25:28 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2E8PSCW016585; Thu, 14 Mar 2019 08:25:28 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201903140825.x2E8PSCW016585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 14 Mar 2019 08:25:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345125 - in stable/12/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in stable/12/sys: amd64/amd64 i386/i386 X-SVN-Commit-Revision: 345125 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EC22B6B261 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 08:25:29 -0000 Author: ae Date: Thu Mar 14 08:25:28 2019 New Revision: 345125 URL: https://svnweb.freebsd.org/changeset/base/345125 Log: MFC r344873: Fix typo. Modified: stable/12/sys/amd64/amd64/vm_machdep.c stable/12/sys/i386/i386/vm_machdep.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/vm_machdep.c ============================================================================== --- stable/12/sys/amd64/amd64/vm_machdep.c Thu Mar 14 02:46:03 2019 (r345124) +++ stable/12/sys/amd64/amd64/vm_machdep.c Thu Mar 14 08:25:28 2019 (r345125) @@ -86,7 +86,7 @@ _Static_assert(OFFSETOF_CURTHREAD == offsetof(struct p _Static_assert(OFFSETOF_CURPCB == offsetof(struct pcpu, pc_curpcb), "OFFSETOF_CURPCB does not correspond with offset of pc_curpcb."); _Static_assert(OFFSETOF_MONITORBUF == offsetof(struct pcpu, pc_monitorbuf), - "OFFSETOF_MONINORBUF does not correspond with offset of pc_monitorbuf."); + "OFFSETOF_MONITORBUF does not correspond with offset of pc_monitorbuf."); struct savefpu * get_pcb_user_save_td(struct thread *td) Modified: stable/12/sys/i386/i386/vm_machdep.c ============================================================================== --- stable/12/sys/i386/i386/vm_machdep.c Thu Mar 14 02:46:03 2019 (r345124) +++ stable/12/sys/i386/i386/vm_machdep.c Thu Mar 14 08:25:28 2019 (r345125) @@ -95,7 +95,7 @@ _Static_assert(OFFSETOF_CURTHREAD == offsetof(struct p _Static_assert(OFFSETOF_CURPCB == offsetof(struct pcpu, pc_curpcb), "OFFSETOF_CURPCB does not correspond with offset of pc_curpcb."); _Static_assert(__OFFSETOF_MONITORBUF == offsetof(struct pcpu, pc_monitorbuf), - "__OFFSETOF_MONINORBUF does not correspond with offset of pc_monitorbuf."); + "__OFFSETOF_MONITORBUF does not correspond with offset of pc_monitorbuf."); union savefpu * get_pcb_user_save_td(struct thread *td) From owner-svn-src-all@freebsd.org Thu Mar 14 08:27:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3559153614C; Thu, 14 Mar 2019 08:27:02 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5207F6B455; Thu, 14 Mar 2019 08:27:02 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 41DF21FB71; Thu, 14 Mar 2019 08:27:02 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2E8R231016703; Thu, 14 Mar 2019 08:27:02 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2E8R1b2016702; Thu, 14 Mar 2019 08:27:01 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201903140827.x2E8R1b2016702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 14 Mar 2019 08:27:01 +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: r345126 - in stable/11/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in stable/11/sys: amd64/amd64 i386/i386 X-SVN-Commit-Revision: 345126 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5207F6B455 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 08:27:03 -0000 Author: ae Date: Thu Mar 14 08:27:01 2019 New Revision: 345126 URL: https://svnweb.freebsd.org/changeset/base/345126 Log: MFC r344873: Fix typo. Modified: stable/11/sys/amd64/amd64/vm_machdep.c stable/11/sys/i386/i386/vm_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/vm_machdep.c ============================================================================== --- stable/11/sys/amd64/amd64/vm_machdep.c Thu Mar 14 08:25:28 2019 (r345125) +++ stable/11/sys/amd64/amd64/vm_machdep.c Thu Mar 14 08:27:01 2019 (r345126) @@ -85,7 +85,7 @@ _Static_assert(OFFSETOF_CURTHREAD == offsetof(struct p _Static_assert(OFFSETOF_CURPCB == offsetof(struct pcpu, pc_curpcb), "OFFSETOF_CURPCB does not correspond with offset of pc_curpcb."); _Static_assert(OFFSETOF_MONITORBUF == offsetof(struct pcpu, pc_monitorbuf), - "OFFSETOF_MONINORBUF does not correspond with offset of pc_monitorbuf."); + "OFFSETOF_MONITORBUF does not correspond with offset of pc_monitorbuf."); struct savefpu * get_pcb_user_save_td(struct thread *td) Modified: stable/11/sys/i386/i386/vm_machdep.c ============================================================================== --- stable/11/sys/i386/i386/vm_machdep.c Thu Mar 14 08:25:28 2019 (r345125) +++ stable/11/sys/i386/i386/vm_machdep.c Thu Mar 14 08:27:01 2019 (r345126) @@ -98,7 +98,7 @@ _Static_assert(OFFSETOF_CURTHREAD == offsetof(struct p _Static_assert(OFFSETOF_CURPCB == offsetof(struct pcpu, pc_curpcb), "OFFSETOF_CURPCB does not correspond with offset of pc_curpcb."); _Static_assert(__OFFSETOF_MONITORBUF == offsetof(struct pcpu, pc_monitorbuf), - "__OFFSETOF_MONINORBUF does not correspond with offset of pc_monitorbuf."); + "__OFFSETOF_MONITORBUF does not correspond with offset of pc_monitorbuf."); union savefpu * get_pcb_user_save_td(struct thread *td) From owner-svn-src-all@freebsd.org Thu Mar 14 09:18:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C92F1539277; Thu, 14 Mar 2019 09:18:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D637A6DBC0; Thu, 14 Mar 2019 09:18:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C8FD4204BB; Thu, 14 Mar 2019 09:18:54 +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 x2E9Issg043273; Thu, 14 Mar 2019 09:18:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2E9Is4Y043272; Thu, 14 Mar 2019 09:18:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903140918.x2E9Is4Y043272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 14 Mar 2019 09:18:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345127 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 345127 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D637A6DBC0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 09:18:55 -0000 Author: hselasky Date: Thu Mar 14 09:18:54 2019 New Revision: 345127 URL: https://svnweb.freebsd.org/changeset/base/345127 Log: Revert r345102 until the DRM next port issues are resolved. Requested by: Johannes Lundberg MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kernel.h Thu Mar 14 08:27:01 2019 (r345126) +++ head/sys/compat/linuxkpi/common/include/linux/kernel.h Thu Mar 14 09:18:54 2019 (r345127) @@ -130,11 +130,9 @@ #define ALIGN(x, y) roundup2((x), (y)) #undef PTR_ALIGN #define PTR_ALIGN(p, a) ((__typeof(p))ALIGN((uintptr_t)(p), (a))) -#define IS_ALIGNED(x, a) (((x) & ((__typeof(x))(a) - 1)) == 0) #define DIV_ROUND_UP(x, n) howmany(x, n) #define __KERNEL_DIV_ROUND_UP(x, n) howmany(x, n) #define DIV_ROUND_UP_ULL(x, n) DIV_ROUND_UP((unsigned long long)(x), (n)) -#define DIV_ROUND_DOWN_ULL(x, n) (((unsigned long long)(x) / (n)) * (n)) #define FIELD_SIZEOF(t, f) sizeof(((t *)0)->f) #define printk(...) printf(__VA_ARGS__) From owner-svn-src-all@freebsd.org Thu Mar 14 10:03:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8C54153BA07; Thu, 14 Mar 2019 10:03:05 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B3D26FD9A; Thu, 14 Mar 2019 10:03:05 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4DDC520E0E; Thu, 14 Mar 2019 10:03:05 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EA35VD068952; Thu, 14 Mar 2019 10:03:05 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EA340p068950; Thu, 14 Mar 2019 10:03:04 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201903141003.x2EA340p068950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 14 Mar 2019 10:03:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345128 - in stable/12: sbin/camcontrol stand/libsa/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: smh X-SVN-Commit-Paths: in stable/12: sbin/camcontrol stand/libsa/zfs X-SVN-Commit-Revision: 345128 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5B3D26FD9A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 10:03:06 -0000 Author: smh Date: Thu Mar 14 10:03:04 2019 New Revision: 345128 URL: https://svnweb.freebsd.org/changeset/base/345128 Log: MFC r344701: Fix incorrect / unused sector_count for identify requests Fix unused sector_count for identify requests from camcontrol by changing to zero which is a more appropriate value when the parameter is unused. Sponsored by: Multiplay Modified: stable/12/sbin/camcontrol/camcontrol.c stable/12/stand/libsa/zfs/zfsimpl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/12/sbin/camcontrol/camcontrol.c Thu Mar 14 09:18:54 2019 (r345127) +++ stable/12/sbin/camcontrol/camcontrol.c Thu Mar 14 10:03:04 2019 (r345128) @@ -2292,7 +2292,7 @@ ata_do_identify(struct cam_device *device, int retry_c /*command*/command, /*features*/0, /*lba*/0, - /*sector_count*/(u_int8_t)sizeof(struct ata_params), + /*sector_count*/0, /*data_ptr*/(u_int8_t *)ptr, /*dxfer_len*/sizeof(struct ata_params), /*timeout*/timeout ? timeout : 30 * 1000, @@ -2312,8 +2312,7 @@ ata_do_identify(struct cam_device *device, int retry_c /*command*/retry_command, /*features*/0, /*lba*/0, - /*sector_count*/(u_int8_t) - sizeof(struct ata_params), + /*sector_count*/0, /*data_ptr*/(u_int8_t *)ptr, /*dxfer_len*/sizeof(struct ata_params), /*timeout*/timeout ? timeout : 30 * 1000, Modified: stable/12/stand/libsa/zfs/zfsimpl.c ============================================================================== --- stable/12/stand/libsa/zfs/zfsimpl.c Thu Mar 14 09:18:54 2019 (r345127) +++ stable/12/stand/libsa/zfs/zfsimpl.c Thu Mar 14 10:03:04 2019 (r345128) @@ -2076,6 +2076,7 @@ zfs_mount_dataset(const spa_t *spa, uint64_t objnum, o { dnode_phys_t dataset; dsl_dataset_phys_t *ds; + int err; if (objset_get_dnode(spa, &spa->spa_mos, objnum, &dataset)) { printf("ZFS: can't find dataset %ju\n", (uintmax_t)objnum); @@ -2083,9 +2084,9 @@ zfs_mount_dataset(const spa_t *spa, uint64_t objnum, o } ds = (dsl_dataset_phys_t *) &dataset.dn_bonus; - if (zio_read(spa, &ds->ds_bp, objset)) { - printf("ZFS: can't read object set for dataset %ju\n", - (uintmax_t)objnum); + if ((err = zio_read(spa, &ds->ds_bp, objset)) != 0) { + printf("ZFS: can't read object set for dataset %ju (error %d)\n", + (uintmax_t)objnum, err); return (EIO); } From owner-svn-src-all@freebsd.org Thu Mar 14 10:06:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31400153BD7C; Thu, 14 Mar 2019 10:06:47 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C609270042; Thu, 14 Mar 2019 10:06:46 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B617220E18; Thu, 14 Mar 2019 10:06:46 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EA6kIX069176; Thu, 14 Mar 2019 10:06:46 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EA6kAd069175; Thu, 14 Mar 2019 10:06:46 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201903141006.x2EA6kAd069175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 14 Mar 2019 10:06:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345129 - stable/12/stand/libsa/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: smh X-SVN-Commit-Paths: stable/12/stand/libsa/zfs X-SVN-Commit-Revision: 345129 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C609270042 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.945,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 10:06:47 -0000 Author: smh Date: Thu Mar 14 10:06:46 2019 New Revision: 345129 URL: https://svnweb.freebsd.org/changeset/base/345129 Log: Revert zfsimpl.c accidentally committed in r345128 Revert an unrelated change to zfsimpl.c accidentally committed in r345128. Sponsored by: Multiplay Modified: stable/12/stand/libsa/zfs/zfsimpl.c Modified: stable/12/stand/libsa/zfs/zfsimpl.c ============================================================================== --- stable/12/stand/libsa/zfs/zfsimpl.c Thu Mar 14 10:03:04 2019 (r345128) +++ stable/12/stand/libsa/zfs/zfsimpl.c Thu Mar 14 10:06:46 2019 (r345129) @@ -2076,7 +2076,6 @@ zfs_mount_dataset(const spa_t *spa, uint64_t objnum, o { dnode_phys_t dataset; dsl_dataset_phys_t *ds; - int err; if (objset_get_dnode(spa, &spa->spa_mos, objnum, &dataset)) { printf("ZFS: can't find dataset %ju\n", (uintmax_t)objnum); @@ -2084,9 +2083,9 @@ zfs_mount_dataset(const spa_t *spa, uint64_t objnum, o } ds = (dsl_dataset_phys_t *) &dataset.dn_bonus; - if ((err = zio_read(spa, &ds->ds_bp, objset)) != 0) { - printf("ZFS: can't read object set for dataset %ju (error %d)\n", - (uintmax_t)objnum, err); + if (zio_read(spa, &ds->ds_bp, objset)) { + printf("ZFS: can't read object set for dataset %ju\n", + (uintmax_t)objnum); return (EIO); } From owner-svn-src-all@freebsd.org Thu Mar 14 11:07:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85820153D98D; Thu, 14 Mar 2019 11:07:54 +0000 (UTC) (envelope-from johalun@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0938B71FF8; Thu, 14 Mar 2019 11:07:54 +0000 (UTC) (envelope-from johalun@FreeBSD.org) Received: from [192.168.1.33] (unknown [81.174.250.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: johalun) by smtp.freebsd.org (Postfix) with ESMTPSA id 3A41711620; Thu, 14 Mar 2019 11:07:53 +0000 (UTC) (envelope-from johalun@FreeBSD.org) Subject: Re: svn commit: r345103 - head/sys/compat/linuxkpi/common/include/linux To: John Baldwin Cc: cem@freebsd.org, Hans Petter Selasky , src-committers , svn-src-all , svn-src-head References: <201903131915.x2DJFbRk002502@repo.freebsd.org> From: Johannes Lundberg Openpgp: preference=signencrypt Autocrypt: addr=johalun0@gmail.com; keydata= mQINBFxFmoIBEADoFO5jY+Fmsg44KiZjufEmpEf4kt7nCOfxNG9SruWpoXUaq0B296F+fIZC hNZqv1v7lGTsfoWRusxJmLd5CQgHHxEyruZbbPpNsQ/JKoDY3GGmrmWfN/SX3y0t0kdB9HsW mJcvZhK7we52f4gxddIVBS9nQoVoONX+hzXf8zwOAa0ik0EPgEwpIKS4j9lLq4bU+mqVKdRR bPeDujEA/qbsCKhaFJkPzXZtzEe6srq4RK1doEztwnKz02b+8gs642TRkWDQeTRZputrAaoN Un4R76A1QpXWyrFG1dQu48IGHi3KbkrvNyq6R1aUBIA0+CG1npIbxmc2mtSjoyvdipmDRbBD +mhECIxmYfBT6818zuj91XjrfOyfVdV2BryBvqFkJLkS3N3QElBIiVdDgdrqiNFWiOlDMxNI tdP16oQBNo8IB27/0YHpnQEw1MafZv5gG5DO0zLtLy88ASAfL7BYf90JP19rT4JIwnxsXxyv kEJnzhsXf0QVObEiAu1MqeFyWfZ8PpunmvEmJ0VChOL+v/kIx1E9cxhhzMZhqiMXfyM4zx2+ BF1FwAwJYPuJLu2B3L0uVBu+M1YvSOmKAbXPDP8PsqPjgSBTYI51MUjuuxN6jSsHDuK6G5k4 pUWR8axa+wafhd6Vz8zVwdTJZ9LdxgLLVg0kprBgccPHhPAZVQARAQABtCZKb2hhbm5lcyBM dW5kYmVyZyA8am9oYWx1bjBAZ21haWwuY29tPokCVAQTAQgAPhYhBIl1Pb3+hI60ivmRSULn yG4BGvSeBQJcRZqCAhsjBQkJZgGABQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEELnyG4B GvSe9O0P/RzeQAu1R37RlONZTXNn+qIAHvHbZEhzrCibzaZnwYdC31wGrYmXNDyiQIqOngFf QJuufQtH/+95OESJsjR+42L/pNfFdaEWxiI003qE7uCMzLK5UWUXd/5d5vYY0CaPyNCj1tyM ZIq7x4CaR3QLTh/Fw4zMUI/ZPH2S5SxVFGv0ZZFAdNYILD3qCkAS/9HmXsqufBWbfutA8TTf wyJfywmvf7ENjlZ4QOjb242ZY9NndqbmqTgWVAws+PN5e9AT8HkadscCTCSkYnxJyYG2El27 DpAAkekYplb/C0j82KSz2fy9RgwD+tTqt88DJOeFbIbrYt44u7KLHpzaZeqyUtn0reHCkE0W lnKH2kXXbuswFB4sONxI/J5+qSmOsAm5ItO3voyjm/swpmFR1yBlxo4th26gbO5NfBOK9YsY zHKgiRDv6ZdnHo+htphRxcCDHsFPzkQe5jouI25dvMZYl1LaTS/09lwYVwVIB2SFmMtFZ7rB N4NBSzPlpsg+g4dJNqiw6Rfa2Q/wUv+MzTJgLtHjDccXlpm33Nc09UytHFtNn26PO/zrM39r TwzdLu1mg0x2WWEWTIqe4CaczQU9SIg49BSyJNoPSZx3V7nMhTKbOeQKR5aV3dXI66aENw86 pa1tipuUKCPmope/GTJatUgPiD3JkyiD+7c1zQX2UAGmuQINBFxFmoIBEACb55RAkM59huAx 4Ddd8WBjsw25qf7rzxeRKAQ7or/8LvJBYQDPXZy0RhkRiu+P+MjxwGb6HVh+LDyAYDn9d8Mt ZqCP/dOGNcl7pkb6IhfRc3i5neckXCYfbm0cigiX9JkqZSt3KT96zbjCxsFZKyIyEFsMl46q 7wKWK5Irj3zxV/Z51JNTJyMLcIRWhY8G6qlMNFgZkz2Hv63w6BRekKVImOmOdThLAscy5ybq 2CIUeAwPG7lMYG9rgcPdn3tMPeWlLmUmi5pSwOQ3AKg3xFrW3WfegjRHdqpeuXoeTjYPPCW4 gyl59uv6E12a6eivItCxj67vlBXgOr4um+zoPyXG/WfidIFtWaEgyBrlGR1Klk7SIcqjEHUA FdiM+PweY4opHXXKn60NOZCqBJ59K43drOQgRouz8E2T3yEoYg40xAfY3lhJV/Vx5+kSTjmy sT2xotlPn/GzfaAEvNuJDK+Mec3LvfbbDoOWFolNyEvoMQqF5Q3A8eGqYsoVGBPxyzNvF2iY LkymxiXpgrSN0Q/LOK7pFlWwbVC8Z6g5I0J9ecgD55dGLoX2luLir787XX/JxGffzbRnP9NE ifenJGrQmx4CyEaz/CHQqSbROm5Uo/YFUX9J7OfUO4mtu90j773j32I3psey/Fz3EC/A2PHv Ghb0KsWYpS3Pj5TV1gGyswARAQABiQI8BBgBCAAmFiEEiXU9vf6EjrSK+ZFJQufIbgEa9J4F AlxFmoICGwwFCQlmAYAACgkQQufIbgEa9J7qOQ//YG/4e69YTSjtiYLXzBI8tRU2Sx+NFByx zx+C/r0EBThLtgRwCqEUZRB7iIDSO8aZ0Qa3vwWRohlD1tn/LBdDFfMmuQkNVdLIrjBoGBB9 B5xHdZJ9xnTZEwpTtk6IWolT4j+8rpGemGKKiFo3X6l02On4Qb4iM7h6rcDb76mfwooNYzB3 8PPcLvyOWb/9iCXAb5N7doo5zmOl15DVwvIF04eXU0q1FFj/iS1zNmtZ5Got82O1TQFV+de4 Rb3YA80IZhhhCiHHJqkMKeKQogRqU+UNDBARUBxfUtKsJtQzTQ2JUGwkb6X6bx53FTLP6O9q hDoODVweE1LdB1k1H5Nn+gawPdRMBqj43Y2amK7KEgoTBrwU04CLpKiaAC0S+EcJFfJcwtpK k3F+uTtP/hnhFnWbn8SgRkHKXKWqSCt63NstXhMzAJut1gEzV+CcPNKqa/sFgQaYEvzCS5Kl F/PXj0++f3TIFqT+2ZNNp8Bz8dT7gh8RPPg5oYQiCHH8K1RAmq7gKqmwyg0qgOazHnped+od X4f3qx320JAP6NP9wglDm6eht48NJzb0sffN8z34wrP66oz8oPKtS5CFV0m/384hEg0lmi3W wo2Hno7rA1etTPJX0dI6/GLlQDtNTHvKQ077HQdWVOMQVWC9j7YH7Zr9NjtOvxcNVRX3fxpJ 6CE= X-Tagtoolbar-Keys: D20190314110750797 Message-ID: <0521e2af-03ae-4642-f88c-60d8b8ede968@FreeBSD.org> Date: Thu, 14 Mar 2019 11:07:50 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Rspamd-Queue-Id: 0938B71FF8 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 11:07:54 -0000 On 3/13/19 11:39 PM, John Baldwin wrote: > On 3/13/19 1:36 PM, Conrad Meyer wrote: >> Hi, >> >> A lot of the information about PCIe devices is read by PCI probe and >> cached on the (BSD) device. You could access it out of >> device_get_ivars(bsddev)->cfg.pcie and avoid the MMIO latency. > Agreed when possible, though I'm not sure caching lnkcap is really > all that useful. > >> On Wed, Mar 13, 2019 at 12:15 PM Hans Petter Selasky >> wrote: >>> +static inline enum pci_bus_speed >>> +pcie_get_speed_cap(struct pci_dev *dev) >>> +{ >>> + device_t root; >>> + uint32_t lnkcap, lnkcap2; >>> + int error, pos; >>> + >>> + root =3D device_get_parent(dev->dev.bsddev); >>> + if (root =3D=3D NULL) >>> + return (PCI_SPEED_UNKNOWN); >>> + root =3D device_get_parent(root); >>> + if (root =3D=3D NULL) >>> + return (PCI_SPEED_UNKNOWN); >>> + root =3D device_get_parent(root); >>> + if (root =3D=3D NULL) >>> + return (PCI_SPEED_UNKNOWN); >> What is this mechanism trying to accomplish? It seems incredibly >> fragile. Looking for pci0? pcib0? > It does seem broken, or maybe that it only works for DRM drivers and no= thing else. > For non-DRM drivers, 'bsddev' is a PCI-e endpoint. You would then go u= p two layers > (pciX and pcibX) to get to the parent bridge. However, this is assumin= g a DRM layout > where it has to go drm0 -> vgapci0 -> pciX -> pcibX due to the vgapci p= seudo-driver. > As a result, this function can't possibly work on anything other than a= DRM driver. > Since it would try to use pci ivars on some PCI bus instance (or worse)= , it's likely > to cause random panics if used from a non-DRM driver. > > Furthermore, it's not at all clear to me why you can't just read lnkcap= /lnkcap2 from > the endpoint device directly vs heading up to the parent bridge though.= Hmm, I guess > it's trying to infer the capabilities of the "slot", so that's why it n= eeds the > grandparent. You will have to do something less fragile to find the gr= andparent. > The simplest way may be to walk up to the first "pcib" device you see a= nd then > stop. You will still want to see if it's a "real" PCI device by seeing= if it's > parent is a "pci" device (meaning that the "pcib" device will have vali= d PCI IVARs > and PCI config registers you can read). pci_find_pcie_root_port has so= me similar > code for this, but that function would walk too far up for what you wan= t here, so you > can't reuse it as-is. > >>> + if ((error =3D pci_find_cap(root, PCIY_EXPRESS, &pos)) !=3D 0= ) >>> + return (PCI_SPEED_UNKNOWN); >> Cached as non-zero cfg.pcie.pcie_location value in ivars. >> >>> + lnkcap2 =3D pci_read_config(root, pos + PCIER_LINK_CAP2, 4); >> This one we don't cache, unfortunately, but could. Ditto LINK_CAP >> below. Usually "pos + PCIEfoo" is spelled "pcie_read_config(..., >> PCIEfoo...)." > Yes, pcie_read_config is what you normally would use. That uses the ca= ched > pcie_location for you. > > pcie_read_config(dev->dev.bsddev, PCIER_LINK_CAP2, 2); > > But also, you should be checking the PCIe version to see if this regist= er > exists instead of reading it unconditionally. Specifically, you should= read > the version field (PCIEM_FLAGS_VERSION) from PCIER_FLAGS. LINK_CAP2 on= ly > exists if the version >=3D 2. > >>> + >>> + if (lnkcap2) { /* PCIe r3.0-compliant */ >>> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_2_5GB) >>> + return (PCIE_SPEED_2_5GT); >> Seems like these definitions would be better suited as native >> PCIEM_LINK_CAP2_foo definitions in pcireg.h > I feel less strongly about those since we have to provide the constants= > anyway for consumers to use. > >>> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_5_0GB) >>> + return (PCIE_SPEED_5_0GT); >>> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_8_0GB) >>> + return (PCIE_SPEED_8_0GT); >>> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_16_0GB) >>> + return (PCIE_SPEED_16_0GT); >>> + } else { /* pre-r3.0 */ >>> + lnkcap =3D pci_read_config(root, pos + PCIER_LINK_CAP= , 4); >>> + if (lnkcap & PCI_EXP_LNKCAP_SLS_2_5GB) >>> + return (PCIE_SPEED_2_5GT); >>> + if (lnkcap & PCI_EXP_LNKCAP_SLS_5_0GB) >>> + return (PCIE_SPEED_5_0GT); >>> + if (lnkcap & PCI_EXP_LNKCAP_SLS_8_0GB) >>> + return (PCIE_SPEED_8_0GT); >>> + if (lnkcap & PCI_EXP_LNKCAP_SLS_16_0GB) >>> + return (PCIE_SPEED_16_0GT); >>> + } >>> + return (PCI_SPEED_UNKNOWN); >>> +} >>> + >>> +static inline enum pcie_link_width >>> +pcie_get_width_cap(struct pci_dev *dev) >>> +{ >>> + uint32_t lnkcap; >>> + >>> + pcie_capability_read_dword(dev, PCI_EXP_LNKCAP, &lnkcap); >> Better spelled as PCIER_LINK_CAP. >> >>> + if (lnkcap) >>> + return ((lnkcap & PCI_EXP_LNKCAP_MLW) >> 4); >> And PCIEM_LINK_CAP_MAX_WIDTH. > Given that this is using a linuxkpi API (pcie_capability_read_dword > instead of pcie_read_config()) then the rest of this function is > written in the Linux KPI, so I think using Linux' native constants > is actually more consistent for this function. Hi Thanks for the feedback. This code used to exist in the drm driver but was moved into kernel pci code on Linux. It's more or less as it existed in the drm driver with FreeBSD patches having roots probably going back to drm2 from base. If this function won't be compatible with anything but drm drivers, we could just as well move it to linuxkpi in ports instead. I'll try to implement the suggested improvements. Keep on eye out for updates here https://reviews.freebsd.org/D19565 /Johannes From owner-svn-src-all@freebsd.org Thu Mar 14 11:45:36 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E836153ED8B; Thu, 14 Mar 2019 11:45:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 944AA736B5; Thu, 14 Mar 2019 11:45:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x2EBjTRJ041341 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 14 Mar 2019 13:45:32 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x2EBjTRJ041341 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x2EBjTJ4041335; Thu, 14 Mar 2019 13:45:29 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 14 Mar 2019 13:45:29 +0200 From: Konstantin Belousov To: Johannes Lundberg Cc: John Baldwin , cem@freebsd.org, Hans Petter Selasky , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r345103 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <20190314114529.GE2492@kib.kiev.ua> References: <201903131915.x2DJFbRk002502@repo.freebsd.org> <0521e2af-03ae-4642-f88c-60d8b8ede968@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0521e2af-03ae-4642-f88c-60d8b8ede968@FreeBSD.org> User-Agent: Mutt/1.11.3 (2019-02-01) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 11:45:36 -0000 On Thu, Mar 14, 2019 at 11:07:50AM +0000, Johannes Lundberg wrote: > > On 3/13/19 11:39 PM, John Baldwin wrote: > > On 3/13/19 1:36 PM, Conrad Meyer wrote: > >> Hi, > >> > >> A lot of the information about PCIe devices is read by PCI probe and > >> cached on the (BSD) device. You could access it out of > >> device_get_ivars(bsddev)->cfg.pcie and avoid the MMIO latency. > > Agreed when possible, though I'm not sure caching lnkcap is really > > all that useful. > > > >> On Wed, Mar 13, 2019 at 12:15 PM Hans Petter Selasky > >> wrote: > >>> +static inline enum pci_bus_speed > >>> +pcie_get_speed_cap(struct pci_dev *dev) > >>> +{ > >>> + device_t root; > >>> + uint32_t lnkcap, lnkcap2; > >>> + int error, pos; > >>> + > >>> + root = device_get_parent(dev->dev.bsddev); > >>> + if (root == NULL) > >>> + return (PCI_SPEED_UNKNOWN); > >>> + root = device_get_parent(root); > >>> + if (root == NULL) > >>> + return (PCI_SPEED_UNKNOWN); > >>> + root = device_get_parent(root); > >>> + if (root == NULL) > >>> + return (PCI_SPEED_UNKNOWN); > >> What is this mechanism trying to accomplish? It seems incredibly > >> fragile. Looking for pci0? pcib0? > > It does seem broken, or maybe that it only works for DRM drivers and nothing else. > > For non-DRM drivers, 'bsddev' is a PCI-e endpoint. You would then go up two layers > > (pciX and pcibX) to get to the parent bridge. However, this is assuming a DRM layout > > where it has to go drm0 -> vgapci0 -> pciX -> pcibX due to the vgapci pseudo-driver. > > As a result, this function can't possibly work on anything other than a DRM driver. > > Since it would try to use pci ivars on some PCI bus instance (or worse), it's likely > > to cause random panics if used from a non-DRM driver. > > > > Furthermore, it's not at all clear to me why you can't just read lnkcap/lnkcap2 from > > the endpoint device directly vs heading up to the parent bridge though. Hmm, I guess > > it's trying to infer the capabilities of the "slot", so that's why it needs the > > grandparent. You will have to do something less fragile to find the grandparent. > > The simplest way may be to walk up to the first "pcib" device you see and then > > stop. You will still want to see if it's a "real" PCI device by seeing if it's > > parent is a "pci" device (meaning that the "pcib" device will have valid PCI IVARs > > and PCI config registers you can read). pci_find_pcie_root_port has some similar > > code for this, but that function would walk too far up for what you want here, so you > > can't reuse it as-is. > > > >>> + if ((error = pci_find_cap(root, PCIY_EXPRESS, &pos)) != 0) > >>> + return (PCI_SPEED_UNKNOWN); > >> Cached as non-zero cfg.pcie.pcie_location value in ivars. > >> > >>> + lnkcap2 = pci_read_config(root, pos + PCIER_LINK_CAP2, 4); > >> This one we don't cache, unfortunately, but could. Ditto LINK_CAP > >> below. Usually "pos + PCIEfoo" is spelled "pcie_read_config(..., > >> PCIEfoo...)." > > Yes, pcie_read_config is what you normally would use. That uses the cached > > pcie_location for you. > > > > pcie_read_config(dev->dev.bsddev, PCIER_LINK_CAP2, 2); > > > > But also, you should be checking the PCIe version to see if this register > > exists instead of reading it unconditionally. Specifically, you should read > > the version field (PCIEM_FLAGS_VERSION) from PCIER_FLAGS. LINK_CAP2 only > > exists if the version >= 2. > > > >>> + > >>> + if (lnkcap2) { /* PCIe r3.0-compliant */ > >>> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_2_5GB) > >>> + return (PCIE_SPEED_2_5GT); > >> Seems like these definitions would be better suited as native > >> PCIEM_LINK_CAP2_foo definitions in pcireg.h > > I feel less strongly about those since we have to provide the constants > > anyway for consumers to use. > > > >>> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_5_0GB) > >>> + return (PCIE_SPEED_5_0GT); > >>> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_8_0GB) > >>> + return (PCIE_SPEED_8_0GT); > >>> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_16_0GB) > >>> + return (PCIE_SPEED_16_0GT); > >>> + } else { /* pre-r3.0 */ > >>> + lnkcap = pci_read_config(root, pos + PCIER_LINK_CAP, 4); > >>> + if (lnkcap & PCI_EXP_LNKCAP_SLS_2_5GB) > >>> + return (PCIE_SPEED_2_5GT); > >>> + if (lnkcap & PCI_EXP_LNKCAP_SLS_5_0GB) > >>> + return (PCIE_SPEED_5_0GT); > >>> + if (lnkcap & PCI_EXP_LNKCAP_SLS_8_0GB) > >>> + return (PCIE_SPEED_8_0GT); > >>> + if (lnkcap & PCI_EXP_LNKCAP_SLS_16_0GB) > >>> + return (PCIE_SPEED_16_0GT); > >>> + } > >>> + return (PCI_SPEED_UNKNOWN); > >>> +} > >>> + > >>> +static inline enum pcie_link_width > >>> +pcie_get_width_cap(struct pci_dev *dev) > >>> +{ > >>> + uint32_t lnkcap; > >>> + > >>> + pcie_capability_read_dword(dev, PCI_EXP_LNKCAP, &lnkcap); > >> Better spelled as PCIER_LINK_CAP. > >> > >>> + if (lnkcap) > >>> + return ((lnkcap & PCI_EXP_LNKCAP_MLW) >> 4); > >> And PCIEM_LINK_CAP_MAX_WIDTH. > > Given that this is using a linuxkpi API (pcie_capability_read_dword > > instead of pcie_read_config()) then the rest of this function is > > written in the Linux KPI, so I think using Linux' native constants > > is actually more consistent for this function. > > Hi > > Thanks for the feedback. > > This code used to exist in the drm driver but was moved into kernel pci > code on Linux. It's more or less as it existed in the drm driver with > FreeBSD patches having roots probably going back to drm2 from base. If No, I assure you that it did not appeared in drm2. > this function won't be compatible with anything but drm drivers, we > could just as well move it to linuxkpi in ports instead. It only works for GPUs which are either pseudo-PCIe devices, i.e. they represent itself as PCIe-attached devices for configuration purposes but really attached to the CPU ring directly. This is true for CPU- integrated graphics. Or for lucky circumstances where external GPU is plugged into CPU PCIe slot without any PCIe bridges. If PCIe GPU is connected through a switch (which happen quite often these days), or into the slot managed by south bridge (I believe this is theoretically possible) then the code would not work. Perhaps you want dmar_get_requester() which does exactly what you (seems) try to get for PCIe devices attached without non-PCIe bridges. > > I'll try to implement the suggested improvements. Keep on eye out for > updates here https://reviews.freebsd.org/D19565 > > /Johannes > > > > From owner-svn-src-all@freebsd.org Thu Mar 14 12:04:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6371153FD49; Thu, 14 Mar 2019 12:04:32 +0000 (UTC) (envelope-from johalun@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CB6174761; Thu, 14 Mar 2019 12:04:32 +0000 (UTC) (envelope-from johalun@FreeBSD.org) Received: from [192.168.1.33] (unknown [81.174.250.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: johalun) by smtp.freebsd.org (Postfix) with ESMTPSA id 8A70511CAC; Thu, 14 Mar 2019 12:04:31 +0000 (UTC) (envelope-from johalun@FreeBSD.org) Subject: Re: svn commit: r345103 - head/sys/compat/linuxkpi/common/include/linux To: Konstantin Belousov Cc: John Baldwin , cem@freebsd.org, Hans Petter Selasky , src-committers , svn-src-all , svn-src-head References: <201903131915.x2DJFbRk002502@repo.freebsd.org> <0521e2af-03ae-4642-f88c-60d8b8ede968@FreeBSD.org> <20190314114529.GE2492@kib.kiev.ua> From: Johannes Lundberg X-Tagtoolbar-Keys: D20190314120429942 Message-ID: <21dcbc21-e3a2-64a2-97ba-a612163ebb9d@FreeBSD.org> Date: Thu, 14 Mar 2019 12:04:30 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190314114529.GE2492@kib.kiev.ua> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 4CB6174761 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 12:04:33 -0000 On 3/14/19 11:45 AM, Konstantin Belousov wrote: > On Thu, Mar 14, 2019 at 11:07:50AM +0000, Johannes Lundberg wrote: >> On 3/13/19 11:39 PM, John Baldwin wrote: >>> On 3/13/19 1:36 PM, Conrad Meyer wrote: >>>> Hi, >>>> >>>> A lot of the information about PCIe devices is read by PCI probe and >>>> cached on the (BSD) device. You could access it out of >>>> device_get_ivars(bsddev)->cfg.pcie and avoid the MMIO latency. >>> Agreed when possible, though I'm not sure caching lnkcap is really >>> all that useful. >>> >>>> On Wed, Mar 13, 2019 at 12:15 PM Hans Petter Selasky >>>> wrote: >>>>> +static inline enum pci_bus_speed >>>>> +pcie_get_speed_cap(struct pci_dev *dev) >>>>> +{ >>>>> + device_t root; >>>>> + uint32_t lnkcap, lnkcap2; >>>>> + int error, pos; >>>>> + >>>>> + root = device_get_parent(dev->dev.bsddev); >>>>> + if (root == NULL) >>>>> + return (PCI_SPEED_UNKNOWN); >>>>> + root = device_get_parent(root); >>>>> + if (root == NULL) >>>>> + return (PCI_SPEED_UNKNOWN); >>>>> + root = device_get_parent(root); >>>>> + if (root == NULL) >>>>> + return (PCI_SPEED_UNKNOWN); >>>> What is this mechanism trying to accomplish? It seems incredibly >>>> fragile. Looking for pci0? pcib0? >>> It does seem broken, or maybe that it only works for DRM drivers and nothing else. >>> For non-DRM drivers, 'bsddev' is a PCI-e endpoint. You would then go up two layers >>> (pciX and pcibX) to get to the parent bridge. However, this is assuming a DRM layout >>> where it has to go drm0 -> vgapci0 -> pciX -> pcibX due to the vgapci pseudo-driver. >>> As a result, this function can't possibly work on anything other than a DRM driver. >>> Since it would try to use pci ivars on some PCI bus instance (or worse), it's likely >>> to cause random panics if used from a non-DRM driver. >>> >>> Furthermore, it's not at all clear to me why you can't just read lnkcap/lnkcap2 from >>> the endpoint device directly vs heading up to the parent bridge though. Hmm, I guess >>> it's trying to infer the capabilities of the "slot", so that's why it needs the >>> grandparent. You will have to do something less fragile to find the grandparent. >>> The simplest way may be to walk up to the first "pcib" device you see and then >>> stop. You will still want to see if it's a "real" PCI device by seeing if it's >>> parent is a "pci" device (meaning that the "pcib" device will have valid PCI IVARs >>> and PCI config registers you can read). pci_find_pcie_root_port has some similar >>> code for this, but that function would walk too far up for what you want here, so you >>> can't reuse it as-is. >>> >>>>> + if ((error = pci_find_cap(root, PCIY_EXPRESS, &pos)) != 0) >>>>> + return (PCI_SPEED_UNKNOWN); >>>> Cached as non-zero cfg.pcie.pcie_location value in ivars. >>>> >>>>> + lnkcap2 = pci_read_config(root, pos + PCIER_LINK_CAP2, 4); >>>> This one we don't cache, unfortunately, but could. Ditto LINK_CAP >>>> below. Usually "pos + PCIEfoo" is spelled "pcie_read_config(..., >>>> PCIEfoo...)." >>> Yes, pcie_read_config is what you normally would use. That uses the cached >>> pcie_location for you. >>> >>> pcie_read_config(dev->dev.bsddev, PCIER_LINK_CAP2, 2); >>> >>> But also, you should be checking the PCIe version to see if this register >>> exists instead of reading it unconditionally. Specifically, you should read >>> the version field (PCIEM_FLAGS_VERSION) from PCIER_FLAGS. LINK_CAP2 only >>> exists if the version >= 2. >>> >>>>> + >>>>> + if (lnkcap2) { /* PCIe r3.0-compliant */ >>>>> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_2_5GB) >>>>> + return (PCIE_SPEED_2_5GT); >>>> Seems like these definitions would be better suited as native >>>> PCIEM_LINK_CAP2_foo definitions in pcireg.h >>> I feel less strongly about those since we have to provide the constants >>> anyway for consumers to use. >>> >>>>> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_5_0GB) >>>>> + return (PCIE_SPEED_5_0GT); >>>>> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_8_0GB) >>>>> + return (PCIE_SPEED_8_0GT); >>>>> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_16_0GB) >>>>> + return (PCIE_SPEED_16_0GT); >>>>> + } else { /* pre-r3.0 */ >>>>> + lnkcap = pci_read_config(root, pos + PCIER_LINK_CAP, 4); >>>>> + if (lnkcap & PCI_EXP_LNKCAP_SLS_2_5GB) >>>>> + return (PCIE_SPEED_2_5GT); >>>>> + if (lnkcap & PCI_EXP_LNKCAP_SLS_5_0GB) >>>>> + return (PCIE_SPEED_5_0GT); >>>>> + if (lnkcap & PCI_EXP_LNKCAP_SLS_8_0GB) >>>>> + return (PCIE_SPEED_8_0GT); >>>>> + if (lnkcap & PCI_EXP_LNKCAP_SLS_16_0GB) >>>>> + return (PCIE_SPEED_16_0GT); >>>>> + } >>>>> + return (PCI_SPEED_UNKNOWN); >>>>> +} >>>>> + >>>>> +static inline enum pcie_link_width >>>>> +pcie_get_width_cap(struct pci_dev *dev) >>>>> +{ >>>>> + uint32_t lnkcap; >>>>> + >>>>> + pcie_capability_read_dword(dev, PCI_EXP_LNKCAP, &lnkcap); >>>> Better spelled as PCIER_LINK_CAP. >>>> >>>>> + if (lnkcap) >>>>> + return ((lnkcap & PCI_EXP_LNKCAP_MLW) >> 4); >>>> And PCIEM_LINK_CAP_MAX_WIDTH. >>> Given that this is using a linuxkpi API (pcie_capability_read_dword >>> instead of pcie_read_config()) then the rest of this function is >>> written in the Linux KPI, so I think using Linux' native constants >>> is actually more consistent for this function. >> Hi >> >> Thanks for the feedback. >> >> This code used to exist in the drm driver but was moved into kernel pci >> code on Linux. It's more or less as it existed in the drm driver with >> FreeBSD patches having roots probably going back to drm2 from base. If > No, I assure you that it did not appeared in drm2. For a bit of history: drm2: https://github.com/freebsd/freebsd/blob/release/12.0.0/sys/dev/drm2/drm_pci.c#L439 later drm-next: https://github.com/FreeBSDDesktop/kms-drm/blob/drm-v4.16/drivers/gpu/drm/drm_pci.c#L441 and now linuxkpi: https://github.com/freebsd/freebsd/blob/master/sys/compat/linuxkpi/common/include/linux/pci.h#L866 Upstream patch: https://patchwork.kernel.org/patch/10487273/ > >> this function won't be compatible with anything but drm drivers, we >> could just as well move it to linuxkpi in ports instead. > It only works for GPUs which are either pseudo-PCIe devices, i.e. > they represent itself as PCIe-attached devices for configuration purposes > but really attached to the CPU ring directly. This is true for CPU- > integrated graphics. Or for lucky circumstances where external > GPU is plugged into CPU PCIe slot without any PCIe bridges. > > If PCIe GPU is connected through a switch (which happen quite often > these days), or into the slot managed by south bridge (I believe this > is theoretically possible) then the code would not work. > > Perhaps you want dmar_get_requester() which does exactly what you > (seems) try to get for PCIe devices attached without non-PCIe bridges. > >> I'll try to implement the suggested improvements. Keep on eye out for >> updates here https://reviews.freebsd.org/D19565 >> >> /Johannes >> >> >> >> From owner-svn-src-all@freebsd.org Thu Mar 14 12:24:24 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10B23154032B; Thu, 14 Mar 2019 12:24:24 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2493375362; Thu, 14 Mar 2019 12:24:23 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x2ECOFCS049719 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 14 Mar 2019 14:24:18 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x2ECOFCS049719 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x2ECOExR049718; Thu, 14 Mar 2019 14:24:14 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 14 Mar 2019 14:24:14 +0200 From: Konstantin Belousov To: Johannes Lundberg Cc: John Baldwin , cem@freebsd.org, Hans Petter Selasky , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r345103 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <20190314122414.GF2492@kib.kiev.ua> References: <201903131915.x2DJFbRk002502@repo.freebsd.org> <0521e2af-03ae-4642-f88c-60d8b8ede968@FreeBSD.org> <20190314114529.GE2492@kib.kiev.ua> <21dcbc21-e3a2-64a2-97ba-a612163ebb9d@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <21dcbc21-e3a2-64a2-97ba-a612163ebb9d@FreeBSD.org> User-Agent: Mutt/1.11.3 (2019-02-01) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 12:24:24 -0000 On Thu, Mar 14, 2019 at 12:04:30PM +0000, Johannes Lundberg wrote: > > On 3/14/19 11:45 AM, Konstantin Belousov wrote: > > On Thu, Mar 14, 2019 at 11:07:50AM +0000, Johannes Lundberg wrote: > >> On 3/13/19 11:39 PM, John Baldwin wrote: > >>> On 3/13/19 1:36 PM, Conrad Meyer wrote: > >>>> Hi, > >>>> > >>>> A lot of the information about PCIe devices is read by PCI probe and > >>>> cached on the (BSD) device. You could access it out of > >>>> device_get_ivars(bsddev)->cfg.pcie and avoid the MMIO latency. > >>> Agreed when possible, though I'm not sure caching lnkcap is really > >>> all that useful. > >>> > >>>> On Wed, Mar 13, 2019 at 12:15 PM Hans Petter Selasky > >>>> wrote: > >>>>> +static inline enum pci_bus_speed > >>>>> +pcie_get_speed_cap(struct pci_dev *dev) > >>>>> +{ > >>>>> + device_t root; > >>>>> + uint32_t lnkcap, lnkcap2; > >>>>> + int error, pos; > >>>>> + > >>>>> + root = device_get_parent(dev->dev.bsddev); > >>>>> + if (root == NULL) > >>>>> + return (PCI_SPEED_UNKNOWN); > >>>>> + root = device_get_parent(root); > >>>>> + if (root == NULL) > >>>>> + return (PCI_SPEED_UNKNOWN); > >>>>> + root = device_get_parent(root); > >>>>> + if (root == NULL) > >>>>> + return (PCI_SPEED_UNKNOWN); > >>>> What is this mechanism trying to accomplish? It seems incredibly > >>>> fragile. Looking for pci0? pcib0? > >>> It does seem broken, or maybe that it only works for DRM drivers and nothing else. > >>> For non-DRM drivers, 'bsddev' is a PCI-e endpoint. You would then go up two layers > >>> (pciX and pcibX) to get to the parent bridge. However, this is assuming a DRM layout > >>> where it has to go drm0 -> vgapci0 -> pciX -> pcibX due to the vgapci pseudo-driver. > >>> As a result, this function can't possibly work on anything other than a DRM driver. > >>> Since it would try to use pci ivars on some PCI bus instance (or worse), it's likely > >>> to cause random panics if used from a non-DRM driver. > >>> > >>> Furthermore, it's not at all clear to me why you can't just read lnkcap/lnkcap2 from > >>> the endpoint device directly vs heading up to the parent bridge though. Hmm, I guess > >>> it's trying to infer the capabilities of the "slot", so that's why it needs the > >>> grandparent. You will have to do something less fragile to find the grandparent. > >>> The simplest way may be to walk up to the first "pcib" device you see and then > >>> stop. You will still want to see if it's a "real" PCI device by seeing if it's > >>> parent is a "pci" device (meaning that the "pcib" device will have valid PCI IVARs > >>> and PCI config registers you can read). pci_find_pcie_root_port has some similar > >>> code for this, but that function would walk too far up for what you want here, so you > >>> can't reuse it as-is. > >>> > >>>>> + if ((error = pci_find_cap(root, PCIY_EXPRESS, &pos)) != 0) > >>>>> + return (PCI_SPEED_UNKNOWN); > >>>> Cached as non-zero cfg.pcie.pcie_location value in ivars. > >>>> > >>>>> + lnkcap2 = pci_read_config(root, pos + PCIER_LINK_CAP2, 4); > >>>> This one we don't cache, unfortunately, but could. Ditto LINK_CAP > >>>> below. Usually "pos + PCIEfoo" is spelled "pcie_read_config(..., > >>>> PCIEfoo...)." > >>> Yes, pcie_read_config is what you normally would use. That uses the cached > >>> pcie_location for you. > >>> > >>> pcie_read_config(dev->dev.bsddev, PCIER_LINK_CAP2, 2); > >>> > >>> But also, you should be checking the PCIe version to see if this register > >>> exists instead of reading it unconditionally. Specifically, you should read > >>> the version field (PCIEM_FLAGS_VERSION) from PCIER_FLAGS. LINK_CAP2 only > >>> exists if the version >= 2. > >>> > >>>>> + > >>>>> + if (lnkcap2) { /* PCIe r3.0-compliant */ > >>>>> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_2_5GB) > >>>>> + return (PCIE_SPEED_2_5GT); > >>>> Seems like these definitions would be better suited as native > >>>> PCIEM_LINK_CAP2_foo definitions in pcireg.h > >>> I feel less strongly about those since we have to provide the constants > >>> anyway for consumers to use. > >>> > >>>>> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_5_0GB) > >>>>> + return (PCIE_SPEED_5_0GT); > >>>>> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_8_0GB) > >>>>> + return (PCIE_SPEED_8_0GT); > >>>>> + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_16_0GB) > >>>>> + return (PCIE_SPEED_16_0GT); > >>>>> + } else { /* pre-r3.0 */ > >>>>> + lnkcap = pci_read_config(root, pos + PCIER_LINK_CAP, 4); > >>>>> + if (lnkcap & PCI_EXP_LNKCAP_SLS_2_5GB) > >>>>> + return (PCIE_SPEED_2_5GT); > >>>>> + if (lnkcap & PCI_EXP_LNKCAP_SLS_5_0GB) > >>>>> + return (PCIE_SPEED_5_0GT); > >>>>> + if (lnkcap & PCI_EXP_LNKCAP_SLS_8_0GB) > >>>>> + return (PCIE_SPEED_8_0GT); > >>>>> + if (lnkcap & PCI_EXP_LNKCAP_SLS_16_0GB) > >>>>> + return (PCIE_SPEED_16_0GT); > >>>>> + } > >>>>> + return (PCI_SPEED_UNKNOWN); > >>>>> +} > >>>>> + > >>>>> +static inline enum pcie_link_width > >>>>> +pcie_get_width_cap(struct pci_dev *dev) > >>>>> +{ > >>>>> + uint32_t lnkcap; > >>>>> + > >>>>> + pcie_capability_read_dword(dev, PCI_EXP_LNKCAP, &lnkcap); > >>>> Better spelled as PCIER_LINK_CAP. > >>>> > >>>>> + if (lnkcap) > >>>>> + return ((lnkcap & PCI_EXP_LNKCAP_MLW) >> 4); > >>>> And PCIEM_LINK_CAP_MAX_WIDTH. > >>> Given that this is using a linuxkpi API (pcie_capability_read_dword > >>> instead of pcie_read_config()) then the rest of this function is > >>> written in the Linux KPI, so I think using Linux' native constants > >>> is actually more consistent for this function. > >> Hi > >> > >> Thanks for the feedback. > >> > >> This code used to exist in the drm driver but was moved into kernel pci > >> code on Linux. It's more or less as it existed in the drm driver with > >> FreeBSD patches having roots probably going back to drm2 from base. If > > No, I assure you that it did not appeared in drm2. > > For a bit of history: > > drm2: > https://github.com/freebsd/freebsd/blob/release/12.0.0/sys/dev/drm2/drm_pci.c#L439 So it is vestiges from drm. > > later drm-next: > https://github.com/FreeBSDDesktop/kms-drm/blob/drm-v4.16/drivers/gpu/drm/drm_pci.c#L441 > > and now linuxkpi: > https://github.com/freebsd/freebsd/blob/master/sys/compat/linuxkpi/common/include/linux/pci.h#L866 > > > Upstream patch: https://patchwork.kernel.org/patch/10487273/ > > > > > >> this function won't be compatible with anything but drm drivers, we > >> could just as well move it to linuxkpi in ports instead. > > It only works for GPUs which are either pseudo-PCIe devices, i.e. > > they represent itself as PCIe-attached devices for configuration purposes > > but really attached to the CPU ring directly. This is true for CPU- > > integrated graphics. Or for lucky circumstances where external > > GPU is plugged into CPU PCIe slot without any PCIe bridges. > > > > If PCIe GPU is connected through a switch (which happen quite often > > these days), or into the slot managed by south bridge (I believe this > > is theoretically possible) then the code would not work. > > > > Perhaps you want dmar_get_requester() which does exactly what you > > (seems) try to get for PCIe devices attached without non-PCIe bridges. > > > >> I'll try to implement the suggested improvements. Keep on eye out for > >> updates here https://reviews.freebsd.org/D19565 > >> > >> /Johannes > >> > >> > >> > >> From owner-svn-src-all@freebsd.org Thu Mar 14 12:25:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F149A15403F5; Thu, 14 Mar 2019 12:25:16 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 93FAC754E5; Thu, 14 Mar 2019 12:25:16 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83CB122624; Thu, 14 Mar 2019 12:25:16 +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 x2ECPGmU042550; Thu, 14 Mar 2019 12:25:16 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2ECPGI3042548; Thu, 14 Mar 2019 12:25:16 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201903141225.x2ECPGI3042548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Thu, 14 Mar 2019 12:25:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345130 - head/usr.sbin/trim X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/usr.sbin/trim X-SVN-Commit-Revision: 345130 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 93FAC754E5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 12:25:17 -0000 Author: eugen Date: Thu Mar 14 12:25:16 2019 New Revision: 345130 URL: https://svnweb.freebsd.org/changeset/base/345130 Log: trim(8): add another safety net It is quite easy make a mistake and run something like this: trim -f /dev/da0 -r rfile This would trim the whole device then emit an error on non-existing file -r. Add another check to prevent this while allowing this form still for real object names beginning from dash: trim -f -- /dev/da0 -r rfile MFC after: 1 week Modified: head/usr.sbin/trim/trim.c Modified: head/usr.sbin/trim/trim.c ============================================================================== --- head/usr.sbin/trim/trim.c Thu Mar 14 10:06:46 2019 (r345129) +++ head/usr.sbin/trim/trim.c Thu Mar 14 12:25:16 2019 (r345130) @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -103,6 +104,23 @@ main(int argc, char **argv) usage(name); /* NOTREACHED */ } + + /* + * Safety net: do not allow mistakes like + * + * trim -f /dev/da0 -r rfile + * + * This would trim whole device then error on non-existing file -r. + * Following check prevents this while allowing this form still: + * + * trim -f -- /dev/da0 -r rfile + */ + + if (strcmp(argv[optind-1], "--") != 0) { + for (ch = optind; ch < argc; ch++) + if (argv[ch][0] == '-') + usage(name); + } argv += optind; argc -= optind; From owner-svn-src-all@freebsd.org Thu Mar 14 13:28:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1527E1543AF1; Thu, 14 Mar 2019 13:28:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A178A779FA; Thu, 14 Mar 2019 13:28:21 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D37F230CA; Thu, 14 Mar 2019 13:28:21 +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 x2EDSLQk073722; Thu, 14 Mar 2019 13:28:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EDSLhS073721; Thu, 14 Mar 2019 13:28:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903141328.x2EDSLhS073721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 14 Mar 2019 13:28:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345131 - head/sys/contrib/dev/npe X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/contrib/dev/npe X-SVN-Commit-Revision: 345131 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A178A779FA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 13:28:22 -0000 Author: emaste Date: Thu Mar 14 13:28:21 2019 New Revision: 345131 URL: https://svnweb.freebsd.org/changeset/base/345131 Log: Remove npe microcode The driver was removed in r336436. Deleted: head/sys/contrib/dev/npe/ From owner-svn-src-all@freebsd.org Thu Mar 14 14:34:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 079C11545A86; Thu, 14 Mar 2019 14:34:37 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C06C82527; Thu, 14 Mar 2019 14:34:36 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8D6F923D0C; Thu, 14 Mar 2019 14:34:36 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EEYajY010514; Thu, 14 Mar 2019 14:34:36 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EEYaaE010513; Thu, 14 Mar 2019 14:34:36 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201903141434.x2EEYaaE010513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Thu, 14 Mar 2019 14:34:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345132 - head/usr.sbin/chroot X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/usr.sbin/chroot X-SVN-Commit-Revision: 345132 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9C06C82527 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 14:34:37 -0000 Author: 0mp (ports committer) Date: Thu Mar 14 14:34:36 2019 New Revision: 345132 URL: https://svnweb.freebsd.org/changeset/base/345132 Log: chroot.8: Add examples & clean up - Sort arguments in synopsis. - Clarify that it is possible to specify arguments to the command (and that they could be passed as further arguments to chroot(1)). - Standardize the description of the flags. - Improve formatting (e.g., do not use macros in strings specifying width). - Add examples. Reviewed by: bcr Approved by: bcr (doc) Approved by: krion (mentor, implicit), mat (mentor, implicit) Differential Revision: https://reviews.freebsd.org/D19582 Modified: head/usr.sbin/chroot/chroot.8 Modified: head/usr.sbin/chroot/chroot.8 ============================================================================== --- head/usr.sbin/chroot/chroot.8 Thu Mar 14 13:28:21 2019 (r345131) +++ head/usr.sbin/chroot/chroot.8 Thu Mar 14 14:34:36 2019 (r345132) @@ -28,7 +28,7 @@ .\" @(#)chroot.8 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd June 7, 2003 +.Dd March 14, 2019 .Dt CHROOT 8 .Os .Sh NAME @@ -36,36 +36,36 @@ .Nd change root directory .Sh SYNOPSIS .Nm -.Op Fl u Ar user +.Op Fl G Ar group Ns Op Cm \&, Ns Ar group ... .Op Fl g Ar group -.Op Fl G Ar group,group,... +.Op Fl u Ar user .Ar newroot -.Op Ar command +.Op Ar command Op Ar arg ... .Sh DESCRIPTION The .Nm utility changes its current and root directories to the supplied directory .Ar newroot and then exec's -.Ar command , -if supplied, +.Ar command +with provided arguments, if supplied, or an interactive copy of the user's login shell. .Pp -If the -.Fl u , -.Fl g -or -.Fl G -options are given, -the user, -group and group list of the process are set to -these values after the -.Nm -has taken place. +The options are as follows: +.Bl -tag -width "-G group[,group ...]" +.It Fl G Ar group Ns Op Cm \&, Ns Ar group ... +Run the command with the permissions of the specified groups. +.It Fl g Ar group +Run the command with the permissions of the specified +.Ar group . +.It Fl u Ar user +Run the command as the +.Ar user . +.El .Sh ENVIRONMENT The following environment variable is referenced by .Nm : -.Bl -tag -width ".Ev SHELL" +.Bl -tag -width "SHELL" .It Ev SHELL If set, the string specified by @@ -77,6 +77,28 @@ If the variable is not set, .Pa /bin/sh is used. +.El +.Sh EXAMPLES +.Bl -tag -width 0n +.It Sy Example 1\&: No Chrooting into a New Root Directory +.Pp +The following command opens the +.Xr csh 1 +shell after chrooting to the standard root directory. +.Bd -literal -offset 2n +.Li # Ic chroot / /bin/csh +.Ed +.It Sy Example 2\&: No Execution of a Command with a Changed Root Directory +.Pp +The following command changes a root directory with +.Nm +and then runs +.Xr ls 1 +to list the contents of +.Pa /sbin . +.Bd -literal -offset 2n +.Li # Ic chroot /tmp/testroot ls /sbin +.Ed .El .Sh SEE ALSO .Xr chdir 2 , From owner-svn-src-all@freebsd.org Thu Mar 14 15:55:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F71F1547B73; Thu, 14 Mar 2019 15:55:31 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A380185F8D; Thu, 14 Mar 2019 15:55:30 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 953FB24AE3; Thu, 14 Mar 2019 15:55:30 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EFtUGR054288; Thu, 14 Mar 2019 15:55:30 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EFtU3x054287; Thu, 14 Mar 2019 15:55:30 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201903141555.x2EFtU3x054287@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 14 Mar 2019 15:55:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345135 - head/sys/mips/mips X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/mips/mips X-SVN-Commit-Revision: 345135 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A380185F8D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 15:55:31 -0000 Author: brooks Date: Thu Mar 14 15:55:30 2019 New Revision: 345135 URL: https://svnweb.freebsd.org/changeset/base/345135 Log: Remove an unused struct proc *p1 in cpu_fork(). The only reference to p1 after a dead store was in a comment so update the comment to refer to td1. Submitted by: sbruno Differential Revision: https://reviews.freebsd.org/D16226 Modified: head/sys/mips/mips/vm_machdep.c Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Thu Mar 14 15:07:46 2019 (r345134) +++ head/sys/mips/mips/vm_machdep.c Thu Mar 14 15:55:30 2019 (r345135) @@ -90,10 +90,8 @@ __FBSDID("$FreeBSD$"); void cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2,int flags) { - struct proc *p1; struct pcb *pcb2; - p1 = td1->td_proc; if ((flags & RFPROC) == 0) return; /* It is assumed that the vm_thread_alloc called @@ -103,7 +101,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct t /* Point the pcb to the top of the stack */ pcb2 = td2->td_pcb; - /* Copy p1's pcb, note that in this case + /* Copy td1's pcb, note that in this case * our pcb also includes the td_frame being copied * too. The older mips2 code did an additional copy * of the td_frame, for us that's not needed any From owner-svn-src-all@freebsd.org Thu Mar 14 15:56:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF9AC1547CA7; Thu, 14 Mar 2019 15:56:35 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7446286189; Thu, 14 Mar 2019 15:56:35 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6517524AE8; Thu, 14 Mar 2019 15:56:35 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EFuZ4i054379; Thu, 14 Mar 2019 15:56:35 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EFuZbU054378; Thu, 14 Mar 2019 15:56:35 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201903141556.x2EFuZbU054378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 14 Mar 2019 15:56:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345136 - head/sys/mips/mips X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/mips/mips X-SVN-Commit-Revision: 345136 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7446286189 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 15:56:36 -0000 Author: brooks Date: Thu Mar 14 15:56:34 2019 New Revision: 345136 URL: https://svnweb.freebsd.org/changeset/base/345136 Log: Style(9): add a missing space between argument declerations. Modified: head/sys/mips/mips/vm_machdep.c Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Thu Mar 14 15:55:30 2019 (r345135) +++ head/sys/mips/mips/vm_machdep.c Thu Mar 14 15:56:34 2019 (r345136) @@ -88,7 +88,7 @@ __FBSDID("$FreeBSD$"); * ready to run and return to user mode. */ void -cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2,int flags) +cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) { struct pcb *pcb2; From owner-svn-src-all@freebsd.org Thu Mar 14 17:05:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C9CB1549975; Thu, 14 Mar 2019 17:05:47 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9486A88FE9; Thu, 14 Mar 2019 17:05:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 82AA4256D5; Thu, 14 Mar 2019 17:05:46 +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 x2EH5kbf090758; Thu, 14 Mar 2019 17:05:46 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EH5k4n090757; Thu, 14 Mar 2019 17:05:46 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903141705.x2EH5k4n090757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 14 Mar 2019 17:05:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345137 - head/sys/contrib/dev/drm2 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/contrib/dev/drm2 X-SVN-Commit-Revision: 345137 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9486A88FE9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 17:05:47 -0000 Author: emaste Date: Thu Mar 14 17:05:46 2019 New Revision: 345137 URL: https://svnweb.freebsd.org/changeset/base/345137 Log: Remove radeonkmsfw firmware files The drivers were removed in r344299 so there is no need to keep the firmware files in the src tree. Reviewed by: imp, jhibbits, johalun Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19583 Deleted: head/sys/contrib/dev/drm2/ From owner-svn-src-all@freebsd.org Thu Mar 14 17:09:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57B631549C3F; Thu, 14 Mar 2019 17:09:08 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F18C48928E; Thu, 14 Mar 2019 17:09:07 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2B46256D7; Thu, 14 Mar 2019 17:09:07 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EH97wK090942; Thu, 14 Mar 2019 17:09:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EH97e7090941; Thu, 14 Mar 2019 17:09:07 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903141709.x2EH97e7090941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 14 Mar 2019 17:09:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345138 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 345138 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F18C48928E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 17:09:08 -0000 Author: emaste Date: Thu Mar 14 17:09:07 2019 New Revision: 345138 URL: https://svnweb.freebsd.org/changeset/base/345138 Log: firmware(9): remove uuencoded example We can (should) just commit the binary files to the source tree. Reviewed by: bz, imp, 0mp Differential Revision: https://reviews.freebsd.org/D19581 Modified: head/share/man/man9/firmware.9 Modified: head/share/man/man9/firmware.9 ============================================================================== --- head/share/man/man9/firmware.9 Thu Mar 14 17:05:46 2019 (r345137) +++ head/share/man/man9/firmware.9 Thu Mar 14 17:09:07 2019 (r345138) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 2, 2008 +.Dd March 14, 2019 .Dt FIRMWARE 9 .Os .Sh NAME @@ -248,12 +248,11 @@ IxNpeMicrocode.fwo optional npe_fw \\ -r -d -o ${.TARGET} IxNpeMicrocode.dat" \\ no-implicit-rule \\ clean "IxNpeMicrocode.fwo" -IxNpeMicrocode.dat optional npe_fw \\ - dependency ".PHONY" \\ - compile-with "uudecode < $S/contrib/dev/npe/IxNpeMicrocode.dat.uu" \\ - no-obj no-implicit-rule \\ - clean "IxNpeMicrocode.dat" .Ed +.Pp +Firmware was previously committed to the source tree as uuencoded files, +but this is no longer required; the binary firmware file should be committed +to the tree as provided by the vendor. .Pp Note that generating the firmware modules in this way requires the availability of the following tools: From owner-svn-src-all@freebsd.org Thu Mar 14 17:18:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54628152437C; Thu, 14 Mar 2019 17:18:02 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E793B899F0; Thu, 14 Mar 2019 17:18:01 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DA9E8258B9; Thu, 14 Mar 2019 17:18:01 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EHI1sX095992; Thu, 14 Mar 2019 17:18:01 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EHI1SR095988; Thu, 14 Mar 2019 17:18:01 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201903141718.x2EHI1SR095988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 14 Mar 2019 17:18:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345139 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 345139 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E793B899F0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 17:18:02 -0000 Author: kevans Date: Thu Mar 14 17:18:00 2019 New Revision: 345139 URL: https://svnweb.freebsd.org/changeset/base/345139 Log: ether: centralize fake hwaddr generation We currently have two places with identical fake hwaddr generation -- if_vxlan and if_bridge. Lift it into if_ethersubr for reuse in other interfaces that may also need a fake addr. Reviewed by: bryanv, kp, philip Differential Revision: https://reviews.freebsd.org/D19573 Modified: head/sys/net/ethernet.h head/sys/net/if_bridge.c head/sys/net/if_ethersubr.c head/sys/net/if_vxlan.c Modified: head/sys/net/ethernet.h ============================================================================== --- head/sys/net/ethernet.h Thu Mar 14 17:09:07 2019 (r345138) +++ head/sys/net/ethernet.h Thu Mar 14 17:18:00 2019 (r345139) @@ -422,6 +422,7 @@ void ether_vlan_mtap(struct bpf_if *, struct mbuf *, struct mbuf *ether_vlanencap(struct mbuf *, uint16_t); bool ether_8021q_frame(struct mbuf **mp, struct ifnet *ife, struct ifnet *p, uint16_t vid, uint8_t pcp); +void ether_fakeaddr(struct ether_addr *hwaddr); #ifdef _SYS_EVENTHANDLER_H_ /* new ethernet interface attached event */ Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Thu Mar 14 17:09:07 2019 (r345138) +++ head/sys/net/if_bridge.c Thu Mar 14 17:18:00 2019 (r345139) @@ -226,7 +226,7 @@ struct bridge_softc { struct bstp_state sc_stp; /* STP state */ uint32_t sc_brtexceeded; /* # of cache drops */ struct ifnet *sc_ifaddr; /* member mac copied from */ - u_char sc_defaddr[6]; /* Default MAC address */ + struct ether_addr sc_defaddr; /* Default MAC address */ }; VNET_DEFINE_STATIC(struct mtx, bridge_list_mtx); @@ -670,16 +670,14 @@ bridge_clone_create(struct if_clone *ifc, int unit, ca getcredhostid(curthread->td_ucred, &hostid); do { if (fb || hostid == 0) { - arc4rand(sc->sc_defaddr, ETHER_ADDR_LEN, 1); - sc->sc_defaddr[0] &= ~1;/* clear multicast bit */ - sc->sc_defaddr[0] |= 2; /* set the LAA bit */ + ether_fakeaddr(&sc->sc_defaddr); } else { - sc->sc_defaddr[0] = 0x2; - sc->sc_defaddr[1] = (hostid >> 24) & 0xff; - sc->sc_defaddr[2] = (hostid >> 16) & 0xff; - sc->sc_defaddr[3] = (hostid >> 8 ) & 0xff; - sc->sc_defaddr[4] = hostid & 0xff; - sc->sc_defaddr[5] = ifp->if_dunit & 0xff; + sc->sc_defaddr.octet[0] = 0x2; + sc->sc_defaddr.octet[1] = (hostid >> 24) & 0xff; + sc->sc_defaddr.octet[2] = (hostid >> 16) & 0xff; + sc->sc_defaddr.octet[3] = (hostid >> 8 ) & 0xff; + sc->sc_defaddr.octet[4] = hostid & 0xff; + sc->sc_defaddr.octet[5] = ifp->if_dunit & 0xff; } fb = 1; @@ -687,7 +685,7 @@ bridge_clone_create(struct if_clone *ifc, int unit, ca BRIDGE_LIST_LOCK(); LIST_FOREACH(sc2, &V_bridge_list, sc_list) { bifp = sc2->sc_ifp; - if (memcmp(sc->sc_defaddr, + if (memcmp(sc->sc_defaddr.octet, IF_LLADDR(bifp), ETHER_ADDR_LEN) == 0) { retry = 1; break; @@ -697,7 +695,7 @@ bridge_clone_create(struct if_clone *ifc, int unit, ca } while (retry == 1); bstp_attach(&sc->sc_stp, &bridge_ops); - ether_ifattach(ifp, sc->sc_defaddr); + ether_ifattach(ifp, sc->sc_defaddr.octet); /* Now undo some of the damage... */ ifp->if_baudrate = 0; ifp->if_type = IFT_BRIDGE; @@ -1018,7 +1016,7 @@ bridge_delete_member(struct bridge_softc *sc, struct b */ if (V_bridge_inherit_mac && sc->sc_ifaddr == ifs) { if (LIST_EMPTY(&sc->sc_iflist)) { - bcopy(sc->sc_defaddr, + bcopy(&sc->sc_defaddr, IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN); sc->sc_ifaddr = NULL; } else { @@ -1189,7 +1187,7 @@ bridge_ioctl_add(struct bridge_softc *sc, void *arg) * the default randomly generated one. */ if (V_bridge_inherit_mac && LIST_EMPTY(&sc->sc_iflist) && - !memcmp(IF_LLADDR(sc->sc_ifp), sc->sc_defaddr, ETHER_ADDR_LEN)) { + !memcmp(IF_LLADDR(sc->sc_ifp), sc->sc_defaddr.octet, ETHER_ADDR_LEN)) { bcopy(IF_LLADDR(ifs), IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN); sc->sc_ifaddr = ifs; EVENTHANDLER_INVOKE(iflladdr_event, sc->sc_ifp); Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Thu Mar 14 17:09:07 2019 (r345138) +++ head/sys/net/if_ethersubr.c Thu Mar 14 17:18:00 2019 (r345139) @@ -1401,5 +1401,19 @@ ether_8021q_frame(struct mbuf **mp, struct ifnet *ife, return (true); } +void +ether_fakeaddr(struct ether_addr *hwaddr) +{ + + /* + * Generate a non-multicast, locally administered address. + * + * BMV: Should we use the FreeBSD OUI range instead? + */ + arc4rand(hwaddr->octet, ETHER_ADDR_LEN, 1); + hwaddr->octet[0] &= ~1; + hwaddr->octet[0] |= 2; +} + DECLARE_MODULE(ether, ether_mod, SI_SUB_INIT_IF, SI_ORDER_ANY); MODULE_VERSION(ether, 1); Modified: head/sys/net/if_vxlan.c ============================================================================== --- head/sys/net/if_vxlan.c Thu Mar 14 17:09:07 2019 (r345138) +++ head/sys/net/if_vxlan.c Thu Mar 14 17:18:00 2019 (r345139) @@ -177,7 +177,7 @@ struct vxlan_softc { struct sysctl_oid *vxl_sysctl_node; struct sysctl_ctx_list vxl_sysctl_ctx; struct callout vxl_callout; - uint8_t vxl_hwaddr[ETHER_ADDR_LEN]; + struct ether_addr vxl_hwaddr; int vxl_mc_ifindex; struct ifnet *vxl_mc_ifp; struct ifmedia vxl_media; @@ -345,7 +345,6 @@ static int vxlan_clone_create(struct if_clone *, int, static void vxlan_clone_destroy(struct ifnet *); static uint32_t vxlan_mac_hash(struct vxlan_softc *, const uint8_t *); -static void vxlan_fakeaddr(struct vxlan_softc *); static int vxlan_media_change(struct ifnet *); static void vxlan_media_status(struct ifnet *, struct ifmediareq *); @@ -2755,8 +2754,8 @@ vxlan_clone_create(struct if_clone *ifc, int unit, cad ifmedia_add(&sc->vxl_media, IFM_ETHER | IFM_AUTO, 0, NULL); ifmedia_set(&sc->vxl_media, IFM_ETHER | IFM_AUTO); - vxlan_fakeaddr(sc); - ether_ifattach(ifp, sc->vxl_hwaddr); + ether_fakeaddr(&sc->vxl_hwaddr); + ether_ifattach(ifp, sc->vxl_hwaddr.octet); ifp->if_baudrate = 0; ifp->if_hdrlen = 0; @@ -2825,20 +2824,6 @@ do { \ #undef mix return (c); -} - -static void -vxlan_fakeaddr(struct vxlan_softc *sc) -{ - - /* - * Generate a non-multicast, locally administered address. - * - * BMV: Should we use the FreeBSD OUI range instead? - */ - arc4rand(sc->vxl_hwaddr, ETHER_ADDR_LEN, 1); - sc->vxl_hwaddr[0] &= ~1; - sc->vxl_hwaddr[0] |= 2; } static int From owner-svn-src-all@freebsd.org Thu Mar 14 18:55:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 619031527C45; Thu, 14 Mar 2019 18:55:06 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 A176F8CBD6; Thu, 14 Mar 2019 18:55:05 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2EIt2M8026402; Thu, 14 Mar 2019 11:55:02 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2EIt2ih026401; Thu, 14 Mar 2019 11:55:02 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903141855.x2EIt2ih026401@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345138 - head/share/man/man9 In-Reply-To: <201903141709.x2EH97e7090941@repo.freebsd.org> To: Ed Maste Date: Thu, 14 Mar 2019 11:55:02 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: A176F8CBD6 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 18:55:06 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: emaste > Date: Thu Mar 14 17:09:07 2019 > New Revision: 345138 > URL: https://svnweb.freebsd.org/changeset/base/345138 > > Log: > firmware(9): remove uuencoded example > > We can (should) just commit the binary files to the source tree. We should of documented what the decision process and criteria was that lead to the decission to uuencode the files. I do not believe it was just that the VCS could not handle them, that there was some other reasoning as well. There is also down streams to consider, does this in any way effect things outside the project. Thus we could easily revist that criteria, see how much of it no longer applies, possible add counter criteria, and change this decision, with it documented as to why it changed. As is this is just another semi documented project guideline change, I believe there are more than just the firmware files that this change needs noted on. We should also note that if they are already in uuencode state to leave them in uuencode state, or do we intened to convert them on next commit, or ??? This change could use wider discussion. > Reviewed by: bz, imp, 0mp > Differential Revision: https://reviews.freebsd.org/D19581 > > Modified: > head/share/man/man9/firmware.9 > > Modified: head/share/man/man9/firmware.9 > ============================================================================== > --- head/share/man/man9/firmware.9 Thu Mar 14 17:05:46 2019 (r345137) > +++ head/share/man/man9/firmware.9 Thu Mar 14 17:09:07 2019 (r345138) > @@ -23,7 +23,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd August 2, 2008 > +.Dd March 14, 2019 > .Dt FIRMWARE 9 > .Os > .Sh NAME > @@ -248,12 +248,11 @@ IxNpeMicrocode.fwo optional npe_fw \\ > -r -d -o ${.TARGET} IxNpeMicrocode.dat" \\ > no-implicit-rule \\ > clean "IxNpeMicrocode.fwo" > -IxNpeMicrocode.dat optional npe_fw \\ > - dependency ".PHONY" \\ > - compile-with "uudecode < $S/contrib/dev/npe/IxNpeMicrocode.dat.uu" \\ > - no-obj no-implicit-rule \\ > - clean "IxNpeMicrocode.dat" > .Ed > +.Pp > +Firmware was previously committed to the source tree as uuencoded files, > +but this is no longer required; the binary firmware file should be committed > +to the tree as provided by the vendor. > .Pp > Note that generating the firmware modules in this way requires > the availability of the following tools: > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Thu Mar 14 19:07:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF9831527FC8; Thu, 14 Mar 2019 19:07:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 50E598D123; Thu, 14 Mar 2019 19:07:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 38AD126B64; Thu, 14 Mar 2019 19:07:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EJ7fNb053088; Thu, 14 Mar 2019 19:07:41 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EJ7fem053087; Thu, 14 Mar 2019 19:07:41 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903141907.x2EJ7fem053087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 14 Mar 2019 19:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345141 - head/sys/mips/mips X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/mips/mips X-SVN-Commit-Revision: 345141 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 50E598D123 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 19:07:42 -0000 Author: kib Date: Thu Mar 14 19:07:41 2019 New Revision: 345141 URL: https://svnweb.freebsd.org/changeset/base/345141 Log: mips: remove dead comment and definitions. Reviewed by: brooks, jhb Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D19584 Modified: head/sys/mips/mips/vm_machdep.c Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Thu Mar 14 17:20:24 2019 (r345140) +++ head/sys/mips/mips/vm_machdep.c Thu Mar 14 19:07:41 2019 (r345141) @@ -454,14 +454,6 @@ cpu_set_upcall(struct thread *td, void (*entry)(void * } /* - * Implement the pre-zeroed page mechanism. - * This routine is called from the idle loop. - */ - -#define ZIDLE_LO(v) ((v) * 2 / 3) -#define ZIDLE_HI(v) ((v) * 4 / 5) - -/* * Software interrupt handler for queued VM system processing. */ void From owner-svn-src-all@freebsd.org Thu Mar 14 19:27:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 920EC1528953; Thu, 14 Mar 2019 19:27:33 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it1-f195.google.com (mail-it1-f195.google.com [209.85.166.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1DB258DC8F; Thu, 14 Mar 2019 19:27:33 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it1-f195.google.com with SMTP id l139so6911818ita.5; Thu, 14 Mar 2019 12:27:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dx5ARbknWxEKBv9P1d2kaHqLGAndlzG0wrIdY726aA0=; b=Rji1HMuDrnsrG5kW35N7POzWebhMWcrwF7Vr8TdGahagGsXNs/DMKqGt147/Nq58L5 2nLDUqWFT9k7whFKJAFGO73GkUC2sN3CaNRI6WcTjW+L8iU9pZMNlmoS45H6M0oIH5NL htdxX5iI7muKRMJ3e5eYjB8HMA7e5fov9b4/9mqUbxkM9gqMM04mUJLm9/KSqO/riH/x KriZYKdqz+dZkAshn/8O/Rgz0Ik9UV75ZARKBSL/mGpAG9/NKXiExUTruVxa1sn1ncIG KPLOTmR/2vIwnK8EvUvyeuBYSbcvXVErcb82V/Sxrx6ppyqOzO90Mqp4Crz+yCDb3/R/ ypwQ== X-Gm-Message-State: APjAAAUEFfR9pgxcOdUDt5ED1QzGdGZ50uc+d5EBCbIdzOtiBeW9ROSC uYJCpkymI1P5dSQjLeC6pHZZ2LidxUPDXoY91fmFiQ== X-Google-Smtp-Source: APXvYqw0EVKo7PEq0+nucU3SG/6m6r2jtRd8AOZQ9YbDkR1Ezxz4KOf7ZdbvyjkxBrkH7pCA9sbOoaCob4mUPOY+tUM= X-Received: by 2002:a24:b501:: with SMTP id v1mr68584ite.174.1552591324333; Thu, 14 Mar 2019 12:22:04 -0700 (PDT) MIME-Version: 1.0 References: <201903141709.x2EH97e7090941@repo.freebsd.org> <201903141855.x2EIt2ih026401@gndrsh.dnsmgr.net> In-Reply-To: <201903141855.x2EIt2ih026401@gndrsh.dnsmgr.net> From: Ed Maste Date: Thu, 14 Mar 2019 15:21:51 -0400 Message-ID: Subject: Re: svn commit: r345138 - head/share/man/man9 To: "Rodney W. Grimes" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 1DB258DC8F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.938,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 19:27:33 -0000 On Thu, 14 Mar 2019 at 14:55, Rodney W. Grimes wrote: > > [ Charset UTF-8 unsupported, converting... ] > > Author: emaste > > Date: Thu Mar 14 17:09:07 2019 > > New Revision: 345138 > > URL: https://svnweb.freebsd.org/changeset/base/345138 > > > > Log: > > firmware(9): remove uuencoded example > > > > We can (should) just commit the binary files to the source tree. > > This change could use wider discussion. If you or others have a reason to prefer having uuencoded files in the src tree I'll happily revert. I was aware only of CVS limitations as a reason for uuencoding. We have many binary files in the tree already (e.g. GIF PNG and JPEG images, ELF and PE32 binaries, Berkeley DB files, and various compressed formats). I count 430 uuencoded files in the tree, with 328 of those coming from libarchive and 64 from sys/*/dev/ From owner-svn-src-all@freebsd.org Thu Mar 14 19:32:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0C941528EF2; Thu, 14 Mar 2019 19:32:08 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B1188E1BB; Thu, 14 Mar 2019 19:32:08 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [172.17.133.69] (unknown [12.202.168.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id CCF4614CB2; Thu, 14 Mar 2019 19:32:07 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/10.17.0.190309 Date: Thu, 14 Mar 2019 12:32:03 -0700 Subject: Re: svn commit: r345138 - head/share/man/man9 From: Ravi Pokala To: Ed Maste , "Rodney W. Grimes" CC: src-committers , , Message-ID: <9B88CC0B-E997-4860-AE91-15ED7C133B22@panasas.com> Thread-Topic: svn commit: r345138 - head/share/man/man9 References: <201903141709.x2EH97e7090941@repo.freebsd.org> <201903141855.x2EIt2ih026401@gndrsh.dnsmgr.net> In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-Rspamd-Queue-Id: 8B1188E1BB X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 19:32:08 -0000 I think maybe there was also a limitation on the (repo-replication-over-ema= il?) mechanism that we used to use? That rings a very faint bell for me for = some reason, even though I'm pretty sure it was dead long before I got my bi= t. -Ravi (rpokala@) =EF=BB=BF-----Original Message----- From: on behalf of Ed Maste Date: 2019-03-14, Thursday at 12:21 To: "Rodney W. Grimes" Cc: src-committers , ,= Subject: Re: svn commit: r345138 - head/share/man/man9 On Thu, 14 Mar 2019 at 14:55, Rodney W. Grimes wrote: > > [ Charset UTF-8 unsupported, converting... ] > > Author: emaste > > Date: Thu Mar 14 17:09:07 2019 > > New Revision: 345138 > > URL: https://svnweb.freebsd.org/changeset/base/345138 > > > > Log: > > firmware(9): remove uuencoded example > > > > We can (should) just commit the binary files to the source tree. > > This change could use wider discussion. If you or others have a reason to prefer having uuencoded files in the src tree I'll happily revert. I was aware only of CVS limitations as a reason for uuencoding. We have many binary files in the tree already (e.g. GIF PNG and JPEG images, ELF and PE32 binaries, Berkeley DB files, and various compressed formats). I count 430 uuencoded files in the tree, with 328 of those coming from libarchive and 64 from sys/*/dev/ From owner-svn-src-all@freebsd.org Thu Mar 14 19:41:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 561D11529519; Thu, 14 Mar 2019 19:41:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F17BF8E6EE; Thu, 14 Mar 2019 19:41:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E43C9270AB; Thu, 14 Mar 2019 19:41:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EJfA1B069879; Thu, 14 Mar 2019 19:41:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EJfATD069878; Thu, 14 Mar 2019 19:41:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903141941.x2EJfATD069878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 14 Mar 2019 19:41:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r345142 - vendor/llvm/dist-release_80/docs X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm/dist-release_80/docs X-SVN-Commit-Revision: 345142 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F17BF8E6EE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 19:41:11 -0000 Author: dim Date: Thu Mar 14 19:41:10 2019 New Revision: 345142 URL: https://svnweb.freebsd.org/changeset/base/345142 Log: Vendor import of llvm release_80 branch r356034: https://llvm.org/svn/llvm-project/llvm/branches/release_80@356034 Modified: vendor/llvm/dist-release_80/docs/ReleaseNotes.rst Modified: vendor/llvm/dist-release_80/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm/dist-release_80/docs/ReleaseNotes.rst Thu Mar 14 19:07:41 2019 (r345141) +++ vendor/llvm/dist-release_80/docs/ReleaseNotes.rst Thu Mar 14 19:41:10 2019 (r345142) @@ -95,6 +95,22 @@ Changes to the LLVM IR `_ must be enabled for the function body. +Changes to the JIT APIs +----------------------- + +The ORC (On Request Compilation) JIT APIs have been updated to support +concurrent compilation. The existing (non-concurrent) ORC layer classes and +related APIs are deprecated, have been renamed with a "Legacy" prefix (e.g. +LegacyIRCompileLayer). The deprecated clasess will be removed in LLVM 9. + +An example JIT stack using the concurrent ORC APIs, called LLJIT, has been +added (see include/llvm/ExecutionEngine/Orc/LLJIT.h). The lli tool has been +updated to use LLJIT. + +MCJIT and ExecutionEngine continue to be supported, though ORC should be +preferred for new projects. + + Changes to the AArch64 Target ----------------------------- @@ -171,6 +187,26 @@ Changes to the PowerPC Target * Completed support in LLD for ELFv2 * Enabled llvm-exegesis latency mode for PPC + + +Changes to the SystemZ Target +----------------------------- + +* A number of bugs related to C/C++ language vector extension support were + fixed: the ``-mzvector`` option now actually enables the ``__vector`` and + ``__bool`` keywords, the ``vec_step`` intrinsic now works, and the + ``vec_insert_and_zero`` and ``vec_orc`` intrinsics now generate correct code. + +* The ``__float128`` keyword, which had been accidentally enabled in some + earlier releases, is now no longer supported. On SystemZ, the ``long double`` + data type itself already uses the IEEE 128-bit floating-point format. + +* When the compiler inlines ``strcmp`` or ``memcmp``, the generated code no + longer returns ``INT_MIN`` as the negative result value under any + circumstances. + +* Various code-gen improvements, in particular related to improved + auto-vectorization, inlining, and instruction scheduling. Changes to the X86 Target From owner-svn-src-all@freebsd.org Thu Mar 14 19:41:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 797261529534; Thu, 14 Mar 2019 19:41:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 204308E6F8; Thu, 14 Mar 2019 19:41:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFA18270B0; Thu, 14 Mar 2019 19:41:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EJfD06069925; Thu, 14 Mar 2019 19:41:13 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EJfDOc069924; Thu, 14 Mar 2019 19:41:13 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903141941.x2EJfDOc069924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 14 Mar 2019 19:41:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r345143 - vendor/llvm/llvm-release_80-r356034 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm/llvm-release_80-r356034 X-SVN-Commit-Revision: 345143 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 204308E6F8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 19:41:14 -0000 Author: dim Date: Thu Mar 14 19:41:13 2019 New Revision: 345143 URL: https://svnweb.freebsd.org/changeset/base/345143 Log: Tag llvm release_80 branch r356034. Added: vendor/llvm/llvm-release_80-r356034/ - copied from r345142, vendor/llvm/dist-release_80/ From owner-svn-src-all@freebsd.org Thu Mar 14 19:41:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9ED78152957B; Thu, 14 Mar 2019 19:41:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 38A448E798; Thu, 14 Mar 2019 19:41:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A6F38270B2; Thu, 14 Mar 2019 19:41:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EJfHYL069977; Thu, 14 Mar 2019 19:41:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EJfHJA069974; Thu, 14 Mar 2019 19:41:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903141941.x2EJfHJA069974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 14 Mar 2019 19:41:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r345144 - in vendor/clang/dist-release_80: lib/AST test/SemaCXX X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/clang/dist-release_80: lib/AST test/SemaCXX X-SVN-Commit-Revision: 345144 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 38A448E798 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 19:41:21 -0000 Author: dim Date: Thu Mar 14 19:41:16 2019 New Revision: 345144 URL: https://svnweb.freebsd.org/changeset/base/345144 Log: Vendor import of clang release_80 branch r356034: https://llvm.org/svn/llvm-project/cfe/branches/release_80@356034 Modified: vendor/clang/dist-release_80/lib/AST/ExprConstant.cpp vendor/clang/dist-release_80/test/SemaCXX/constant-expression-cxx1y.cpp vendor/clang/dist-release_80/test/SemaCXX/enable_if.cpp Modified: vendor/clang/dist-release_80/lib/AST/ExprConstant.cpp ============================================================================== --- vendor/clang/dist-release_80/lib/AST/ExprConstant.cpp Thu Mar 14 19:41:13 2019 (r345143) +++ vendor/clang/dist-release_80/lib/AST/ExprConstant.cpp Thu Mar 14 19:41:16 2019 (r345144) @@ -10985,6 +10985,7 @@ bool Expr::EvaluateAsConstantExpr(EvalResult &Result, const ASTContext &Ctx) const { EvalInfo::EvaluationMode EM = EvalInfo::EM_ConstantExpression; EvalInfo Info(Ctx, Result, EM); + Info.InConstantContext = true; if (!::Evaluate(Result.Val, Info, this)) return false; @@ -11625,6 +11626,7 @@ bool Expr::EvaluateWithSubstitution(APValue &Value, AS const Expr *This) const { Expr::EvalStatus Status; EvalInfo Info(Ctx, Status, EvalInfo::EM_ConstantExpressionUnevaluated); + Info.InConstantContext = true; LValue ThisVal; const LValue *ThisPtr = nullptr; @@ -11708,6 +11710,7 @@ bool Expr::isPotentialConstantExprUnevaluated(Expr *E, EvalInfo Info(FD->getASTContext(), Status, EvalInfo::EM_PotentialConstantExpressionUnevaluated); + Info.InConstantContext = true; // Fabricate a call stack frame to give the arguments a plausible cover story. ArrayRef Args; Modified: vendor/clang/dist-release_80/test/SemaCXX/constant-expression-cxx1y.cpp ============================================================================== --- vendor/clang/dist-release_80/test/SemaCXX/constant-expression-cxx1y.cpp Thu Mar 14 19:41:13 2019 (r345143) +++ vendor/clang/dist-release_80/test/SemaCXX/constant-expression-cxx1y.cpp Thu Mar 14 19:41:16 2019 (r345144) @@ -1135,3 +1135,27 @@ constexpr bool indirect_builtin_constant_p(const char return __builtin_constant_p(*__s); } constexpr bool n = indirect_builtin_constant_p("a"); + +__attribute__((enable_if(indirect_builtin_constant_p("a") == n, "OK"))) +int test_in_enable_if() { return 0; } +int n2 = test_in_enable_if(); + +template +int test_in_template_param() { return 0; } +int n3 = test_in_template_param(); + +void test_in_case(int n) { + switch (n) { + case indirect_builtin_constant_p("abc"): + break; + } +} +enum InEnum1 { + ONE = indirect_builtin_constant_p("abc") +}; +enum InEnum2 : int { + TWO = indirect_builtin_constant_p("abc") +}; +enum class InEnum3 { + THREE = indirect_builtin_constant_p("abc") +}; Modified: vendor/clang/dist-release_80/test/SemaCXX/enable_if.cpp ============================================================================== --- vendor/clang/dist-release_80/test/SemaCXX/enable_if.cpp Thu Mar 14 19:41:13 2019 (r345143) +++ vendor/clang/dist-release_80/test/SemaCXX/enable_if.cpp Thu Mar 14 19:41:16 2019 (r345144) @@ -514,3 +514,11 @@ namespace TypeOfFn { static_assert(is_same<__typeof__(foo)*, decltype(&foo)>::value, ""); } + +namespace InConstantContext { +void foo(const char *s) __attribute__((enable_if(((void)__builtin_constant_p(*s), true), "trap"))) {} + +void test() { + InConstantContext::foo("abc"); +} +} // namespace InConstantContext From owner-svn-src-all@freebsd.org Thu Mar 14 19:41:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C036115295AA; Thu, 14 Mar 2019 19:41:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 530BC8E7F9; Thu, 14 Mar 2019 19:41:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E638270B6; Thu, 14 Mar 2019 19:41:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EJfKKj070023; Thu, 14 Mar 2019 19:41:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EJfK87070022; Thu, 14 Mar 2019 19:41:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903141941.x2EJfK87070022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 14 Mar 2019 19:41:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r345145 - vendor/clang/clang-release_80-r356034 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/clang/clang-release_80-r356034 X-SVN-Commit-Revision: 345145 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 530BC8E7F9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 19:41:25 -0000 Author: dim Date: Thu Mar 14 19:41:20 2019 New Revision: 345145 URL: https://svnweb.freebsd.org/changeset/base/345145 Log: Tag clang release_80 branch r356034. Added: vendor/clang/clang-release_80-r356034/ - copied from r345144, vendor/clang/dist-release_80/ From owner-svn-src-all@freebsd.org Thu Mar 14 19:41:26 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 108C415295AE; Thu, 14 Mar 2019 19:41:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B8DF8E7FF; Thu, 14 Mar 2019 19:41:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 44D65270BC; Thu, 14 Mar 2019 19:41:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EJfNbl070072; Thu, 14 Mar 2019 19:41:23 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EJfND2070071; Thu, 14 Mar 2019 19:41:23 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903141941.x2EJfND2070071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 14 Mar 2019 19:41:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r345146 - vendor/compiler-rt/compiler-rt-release_80-r356034 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/compiler-rt/compiler-rt-release_80-r356034 X-SVN-Commit-Revision: 345146 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9B8DF8E7FF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 19:41:26 -0000 Author: dim Date: Thu Mar 14 19:41:22 2019 New Revision: 345146 URL: https://svnweb.freebsd.org/changeset/base/345146 Log: Tag compiler-rt release_80 branch r356034. Added: vendor/compiler-rt/compiler-rt-release_80-r356034/ - copied from r345145, vendor/compiler-rt/dist-release_80/ From owner-svn-src-all@freebsd.org Thu Mar 14 19:41:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50B9015295FB; Thu, 14 Mar 2019 19:41:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A25968E85F; Thu, 14 Mar 2019 19:41:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 841DF270C3; Thu, 14 Mar 2019 19:41:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EJfQWg070118; Thu, 14 Mar 2019 19:41:26 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EJfQtk070117; Thu, 14 Mar 2019 19:41:26 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903141941.x2EJfQtk070117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 14 Mar 2019 19:41:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r345147 - vendor/libc++/libc++-release_80-r356034 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/libc++/libc++-release_80-r356034 X-SVN-Commit-Revision: 345147 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A25968E85F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 19:41:39 -0000 Author: dim Date: Thu Mar 14 19:41:26 2019 New Revision: 345147 URL: https://svnweb.freebsd.org/changeset/base/345147 Log: Tag libc++ release_80 branch r356034. Added: vendor/libc++/libc++-release_80-r356034/ - copied from r345146, vendor/libc++/dist-release_80/ From owner-svn-src-all@freebsd.org Thu Mar 14 19:41:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFFA61529627; Thu, 14 Mar 2019 19:41:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E20D8E8F4; Thu, 14 Mar 2019 19:41:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 493FF270C7; Thu, 14 Mar 2019 19:41:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EJfTXM070167; Thu, 14 Mar 2019 19:41:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EJfT4B070166; Thu, 14 Mar 2019 19:41:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903141941.x2EJfT4B070166@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 14 Mar 2019 19:41:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r345148 - vendor/llvm-libunwind/libunwind-release_80-r356034 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-libunwind/libunwind-release_80-r356034 X-SVN-Commit-Revision: 345148 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0E20D8E8F4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 19:41:42 -0000 Author: dim Date: Thu Mar 14 19:41:28 2019 New Revision: 345148 URL: https://svnweb.freebsd.org/changeset/base/345148 Log: Tag LLVM libunwind release_80 branch r356034. Added: vendor/llvm-libunwind/libunwind-release_80-r356034/ - copied from r345147, vendor/llvm-libunwind/dist-release_80/ From owner-svn-src-all@freebsd.org Thu Mar 14 19:41:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D93D81529647; Thu, 14 Mar 2019 19:41:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F04838E936; Thu, 14 Mar 2019 19:41:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 35668271DC; Thu, 14 Mar 2019 19:41:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EJfZoR070263; Thu, 14 Mar 2019 19:41:35 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EJfZiw070262; Thu, 14 Mar 2019 19:41:35 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903141941.x2EJfZiw070262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 14 Mar 2019 19:41:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r345150 - vendor/lldb/lldb-release_80-r356034 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lldb/lldb-release_80-r356034 X-SVN-Commit-Revision: 345150 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F04838E936 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 19:41:45 -0000 Author: dim Date: Thu Mar 14 19:41:34 2019 New Revision: 345150 URL: https://svnweb.freebsd.org/changeset/base/345150 Log: Tag lldb release_80 branch r356034. Added: vendor/lldb/lldb-release_80-r356034/ - copied from r345149, vendor/lldb/dist-release_80/ From owner-svn-src-all@freebsd.org Thu Mar 14 19:41:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A02121529636; Thu, 14 Mar 2019 19:41:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5EF368E927; Thu, 14 Mar 2019 19:41:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D219271D8; Thu, 14 Mar 2019 19:41:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EJfWID070213; Thu, 14 Mar 2019 19:41:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EJfWHN070212; Thu, 14 Mar 2019 19:41:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903141941.x2EJfWHN070212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 14 Mar 2019 19:41:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r345149 - vendor/lld/lld-release_80-r356034 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lld/lld-release_80-r356034 X-SVN-Commit-Revision: 345149 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5EF368E927 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 19:41:44 -0000 Author: dim Date: Thu Mar 14 19:41:31 2019 New Revision: 345149 URL: https://svnweb.freebsd.org/changeset/base/345149 Log: Tag lld release_80 branch r356034. Added: vendor/lld/lld-release_80-r356034/ - copied from r345148, vendor/lld/dist-release_80/ From owner-svn-src-all@freebsd.org Thu Mar 14 19:48:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 763DA1529BCE; Thu, 14 Mar 2019 19:48:44 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A3E18F7BF; Thu, 14 Mar 2019 19:48:44 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 07F232722B; Thu, 14 Mar 2019 19:48:44 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EJmh5e075111; Thu, 14 Mar 2019 19:48:43 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EJmhvY075110; Thu, 14 Mar 2019 19:48:43 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201903141948.x2EJmhvY075110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 14 Mar 2019 19:48:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345151 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 345151 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1A3E18F7BF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 19:48:44 -0000 Author: kevans Date: Thu Mar 14 19:48:43 2019 New Revision: 345151 URL: https://svnweb.freebsd.org/changeset/base/345151 Log: ether_fakeaddr: Use 'b' 's' 'd' for the prefix This has the advantage of being obvious to sniff out the designated prefix by eye and it has all the right bits set. Comment stolen from ffec. I've removed bryanv@'s pending question of using the FreeBSD OUI range -- no one has followed up on this with a definitive action, and there's no particular reason to shoot for it and the administrative overhead that comes with deciding exactly how to use it. Modified: head/sys/net/if_ethersubr.c Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Thu Mar 14 19:41:34 2019 (r345150) +++ head/sys/net/if_ethersubr.c Thu Mar 14 19:48:43 2019 (r345151) @@ -1406,13 +1406,14 @@ ether_fakeaddr(struct ether_addr *hwaddr) { /* - * Generate a non-multicast, locally administered address. - * - * BMV: Should we use the FreeBSD OUI range instead? + * Generate a convenient locally administered address, + * 'bsd' + random 24 low-order bits. 'b' is 0x62, which has the locally + * assigned bit set, and the broadcast/multicast bit clear. */ arc4rand(hwaddr->octet, ETHER_ADDR_LEN, 1); - hwaddr->octet[0] &= ~1; - hwaddr->octet[0] |= 2; + hwaddr->octet[0] = 'b'; + hwaddr->octet[1] = 's'; + hwaddr->octet[2] = 'd'; } DECLARE_MODULE(ether, ether_mod, SI_SUB_INIT_IF, SI_ORDER_ANY); From owner-svn-src-all@freebsd.org Thu Mar 14 19:52:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4CD91529EC8; Thu, 14 Mar 2019 19:52:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 610638FCAD; Thu, 14 Mar 2019 19:52:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 48228273B4; Thu, 14 Mar 2019 19:52:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EJqDji080097; Thu, 14 Mar 2019 19:52:13 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EJqC3F080093; Thu, 14 Mar 2019 19:52:12 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903141952.x2EJqC3F080093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 14 Mar 2019 19:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345152 - in head: contrib/llvm/tools/clang/lib/AST lib/clang/include/clang/Basic lib/clang/include/lld/Common lib/clang/include/llvm/Support X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: contrib/llvm/tools/clang/lib/AST lib/clang/include/clang/Basic lib/clang/include/lld/Common lib/clang/include/llvm/Support X-SVN-Commit-Revision: 345152 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 610638FCAD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 19:52:14 -0000 Author: dim Date: Thu Mar 14 19:52:12 2019 New Revision: 345152 URL: https://svnweb.freebsd.org/changeset/base/345152 Log: Merge llvm, clang, compiler-rt, libc++, libunwind, lld, and lldb release_80 branch r356034 (effectively, 8.0.0 rc5), resolve conflicts, and bump version numbers. PR: 236062 MFC after: 1 month X-MFC-With: r344779 Modified: head/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/lld/Common/Version.inc head/lib/clang/include/llvm/Support/VCSRevision.h Directory Properties: head/contrib/compiler-rt/ (props changed) head/contrib/libc++/ (props changed) head/contrib/libunwind/ (props changed) head/contrib/llvm/ (props changed) head/contrib/llvm/tools/clang/ (props changed) head/contrib/llvm/tools/lld/ (props changed) head/contrib/llvm/tools/lldb/ (props changed) Modified: head/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp Thu Mar 14 19:48:43 2019 (r345151) +++ head/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp Thu Mar 14 19:52:12 2019 (r345152) @@ -10985,6 +10985,7 @@ bool Expr::EvaluateAsConstantExpr(EvalResult &Result, const ASTContext &Ctx) const { EvalInfo::EvaluationMode EM = EvalInfo::EM_ConstantExpression; EvalInfo Info(Ctx, Result, EM); + Info.InConstantContext = true; if (!::Evaluate(Result.Val, Info, this)) return false; @@ -11625,6 +11626,7 @@ bool Expr::EvaluateWithSubstitution(APValue &Value, AS const Expr *This) const { Expr::EvalStatus Status; EvalInfo Info(Ctx, Status, EvalInfo::EM_ConstantExpressionUnevaluated); + Info.InConstantContext = true; LValue ThisVal; const LValue *ThisPtr = nullptr; @@ -11708,6 +11710,7 @@ bool Expr::isPotentialConstantExprUnevaluated(Expr *E, EvalInfo Info(FD->getASTContext(), Status, EvalInfo::EM_PotentialConstantExpressionUnevaluated); + Info.InConstantContext = true; // Fabricate a call stack frame to give the arguments a plausible cover story. ArrayRef Args; Modified: head/lib/clang/include/clang/Basic/Version.inc ============================================================================== --- head/lib/clang/include/clang/Basic/Version.inc Thu Mar 14 19:48:43 2019 (r345151) +++ head/lib/clang/include/clang/Basic/Version.inc Thu Mar 14 19:52:12 2019 (r345152) @@ -8,4 +8,4 @@ #define CLANG_VENDOR "FreeBSD " -#define SVN_REVISION "355677" +#define SVN_REVISION "356034" Modified: head/lib/clang/include/lld/Common/Version.inc ============================================================================== --- head/lib/clang/include/lld/Common/Version.inc Thu Mar 14 19:48:43 2019 (r345151) +++ head/lib/clang/include/lld/Common/Version.inc Thu Mar 14 19:52:12 2019 (r345152) @@ -7,4 +7,4 @@ #define LLD_REPOSITORY_STRING "FreeBSD" // - -#define LLD_REVISION_STRING "355677-1300002" +#define LLD_REVISION_STRING "356034-1300002" Modified: head/lib/clang/include/llvm/Support/VCSRevision.h ============================================================================== --- head/lib/clang/include/llvm/Support/VCSRevision.h Thu Mar 14 19:48:43 2019 (r345151) +++ head/lib/clang/include/llvm/Support/VCSRevision.h Thu Mar 14 19:52:12 2019 (r345152) @@ -1,2 +1,2 @@ /* $FreeBSD$ */ -#define LLVM_REVISION "svn-r355677" +#define LLVM_REVISION "svn-r356034" From owner-svn-src-all@freebsd.org Thu Mar 14 20:09:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C457152A8E5; Thu, 14 Mar 2019 20:09:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B883069D93; Thu, 14 Mar 2019 20:09:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 916252759C; Thu, 14 Mar 2019 20:09:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EK9BcO085846; Thu, 14 Mar 2019 20:09:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EK9BLG085843; Thu, 14 Mar 2019 20:09:11 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903142009.x2EK9BLG085843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 14 Mar 2019 20:09:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r345153 - in vendor/llvm-openmp: . dist dist/runtime dist/runtime/src dist/runtime/src/i18n dist/runtime/src/include dist/runtime/src/include/30 dist/runtime/src/include/40 dist/runtime... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/llvm-openmp: . dist dist/runtime dist/runtime/src dist/runtime/src/i18n dist/runtime/src/include dist/runtime/src/include/30 dist/runtime/src/include/40 dist/runtime/src/include/45 dist/runt... X-SVN-Commit-Revision: 345153 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B883069D93 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 20:09:12 -0000 Author: dim Date: Thu Mar 14 20:09:10 2019 New Revision: 345153 URL: https://svnweb.freebsd.org/changeset/base/345153 Log: Vendor import of LLVM openmp trunk r351319 (just before the release_80 branch point): https://llvm.org/svn/llvm-project/openmp/trunk@351319 Added: vendor/llvm-openmp/ vendor/llvm-openmp/dist/ vendor/llvm-openmp/dist/CREDITS.txt (contents, props changed) vendor/llvm-openmp/dist/LICENSE.txt (contents, props changed) vendor/llvm-openmp/dist/runtime/ vendor/llvm-openmp/dist/runtime/src/ vendor/llvm-openmp/dist/runtime/src/dllexports vendor/llvm-openmp/dist/runtime/src/exports_so.txt (contents, props changed) vendor/llvm-openmp/dist/runtime/src/extractExternal.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/i18n/ vendor/llvm-openmp/dist/runtime/src/i18n/en_US.txt (contents, props changed) vendor/llvm-openmp/dist/runtime/src/include/ vendor/llvm-openmp/dist/runtime/src/include/30/ vendor/llvm-openmp/dist/runtime/src/include/30/omp.h.var vendor/llvm-openmp/dist/runtime/src/include/30/omp_lib.f.var vendor/llvm-openmp/dist/runtime/src/include/30/omp_lib.f90.var vendor/llvm-openmp/dist/runtime/src/include/30/omp_lib.h.var vendor/llvm-openmp/dist/runtime/src/include/40/ vendor/llvm-openmp/dist/runtime/src/include/40/omp.h.var vendor/llvm-openmp/dist/runtime/src/include/40/omp_lib.f.var vendor/llvm-openmp/dist/runtime/src/include/40/omp_lib.f90.var vendor/llvm-openmp/dist/runtime/src/include/40/omp_lib.h.var vendor/llvm-openmp/dist/runtime/src/include/45/ vendor/llvm-openmp/dist/runtime/src/include/45/omp.h.var vendor/llvm-openmp/dist/runtime/src/include/45/omp_lib.f.var vendor/llvm-openmp/dist/runtime/src/include/45/omp_lib.f90.var vendor/llvm-openmp/dist/runtime/src/include/45/omp_lib.h.var vendor/llvm-openmp/dist/runtime/src/include/50/ vendor/llvm-openmp/dist/runtime/src/include/50/omp-tools.h.var vendor/llvm-openmp/dist/runtime/src/include/50/omp.h.var vendor/llvm-openmp/dist/runtime/src/include/50/omp_lib.f.var vendor/llvm-openmp/dist/runtime/src/include/50/omp_lib.f90.var vendor/llvm-openmp/dist/runtime/src/include/50/omp_lib.h.var vendor/llvm-openmp/dist/runtime/src/kmp.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_affinity.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_affinity.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_alloc.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_atomic.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_atomic.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_barrier.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_cancel.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_config.h.cmake vendor/llvm-openmp/dist/runtime/src/kmp_csupport.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_debug.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_debug.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_debugger.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_debugger.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_dispatch.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_dispatch.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_dispatch_hier.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_environment.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_environment.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_error.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_error.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_ftn_cdecl.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_ftn_entry.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_ftn_extra.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_ftn_os.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_ftn_stdcall.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_global.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_gsupport.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_i18n.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_i18n.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_import.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_io.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_io.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_itt.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_itt.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_itt.inl vendor/llvm-openmp/dist/runtime/src/kmp_lock.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_lock.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_omp.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_os.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_platform.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_runtime.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_safe_c_api.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_sched.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_settings.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_settings.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_stats.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_stats.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_stats_timing.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_stats_timing.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_str.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_str.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_stub.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_stub.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_taskdeps.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_taskdeps.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_tasking.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_taskq.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_threadprivate.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_utility.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_version.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_version.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_wait_release.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_wait_release.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_wrapper_getpid.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/kmp_wrapper_malloc.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/libomp.rc.var vendor/llvm-openmp/dist/runtime/src/ompt-event-specific.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/ompt-general.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/ompt-internal.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/ompt-specific.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/ompt-specific.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/test-touch.c (contents, props changed) vendor/llvm-openmp/dist/runtime/src/thirdparty/ vendor/llvm-openmp/dist/runtime/src/thirdparty/ittnotify/ vendor/llvm-openmp/dist/runtime/src/thirdparty/ittnotify/disable_warnings.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/thirdparty/ittnotify/ittnotify.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/thirdparty/ittnotify/ittnotify_config.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/thirdparty/ittnotify/ittnotify_static.c (contents, props changed) vendor/llvm-openmp/dist/runtime/src/thirdparty/ittnotify/ittnotify_static.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/thirdparty/ittnotify/ittnotify_types.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/thirdparty/ittnotify/legacy/ vendor/llvm-openmp/dist/runtime/src/thirdparty/ittnotify/legacy/ittnotify.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/tsan_annotations.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/tsan_annotations.h (contents, props changed) vendor/llvm-openmp/dist/runtime/src/z_Linux_asm.S (contents, props changed) vendor/llvm-openmp/dist/runtime/src/z_Linux_util.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/z_Windows_NT-586_asm.asm vendor/llvm-openmp/dist/runtime/src/z_Windows_NT-586_util.cpp (contents, props changed) vendor/llvm-openmp/dist/runtime/src/z_Windows_NT_util.cpp (contents, props changed) Added: vendor/llvm-openmp/dist/CREDITS.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm-openmp/dist/CREDITS.txt Thu Mar 14 20:09:10 2019 (r345153) @@ -0,0 +1,61 @@ +This file is a partial list of people who have contributed to the LLVM/openmp +project. If you have contributed a patch or made some other contribution to +LLVM/openmp, please submit a patch to this file to add yourself, and it will be +done! + +The list is sorted by surname and formatted to allow easy grepping and +beautification by scripts. The fields are: name (N), email (E), web-address +(W), PGP key ID and fingerprint (P), description (D), and snail-mail address +(S). + +N: Adam Azarchs +W: 10xgenomics.com +D: Bug fix for lock code + +N: Carlo Bertolli +W: http://ibm.com +D: IBM contributor to PowerPC support in CMake files and elsewhere. + +N: Diego Caballero +E: diego.l.caballero@gmail.com +D: Fork performance improvements + +N: Sunita Chandrasekaran +D: Contributor to testsuite from OpenUH + +N: Barbara Chapman +D: Contributor to testsuite from OpenUH + +N: University of Houston +W: http://web.cs.uh.edu/~openuh/download/ +D: OpenUH test suite + +N: Intel Corporation OpenMP runtime team +W: http://openmprtl.org +D: Created the runtime. + +N: John Mellor-Crummey and other members of the OpenMP Tools Working Group +E: johnmc@rice.edu +D: OpenMP Tools Interface (OMPT) + +N: Matthias Muller +D: Contributor to testsuite from OpenUH + +N: Tal Nevo +E: tal@scalemp.com +D: ScaleMP contributor to improve runtime performance there. +W: http://scalemp.com + +N: Pavel Neytchev +D: Contributor to testsuite from OpenUH + +N: Steven Noonan +E: steven@uplinklabs.net +D: Patches for the ARM architecture and removal of several inconsistencies. + +N: Alp Toker +E: alp@nuanti.com +D: Making build work for FreeBSD. + +N: Cheng Wang +D: Contributor to testsuite from OpenUH Added: vendor/llvm-openmp/dist/LICENSE.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm-openmp/dist/LICENSE.txt Thu Mar 14 20:09:10 2019 (r345153) @@ -0,0 +1,174 @@ +============================================================================== + +The software contained in this directory tree is dual licensed under both the +University of Illinois "BSD-Like" license and the MIT license. As a user of +this code you may choose to use it under either license. As a contributor, +you agree to allow your code to be used under both. The full text of the +relevant licenses is included below. + +In addition, a license agreement from the copyright/patent holders of the +software contained in this directory tree is included below. + +============================================================================== + +University of Illinois/NCSA +Open Source License + +Copyright (c) 1997-2019 Intel Corporation + +All rights reserved. + +Developed by: + OpenMP Runtime Team + Intel Corporation + http://www.openmprtl.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of Intel Corporation OpenMP Runtime Team nor the + names of its contributors may be used to endorse or promote products + derived from this Software without specific prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +============================================================================== + +Copyright (c) 1997-2019 Intel Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +============================================================================== + +Intel Corporation + +Software Grant License Agreement ("Agreement") + +Except for the license granted herein to you, Intel Corporation ("Intel") reserves +all right, title, and interest in and to the Software (defined below). + +Definition + +"Software" means the code and documentation as well as any original work of +authorship, including any modifications or additions to an existing work, that +is intentionally submitted by Intel to llvm.org (http://llvm.org) ("LLVM") for +inclusion in, or documentation of, any of the products owned or managed by LLVM +(the "Work"). For the purposes of this definition, "submitted" means any form of +electronic, verbal, or written communication sent to LLVM or its +representatives, including but not limited to communication on electronic +mailing lists, source code control systems, and issue tracking systems that are +managed by, or on behalf of, LLVM for the purpose of discussing and improving +the Work, but excluding communication that is conspicuously marked otherwise. + +1. Grant of Copyright License. Subject to the terms and conditions of this + Agreement, Intel hereby grants to you and to recipients of the Software + distributed by LLVM a perpetual, worldwide, non-exclusive, no-charge, + royalty-free, irrevocable copyright license to reproduce, prepare derivative + works of, publicly display, publicly perform, sublicense, and distribute the + Software and such derivative works. + +2. Grant of Patent License. Subject to the terms and conditions of this + Agreement, Intel hereby grants you and to recipients of the Software + distributed by LLVM a perpetual, worldwide, non-exclusive, no-charge, + royalty-free, irrevocable (except as stated in this section) patent license + to make, have made, use, offer to sell, sell, import, and otherwise transfer + the Work, where such license applies only to those patent claims licensable + by Intel that are necessarily infringed by Intel's Software alone or by + combination of the Software with the Work to which such Software was + submitted. If any entity institutes patent litigation against Intel or any + other entity (including a cross-claim or counterclaim in a lawsuit) alleging + that Intel's Software, or the Work to which Intel has contributed constitutes + direct or contributory patent infringement, then any patent licenses granted + to that entity under this Agreement for the Software or Work shall terminate + as of the date such litigation is filed. + +Unless required by applicable law or agreed to in writing, the software is +provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +either express or implied, including, without limitation, any warranties or +conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. + +============================================================================== + +ARM Limited + +Software Grant License Agreement ("Agreement") + +Except for the license granted herein to you, ARM Limited ("ARM") reserves all +right, title, and interest in and to the Software (defined below). + +Definition + +"Software" means the code and documentation as well as any original work of +authorship, including any modifications or additions to an existing work, that +is intentionally submitted by ARM to llvm.org (http://llvm.org) ("LLVM") for +inclusion in, or documentation of, any of the products owned or managed by LLVM +(the "Work"). For the purposes of this definition, "submitted" means any form of +electronic, verbal, or written communication sent to LLVM or its +representatives, including but not limited to communication on electronic +mailing lists, source code control systems, and issue tracking systems that are +managed by, or on behalf of, LLVM for the purpose of discussing and improving +the Work, but excluding communication that is conspicuously marked otherwise. + +1. Grant of Copyright License. Subject to the terms and conditions of this + Agreement, ARM hereby grants to you and to recipients of the Software + distributed by LLVM a perpetual, worldwide, non-exclusive, no-charge, + royalty-free, irrevocable copyright license to reproduce, prepare derivative + works of, publicly display, publicly perform, sublicense, and distribute the + Software and such derivative works. + +2. Grant of Patent License. Subject to the terms and conditions of this + Agreement, ARM hereby grants you and to recipients of the Software + distributed by LLVM a perpetual, worldwide, non-exclusive, no-charge, + royalty-free, irrevocable (except as stated in this section) patent license + to make, have made, use, offer to sell, sell, import, and otherwise transfer + the Work, where such license applies only to those patent claims licensable + by ARM that are necessarily infringed by ARM's Software alone or by + combination of the Software with the Work to which such Software was + submitted. If any entity institutes patent litigation against ARM or any + other entity (including a cross-claim or counterclaim in a lawsuit) alleging + that ARM's Software, or the Work to which ARM has contributed constitutes + direct or contributory patent infringement, then any patent licenses granted + to that entity under this Agreement for the Software or Work shall terminate + as of the date such litigation is filed. + +Unless required by applicable law or agreed to in writing, the software is +provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +either express or implied, including, without limitation, any warranties or +conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. + +============================================================================== Added: vendor/llvm-openmp/dist/runtime/src/dllexports ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm-openmp/dist/runtime/src/dllexports Thu Mar 14 20:09:10 2019 (r345153) @@ -0,0 +1,1215 @@ +# +#//===----------------------------------------------------------------------===// +#// +#// The LLVM Compiler Infrastructure +#// +#// This file is dual licensed under the MIT and the University of Illinois Open +#// Source Licenses. See LICENSE.txt for details. +#// +#//===----------------------------------------------------------------------===// +# + +# Deprecated entry points (numbers are reserved): +- __kmpc_barrier_reduce_master 109 +- __kmpc_end_barrier_reduce_master 122 +- __kmpc_for_init_4 131 +- __kmpc_for_init_8 132 +- __kmpc_for_next_4 133 +- __kmpc_for_next_8 134 +- __kmpc_fork_call_bound 139 +- __kmpc_reduce_master_nowait 149 +- __kmpc_omp_task_begin 194 +- __kmpc_omp_task_complete 195 +- kmpc_sharable_calloc 218 +- kmpc_sharable_free 219 +- kmpc_sharable_malloc 220 +- kmpc_sharable_realloc 221 +- kmpc_aligned_sharable_malloc 223 +- mpai4a 500 +- mpai8a 501 +- mpar4a 502 +- mpar8a 503 +- mpax4x 504 +- mpax8x 505 +- mpobar 506 +- mpoebr 507 +- mpofork 508 +- mpofrk 509 +- mpojoin 510 +- mpoxbr 511 +- mppadj 512 +- mppaff 513 +- mppbar 514 +- mppbeg 515 +- mppdeo 516 +- mppdnx 517 +- mppdnxd 518 +- mppdon 519 +- mppdxo 520 +- mppebr 521 +- mppecs 522 +- mppems 523 +- mppenc 524 +- mppend 525 +- mppepa 526 +- mppesp 527 +- mppfkd 528 +- mppfkt 529 +- mppfork 530 +- mppfrk 531 +- mppioa 532 +- mppiws 533 +- mppjoin 534 +- mppnth 535 +- mpppqa 536 +- mpppqc 537 +- mpppqs 538 +- mpptid 539 +- mpptpa 540 +- mpptpc 541 +- mpptpz 542 +- mppvsy 543 +- mppxbr 544 +- mppxcs 545 +- mppxms 546 +- mppxnc 547 +- mppxpa 548 +- mppxpr 549 +- mppxsp 550 +- mppxth 551 +- mpsbar 552 +- mpscpr 597 +- mpsebr 553 +- mpserd 554 +- mpsfd4 555 +- mpsfd8 556 +- mpsid4 557 +- mpsid8 558 +- mpsnd4 559 +- mpsnd8 560 +- mpsont 561 +- mpsred 562 +- mpsunt 563 +- mpsxbr 564 +- mpsxrd 565 +- mptadj 566 +- mptaff 567 +- mptbar 568 +- mptdeo 569 +- mptdin 570 +- mptdind 571 +- mptdnx 572 +- mptdnxd 573 +- mptdon 574 +- mptdxo 575 +- mptebr 576 +- mptecs 577 +- mptems 578 +- mptenc 579 +- mptepa 580 +- mptesp 581 +- mptfkd 582 +- mptppa 583 +- mptppc 584 +- mptpps 585 +- mpttpa 586 +- mpttpc 587 +- mpttpz 588 +- mptvsy 589 +- mptxbr 590 +- mptxcs 591 +- mptxms 592 +- mptxnc 593 +- mptxpa 594 +- mptxsp 595 +- mppcpr 596 +- ftn_set_library_gang 736 +- kmp_set_library_gang +- kmp_sharable_calloc 760 +- kmp_sharable_free 761 +- kmp_sharable_malloc 762 +- kmp_sharable_realloc 763 +- kmp_aligned_sharable_malloc 764 +- kmp_deferred_atomic_add_i4 765 +- kmp_deferred_atomic_add_i8 766 +- kmp_deferred_atomic_add_r4 767 +- kmp_deferred_atomic_add_r8 768 +- kmp_lock_cond_wait 770 +- kmp_lock_cond_signal 771 +- kmp_lock_cond_broadcast 772 +- kmp_nest_lock_cond_wait 773 +- kmp_nest_lock_cond_signal 774 +- kmp_nest_lock_cond_broadcast 775 +- kmp_get_process_num 781 +- kmp_get_num_processes 782 +- kmp_get_process_thread_num 783 +- kmp_private_mmap 784 # not implemented? +- kmp_sharable_mmap 785 # not implemented? +- kmp_private_munmap 786 # not implemented? +- kmp_sharable_munmap 787 # not implemented? +- kmp_is_sharable 788 # not implemented? + +%ifndef stub + + + # + # The following entry points are added so that the backtraces from + # the tools contain meaningful names for all the functions that might + # appear in a backtrace of a thread which is blocked in the RTL. + # + + # Regular entry points + __kmp_wait_yield_4 + __kmp_fork_call + __kmp_invoke_microtask + %ifdef KMP_USE_MONITOR + __kmp_launch_monitor + __kmp_reap_monitor + %endif + __kmp_launch_worker + __kmp_reap_worker + __kmp_acquire_tas_lock + __kmp_acquire_nested_tas_lock + __kmp_acquire_ticket_lock + __kmp_acquire_nested_ticket_lock + __kmp_acquire_queuing_lock + __kmp_acquire_nested_queuing_lock + __kmp_acquire_drdpa_lock + __kmp_acquire_nested_drdpa_lock + + %ifdef KMP_DEBUG + # allows console output capability for applications those don't have it + __kmp_printf + %endif + + + %ifdef USE_DEBUGGER + __kmp_debugging DATA + __kmp_omp_debug_struct_info DATA + %endif + + # Symbols for MS mutual detection: + _You_must_link_with_exactly_one_OpenMP_library DATA + _You_must_link_with_Intel_OpenMP_library DATA + %ifdef msvc_compat + _You_must_link_with_Microsoft_OpenMP_library DATA + %endif + + __kmp_wait_64 + __kmp_release_64 + + +# VT_getthid 1 +# vtgthid 2 + + __kmpc_atomic_4 100 + __kmpc_atomic_8 101 + __kmpc_atomic_fixed4_add 102 + __kmpc_atomic_fixed8_add 103 + __kmpc_atomic_float4_add 104 + __kmpc_atomic_float8_add 105 + __kmpc_barrier 106 + __kmpc_barrier_master 107 + __kmpc_barrier_master_nowait 108 + __kmpc_begin 110 + __kmpc_bound_num_threads 111 + __kmpc_bound_thread_num 112 + __kmpc_critical 113 + __kmpc_dispatch_fini_4 114 + __kmpc_dispatch_fini_8 115 + __kmpc_dispatch_init_4 116 + __kmpc_dispatch_init_8 117 + __kmpc_dispatch_next_4 118 + __kmpc_dispatch_next_8 119 + __kmpc_end 120 + __kmpc_end_barrier_master 121 + __kmpc_end_critical 123 + __kmpc_end_master 124 + __kmpc_end_ordered 125 + __kmpc_end_serialized_parallel 126 + __kmpc_end_single 127 + __kmpc_end_taskq 128 + __kmpc_end_taskq_task 129 + __kmpc_flush 130 + __kmpc_for_static_fini 135 + __kmpc_for_static_init_4 136 + __kmpc_for_static_init_8 137 + __kmpc_fork_call 138 + __kmpc_global_num_threads 140 + __kmpc_global_thread_num 141 + __kmpc_in_parallel 142 + __kmpc_invoke_task_func 143 + __kmpc_master 144 + __kmpc_ok_to_fork 145 + __kmpc_ordered 146 + __kmpc_pop_num_threads 147 + __kmpc_push_num_threads 148 + __kmpc_serialized_parallel 150 + __kmpc_single 151 + __kmpc_task 152 + __kmpc_task_buffer 153 + __kmpc_taskq 154 + __kmpc_taskq_task 155 + __kmpc_threadprivate 156 + __kmpc_threadprivate_cached 157 + __kmpc_threadprivate_register 158 + __kmpc_threadprivate_register_vec 159 +# __kmpc_ssp_begin 160 +# __kmpc_ssp_fork 161 +# __kmpc_ssp_end 162 +# __kmpc_ssp_post_4 163 +# __kmpc_ssp_post_8 164 +# __kmpc_ssp_wait_4 165 +# __kmpc_ssp_wait_8 166 +# __kmpc_ssp_distance_4 167 +# __kmpc_ssp_distance_8 168 +# __kmpc_in_ssp 169 +# __kmpc_ssp_thread_num 170 +# __kmpc_ssp_num_threads 171 + __kmpc_copyprivate 172 +# __kmpc_ssp_get_max_threads 173 +# __kmpc_ssp_set_max_threads 174 + __kmpc_init_lock 175 + __kmpc_destroy_lock 176 + __kmpc_set_lock 177 + __kmpc_unset_lock 178 + __kmpc_test_lock 179 + __kmpc_init_nest_lock 180 + __kmpc_destroy_nest_lock 181 + __kmpc_set_nest_lock 182 + __kmpc_unset_nest_lock 183 + __kmpc_test_nest_lock 184 +# __kmpc_ssp_init_thread 185 +# __kmpc_ssp_set_event 186 + __kmpc_reduce_nowait 187 + __kmpc_end_reduce_nowait 188 + __kmpc_reduce 189 + __kmpc_end_reduce 190 + +# OpenMP 3.0 + +%ifdef OMP_30 + __kmpc_omp_task_alloc 191 + __kmpc_omp_task 192 + __kmpc_omp_taskwait 193 + __kmpc_omp_task_begin_if0 196 + __kmpc_omp_task_complete_if0 197 + __kmpc_omp_task_parts 198 +%endif # OMP_30 + +# __omp_collector_api 199 + + # These functions are for testing purposes. There is no need in stable ordinal number: + __kmp_get_reduce_method + +%endif # not defined stub + +kmpc_calloc 200 +kmpc_free 201 +%ifndef stub + # These functions are exported from libguide, but declared neither in omp.h not in omp_lib.h. +# kmpc_get_banner 202 +# kmpc_get_poolmode 203 +# kmpc_get_poolsize 204 +# kmpc_get_poolstat 205 +# kmpc_poolprint 207 +# kmpc_print_banner 208 +# kmpc_set_poolmode 214 +# kmpc_set_poolsize 215 +%endif +kmpc_malloc 206 +kmpc_realloc 209 +kmpc_set_blocktime 211 +kmpc_set_library 212 +# kmpc_set_parallel_name 213 +kmpc_set_stacksize 216 +kmpc_set_stacksize_s 222 +# kmpc_set_stats 217 +kmpc_set_defaults 224 + +# OMP 3.0 entry points for unsigned loop iteration variables +%ifndef stub + %ifdef OMP_30 + __kmpc_for_static_init_8u 225 + __kmpc_dispatch_init_8u 226 + __kmpc_dispatch_next_8u 227 + __kmpc_dispatch_fini_8u 228 + __kmpc_for_static_init_4u 229 + __kmpc_dispatch_init_4u 230 + __kmpc_dispatch_next_4u 231 + __kmpc_dispatch_fini_4u 232 + %endif # OMP_30 +%endif + +%ifndef stub + __kmpc_get_taskid 233 + __kmpc_get_parent_taskid 234 +%endif + +# OpenMP 3.1 entry points +%ifndef stub + %ifdef OMP_30 + __kmpc_omp_taskyield 235 + %endif # OMP_30 +# __kmpc_place_threads 236 +%endif + +# OpenMP 4.0 entry points +%ifndef stub + %ifdef OMP_40 + __kmpc_push_proc_bind 237 + __kmpc_taskgroup 238 + __kmpc_end_taskgroup 239 + __kmpc_push_num_teams 240 + __kmpc_fork_teams 241 + __kmpc_omp_task_with_deps 242 + __kmpc_omp_wait_deps 243 + __kmpc_cancel 244 + __kmpc_cancellationpoint 245 + __kmpc_cancel_barrier 246 + __kmpc_dist_for_static_init_4 247 + __kmpc_dist_for_static_init_4u 248 + __kmpc_dist_for_static_init_8 249 + __kmpc_dist_for_static_init_8u 250 + __kmpc_dist_dispatch_init_4 251 + __kmpc_dist_dispatch_init_4u 252 + __kmpc_dist_dispatch_init_8 253 + __kmpc_dist_dispatch_init_8u 254 + __kmpc_team_static_init_4 255 + __kmpc_team_static_init_4u 256 + __kmpc_team_static_init_8 257 + __kmpc_team_static_init_8u 258 + %endif # OMP_40 +%endif + +# OpenMP 4.5 entry points +%ifndef stub + %ifdef OMP_45 + __kmpc_proxy_task_completed 259 + __kmpc_proxy_task_completed_ooo 260 + __kmpc_doacross_init 261 + __kmpc_doacross_wait 262 + __kmpc_doacross_post 263 + __kmpc_doacross_fini 264 + __kmpc_taskloop 266 + __kmpc_critical_with_hint 270 + %endif +%endif +kmpc_aligned_malloc 265 +kmpc_set_disp_num_buffers 267 + +# OpenMP 5.0 entry points +%ifndef stub + %ifdef OMP_50 + __kmpc_task_reduction_init 268 + __kmpc_task_reduction_get_th_data 269 +# USED FOR 4.5 __kmpc_critical_with_hint 270 + __kmpc_get_target_offload 271 + __kmpc_omp_reg_task_with_affinity 272 + %endif +%endif + +# User API entry points that have both lower- and upper- case versions for Fortran. +# Number for lowercase version is indicated. Number for uppercase is obtained by adding 1000. +# User API entry points are entry points that start with 'kmp_' or 'omp_'. + +omp_destroy_lock 700 +omp_destroy_nest_lock 701 +omp_get_dynamic 702 +omp_get_max_threads 703 +omp_get_nested 704 +omp_get_num_procs 705 +omp_get_num_threads 706 +omp_get_thread_num 707 +omp_get_wtick 708 +omp_get_wtime 709 +omp_in_parallel 710 +omp_init_lock 711 +omp_init_nest_lock 712 +omp_set_dynamic 713 +omp_set_lock 714 +omp_set_nest_lock 715 +omp_set_nested 716 +omp_set_num_threads 717 +omp_test_lock 718 +omp_test_nest_lock 719 +omp_unset_lock 720 +omp_unset_nest_lock 721 + +ompc_set_dynamic 722 +ompc_set_nested 723 +ompc_set_num_threads 724 + +kmp_calloc 725 +kmp_free 726 +kmp_get_blocktime 727 +kmp_get_library 728 +kmp_get_stacksize 729 +kmp_malloc 730 +#kmp_print_banner 731 +kmp_realloc 732 +kmp_set_blocktime 734 +kmp_set_library 735 +kmp_set_library_serial 737 +kmp_set_library_throughput 738 +kmp_set_library_turnaround 739 +# kmp_set_parallel_name 740 +kmp_set_stacksize 741 +# kmp_set_stats 742 +kmp_get_num_known_threads 743 +kmp_set_stacksize_s 744 +kmp_get_stacksize_s 745 +kmp_set_defaults 746 +kmp_aligned_malloc 747 +kmp_set_warnings_on 779 +kmp_set_warnings_off 780 + +%ifdef OMP_30 + omp_get_active_level 789 + omp_get_level 790 + omp_get_ancestor_thread_num 791 + omp_get_team_size 792 + omp_get_thread_limit 793 + omp_get_max_active_levels 794 + omp_set_max_active_levels 795 + omp_get_schedule 796 + omp_set_schedule 797 + ompc_set_max_active_levels 798 + ompc_set_schedule 799 + ompc_get_ancestor_thread_num 800 + ompc_get_team_size 801 + kmp_set_affinity 850 + kmp_get_affinity 851 + kmp_get_affinity_max_proc 852 + kmp_create_affinity_mask 853 + kmp_destroy_affinity_mask 854 + kmp_set_affinity_mask_proc 855 + kmpc_set_affinity_mask_proc 856 + kmp_unset_affinity_mask_proc 857 + kmpc_unset_affinity_mask_proc 858 + kmp_get_affinity_mask_proc 859 + kmpc_get_affinity_mask_proc 860 +%endif # OMP_30 + +# OpenMP 3.1 + +%ifdef OMP_30 + omp_in_final 861 +%endif # OMP_30 + +# OpenMP 40 + +%ifdef OMP_40 + omp_get_proc_bind 862 + #omp_set_proc_bind 863 + #omp_curr_proc_bind 864 + omp_get_num_teams 865 + omp_get_team_num 866 + omp_get_cancellation 867 + kmp_get_cancellation_status 868 + omp_is_initial_device 869 + omp_set_default_device 879 + omp_get_default_device 880 + omp_get_num_devices 881 +%endif # OMP_40 + +# OpenMP 45 + +%ifdef OMP_45 + omp_init_lock_with_hint 870 + omp_init_nest_lock_with_hint 871 + omp_get_max_task_priority 872 + omp_get_num_places 873 + omp_get_place_num_procs 874 + omp_get_place_proc_ids 875 + omp_get_place_num 876 + omp_get_partition_num_places 877 + omp_get_partition_place_nums 878 + omp_get_initial_device 882 + %ifdef stub + omp_target_alloc 883 + omp_target_free 884 + omp_target_is_present 885 + omp_target_memcpy 886 + omp_target_memcpy_rect 887 + omp_target_associate_ptr 888 + omp_target_disassociate_ptr 889 + %endif +%endif # OMP_45 + +kmp_set_disp_num_buffers 890 + +%ifdef OMP_50 + omp_control_tool 891 + omp_set_default_allocator 892 + omp_get_default_allocator 893 + omp_alloc 894 + omp_free 895 + omp_get_device_num 896 + omp_set_affinity_format 748 + omp_get_affinity_format 749 + omp_display_affinity 750 + omp_capture_affinity 751 + ompc_set_affinity_format 752 + ompc_get_affinity_format 753 + ompc_display_affinity 754 + ompc_capture_affinity 755 + + OMP_NULL_ALLOCATOR DATA + omp_default_mem_alloc DATA + omp_large_cap_mem_alloc DATA + omp_const_mem_alloc DATA + omp_high_bw_mem_alloc DATA + omp_low_lat_mem_alloc DATA + omp_cgroup_mem_alloc DATA + omp_pteam_mem_alloc DATA + omp_thread_mem_alloc DATA +%endif # OMP_50 + +%ifndef stub + # Ordinals between 900 and 999 are reserved + + # Ordinals between 1000 and 1999 are reserved + # for user-callable uppercase Fortran entries. + + + # ATOMIC entries + + %ifdef HAVE_QUAD + __kmpc_atomic_cmplx16_div 2000 + %endif + + __kmpc_atomic_fixed1_add 2001 + __kmpc_atomic_fixed1_andb 2002 + __kmpc_atomic_fixed1_div 2003 + __kmpc_atomic_fixed1u_div 2004 + __kmpc_atomic_fixed1_mul 2005 + __kmpc_atomic_fixed1_orb 2006 + __kmpc_atomic_fixed1_shl 2007 + __kmpc_atomic_fixed1_shr 2008 + __kmpc_atomic_fixed1u_shr 2009 + __kmpc_atomic_fixed1_sub 2010 + __kmpc_atomic_fixed1_xor 2011 + + __kmpc_atomic_fixed2_add 2012 + __kmpc_atomic_fixed2_andb 2013 + __kmpc_atomic_fixed2_div 2014 + __kmpc_atomic_fixed2u_div 2015 + __kmpc_atomic_fixed2_mul 2016 + __kmpc_atomic_fixed2_orb 2017 + __kmpc_atomic_fixed2_shl 2018 + __kmpc_atomic_fixed2_shr 2019 + __kmpc_atomic_fixed2u_shr 2020 + __kmpc_atomic_fixed2_sub 2021 + __kmpc_atomic_fixed2_xor 2022 + + #__kmpc_atomic_fixed4_add # declared above #102 + __kmpc_atomic_fixed4_sub 2024 + #__kmpc_atomic_float4_add # declared above #104 + __kmpc_atomic_float4_sub 2026 + #__kmpc_atomic_fixed8_add # declared above #103 + __kmpc_atomic_fixed8_sub 2028 + #__kmpc_atomic_float8_add # declared above #105 + __kmpc_atomic_float8_sub 2030 + + __kmpc_atomic_fixed4_andb 2031 + __kmpc_atomic_fixed4_div 2032 + __kmpc_atomic_fixed4u_div 2033 + __kmpc_atomic_fixed4_mul 2034 + __kmpc_atomic_fixed4_orb 2035 + __kmpc_atomic_fixed4_shl 2036 + __kmpc_atomic_fixed4_shr 2037 + __kmpc_atomic_fixed4u_shr 2038 + __kmpc_atomic_fixed4_xor 2039 + __kmpc_atomic_fixed8_andb 2040 + __kmpc_atomic_fixed8_div 2041 + __kmpc_atomic_fixed8u_div 2042 + __kmpc_atomic_fixed8_mul 2043 + __kmpc_atomic_fixed8_orb 2044 + __kmpc_atomic_fixed8_shl 2045 + __kmpc_atomic_fixed8_shr 2046 + __kmpc_atomic_fixed8u_shr 2047 + __kmpc_atomic_fixed8_xor 2048 + __kmpc_atomic_float4_div 2049 + __kmpc_atomic_float4_mul 2050 + __kmpc_atomic_float8_div 2051 + __kmpc_atomic_float8_mul 2052 + + __kmpc_atomic_fixed1_andl 2053 + __kmpc_atomic_fixed1_orl 2054 + __kmpc_atomic_fixed2_andl 2055 + __kmpc_atomic_fixed2_orl 2056 + __kmpc_atomic_fixed4_andl 2057 + __kmpc_atomic_fixed4_orl 2058 + __kmpc_atomic_fixed8_andl 2059 + __kmpc_atomic_fixed8_orl 2060 + + __kmpc_atomic_fixed1_max 2061 + __kmpc_atomic_fixed1_min 2062 + __kmpc_atomic_fixed2_max 2063 + __kmpc_atomic_fixed2_min 2064 + __kmpc_atomic_fixed4_max 2065 + __kmpc_atomic_fixed4_min 2066 + __kmpc_atomic_fixed8_max 2067 + __kmpc_atomic_fixed8_min 2068 + __kmpc_atomic_float4_max 2069 + __kmpc_atomic_float4_min 2070 + __kmpc_atomic_float8_max 2071 + __kmpc_atomic_float8_min 2072 + + __kmpc_atomic_fixed1_neqv 2073 + __kmpc_atomic_fixed2_neqv 2074 + __kmpc_atomic_fixed4_neqv 2075 + __kmpc_atomic_fixed8_neqv 2076 + __kmpc_atomic_fixed1_eqv 2077 + __kmpc_atomic_fixed2_eqv 2078 + __kmpc_atomic_fixed4_eqv 2079 + __kmpc_atomic_fixed8_eqv 2080 + + __kmpc_atomic_float10_add 2081 + __kmpc_atomic_float10_sub 2082 + __kmpc_atomic_float10_mul 2083 + __kmpc_atomic_float10_div 2084 + + __kmpc_atomic_cmplx4_add 2085 + __kmpc_atomic_cmplx4_sub 2086 + __kmpc_atomic_cmplx4_mul 2087 + __kmpc_atomic_cmplx4_div 2088 + __kmpc_atomic_cmplx8_add 2089 + __kmpc_atomic_cmplx8_sub 2090 + __kmpc_atomic_cmplx8_mul 2091 + __kmpc_atomic_cmplx8_div 2092 + __kmpc_atomic_cmplx10_add 2093 + __kmpc_atomic_cmplx10_sub 2094 + __kmpc_atomic_cmplx10_mul 2095 + __kmpc_atomic_cmplx10_div 2096 + %ifdef HAVE_QUAD + __kmpc_atomic_cmplx16_add 2097 + __kmpc_atomic_cmplx16_sub 2098 + __kmpc_atomic_cmplx16_mul 2099 + #__kmpc_atomic_cmplx16_div 2000 # moved up because of mistake in number (supposed to be 2100) + + __kmpc_atomic_float16_add 2101 + __kmpc_atomic_float16_sub 2102 + __kmpc_atomic_float16_mul 2103 + __kmpc_atomic_float16_div 2104 + __kmpc_atomic_float16_max 2105 + __kmpc_atomic_float16_min 2106 + + __kmpc_atomic_fixed1_add_fp 2107 + __kmpc_atomic_fixed1_sub_fp 2108 + __kmpc_atomic_fixed1_mul_fp 2109 + __kmpc_atomic_fixed1_div_fp 2110 + __kmpc_atomic_fixed1u_div_fp 2111 + + __kmpc_atomic_fixed2_add_fp 2112 + __kmpc_atomic_fixed2_sub_fp 2113 + __kmpc_atomic_fixed2_mul_fp 2114 + __kmpc_atomic_fixed2_div_fp 2115 + __kmpc_atomic_fixed2u_div_fp 2116 + + __kmpc_atomic_fixed4_add_fp 2117 + __kmpc_atomic_fixed4_sub_fp 2118 + __kmpc_atomic_fixed4_mul_fp 2119 + __kmpc_atomic_fixed4_div_fp 2120 + __kmpc_atomic_fixed4u_div_fp 2121 + + __kmpc_atomic_fixed8_add_fp 2122 + __kmpc_atomic_fixed8_sub_fp 2123 + __kmpc_atomic_fixed8_mul_fp 2124 + __kmpc_atomic_fixed8_div_fp 2125 + __kmpc_atomic_fixed8u_div_fp 2126 + + __kmpc_atomic_float4_add_fp 2127 + __kmpc_atomic_float4_sub_fp 2128 + __kmpc_atomic_float4_mul_fp 2129 + __kmpc_atomic_float4_div_fp 2130 + + __kmpc_atomic_float8_add_fp 2131 + __kmpc_atomic_float8_sub_fp 2132 + __kmpc_atomic_float8_mul_fp 2133 + __kmpc_atomic_float8_div_fp 2134 + + __kmpc_atomic_float10_add_fp 2135 + __kmpc_atomic_float10_sub_fp 2136 + __kmpc_atomic_float10_mul_fp 2137 + __kmpc_atomic_float10_div_fp 2138 + %endif + + __kmpc_atomic_fixed1_mul_float8 2169 + __kmpc_atomic_fixed1_div_float8 2170 + + __kmpc_atomic_fixed2_mul_float8 2174 + __kmpc_atomic_fixed2_div_float8 2175 + + __kmpc_atomic_fixed4_mul_float8 2179 + __kmpc_atomic_fixed4_div_float8 2180 + + __kmpc_atomic_fixed8_mul_float8 2184 + __kmpc_atomic_fixed8_div_float8 2185 + + __kmpc_atomic_float4_add_float8 2187 + __kmpc_atomic_float4_sub_float8 2188 + __kmpc_atomic_float4_mul_float8 2189 + __kmpc_atomic_float4_div_float8 2190 + + __kmpc_atomic_cmplx4_add_cmplx8 2231 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Mar 14 20:10:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D206D152A9A5; Thu, 14 Mar 2019 20:10:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 724BE69F47; Thu, 14 Mar 2019 20:10:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B802275A1; Thu, 14 Mar 2019 20:10:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EKASjd085973; Thu, 14 Mar 2019 20:10:28 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EKAS5k085972; Thu, 14 Mar 2019 20:10:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903142010.x2EKAS5k085972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 14 Mar 2019 20:10:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r345154 - vendor/llvm-openmp/openmp-trunk-r351319 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-openmp/openmp-trunk-r351319 X-SVN-Commit-Revision: 345154 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 724BE69F47 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 20:10:29 -0000 Author: dim Date: Thu Mar 14 20:10:27 2019 New Revision: 345154 URL: https://svnweb.freebsd.org/changeset/base/345154 Log: Tag LLVM openmp trunk r351319 (just before the release_80 branch point). Added: vendor/llvm-openmp/openmp-trunk-r351319/ - copied from r345153, vendor/llvm-openmp/dist/ From owner-svn-src-all@freebsd.org Thu Mar 14 20:11:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6594152AA74; Thu, 14 Mar 2019 20:11:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B9426A16D; Thu, 14 Mar 2019 20:11:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 654AA27702; Thu, 14 Mar 2019 20:11:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EKBkM1086830; Thu, 14 Mar 2019 20:11:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EKBkBL086819; Thu, 14 Mar 2019 20:11:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903142011.x2EKBkBL086819@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 14 Mar 2019 20:11:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r345155 - vendor/llvm-openmp/dist-release_80 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-openmp/dist-release_80 X-SVN-Commit-Revision: 345155 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8B9426A16D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 20:11:47 -0000 Author: dim Date: Thu Mar 14 20:11:46 2019 New Revision: 345155 URL: https://svnweb.freebsd.org/changeset/base/345155 Log: Branch vendor/llvm-openmp/dist to vendor/llvm-openmp/dist-release_80, to allow for independent merges of the upstream trunk and release_80 branches. Added: vendor/llvm-openmp/dist-release_80/ - copied from r345153, vendor/llvm-openmp/dist/ From owner-svn-src-all@freebsd.org Thu Mar 14 20:14:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA736152AE24; Thu, 14 Mar 2019 20:14:20 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 88BB56A77E; Thu, 14 Mar 2019 20:14:20 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id C83A58D4A13E; Thu, 14 Mar 2019 20:14:17 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id C275CE708AD; Thu, 14 Mar 2019 20:14:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 5deJnCjYqtUV; Thu, 14 Mar 2019 20:14:15 +0000 (UTC) Received: from [192.168.2.110] (unknown [IPv6:fde9:577b:c1a9:31:2ef0:eeff:fe03:ee34]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 2C413E708AC; Thu, 14 Mar 2019 20:14:15 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Kyle Evans" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r345151 - head/sys/net Date: Thu, 14 Mar 2019 20:14:14 +0000 X-Mailer: MailMate (2.0BETAr6135) Message-ID: <51089C2A-A135-445E-B733-02654C5F8B68@lists.zabbadoz.net> In-Reply-To: <201903141948.x2EJmhvY075110@repo.freebsd.org> References: <201903141948.x2EJmhvY075110@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 88BB56A77E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 20:14:21 -0000 On 14 Mar 2019, at 19:48, Kyle Evans wrote: > Author: kevans > Date: Thu Mar 14 19:48:43 2019 > New Revision: 345151 > URL: https://svnweb.freebsd.org/changeset/base/345151 > > Log: > ether_fakeaddr: Use 'b' 's' 'd' for the prefix > > This has the advantage of being obvious to sniff out the designated > prefix > by eye and it has all the right bits set. Comment stolen from ffec. > > I've removed bryanv@'s pending question of using the FreeBSD OUI > range -- > no one has followed up on this with a definitive action, and there's > no > particular reason to shoot for it and the administrative overhead > that comes > with deciding exactly how to use it. Yay. iflib_gen_mac() has already thought kind-of similar and just took the entire(?) FreeBSD space for doing the same. That code should be merged as well. Bhyve is using a good chunk from the FreeBSD allocation; see sys/net/ieee_oui.h also for allocation guidelines (if I don’t misremember). The fact that it might need figuring out should not prevent us from doing it right .. the third time .. maybe .. this time? epair(4) is yet another one of the cloned interfaces which does magic for the ethernet addresses, not sure what else. /bz From owner-svn-src-all@freebsd.org Thu Mar 14 20:32:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8A7D152C91A; Thu, 14 Mar 2019 20:32:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 878616B5B5; Thu, 14 Mar 2019 20:32:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5368D27A9C; Thu, 14 Mar 2019 20:32:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EKWnFU001519; Thu, 14 Mar 2019 20:32:49 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EKWnSt001518; Thu, 14 Mar 2019 20:32:49 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903142032.x2EKWnSt001518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 14 Mar 2019 20:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r345157 - vendor/llvm-openmp/openmp-release_80-r356034 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-openmp/openmp-release_80-r356034 X-SVN-Commit-Revision: 345157 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 878616B5B5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 20:32:50 -0000 Author: dim Date: Thu Mar 14 20:32:48 2019 New Revision: 345157 URL: https://svnweb.freebsd.org/changeset/base/345157 Log: Tag LLVM openmp release_80 branch r356034. Added: vendor/llvm-openmp/openmp-release_80-r356034/ - copied from r345156, vendor/llvm-openmp/dist-release_80/ From owner-svn-src-all@freebsd.org Thu Mar 14 20:32:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F43A152C8F3; Thu, 14 Mar 2019 20:32:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D3B876B5AF; Thu, 14 Mar 2019 20:32:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA81327A9B; Thu, 14 Mar 2019 20:32:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EKWkFZ001467; Thu, 14 Mar 2019 20:32:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EKWk8T001466; Thu, 14 Mar 2019 20:32:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903142032.x2EKWk8T001466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 14 Mar 2019 20:32:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r345156 - vendor/llvm-openmp/dist-release_80/runtime/src X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-openmp/dist-release_80/runtime/src X-SVN-Commit-Revision: 345156 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D3B876B5AF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 20:32:47 -0000 Author: dim Date: Thu Mar 14 20:32:46 2019 New Revision: 345156 URL: https://svnweb.freebsd.org/changeset/base/345156 Log: Vendor import of LLVM openmp release_80 branch r356034: https://llvm.org/svn/llvm-project/openmp/branches/release_80@356034 Modified: vendor/llvm-openmp/dist-release_80/runtime/src/ompt-general.cpp Modified: vendor/llvm-openmp/dist-release_80/runtime/src/ompt-general.cpp ============================================================================== --- vendor/llvm-openmp/dist-release_80/runtime/src/ompt-general.cpp Thu Mar 14 20:11:46 2019 (r345155) +++ vendor/llvm-openmp/dist-release_80/runtime/src/ompt-general.cpp Thu Mar 14 20:32:46 2019 (r345156) @@ -450,9 +450,6 @@ OMPT_API_ROUTINE ompt_set_result_t ompt_set_callback(o OMPT_API_ROUTINE int ompt_get_callback(ompt_callbacks_t which, ompt_callback_t *callback) { - if (!ompt_enabled.enabled) - return ompt_get_callback_failure; - switch (which) { #define ompt_event_macro(event_name, callback_type, event_id) \ @@ -460,7 +457,7 @@ OMPT_API_ROUTINE int ompt_get_callback(ompt_callbacks_ if (ompt_event_implementation_status(event_name)) { \ ompt_callback_t mycb = \ (ompt_callback_t)ompt_callbacks.ompt_callback(event_name); \ - if (ompt_enabled.event_name && mycb) { \ + if (mycb) { \ *callback = mycb; \ return ompt_get_callback_success; \ } \ @@ -483,15 +480,11 @@ OMPT_API_ROUTINE int ompt_get_callback(ompt_callbacks_ OMPT_API_ROUTINE int ompt_get_parallel_info(int ancestor_level, ompt_data_t **parallel_data, int *team_size) { - if (!ompt_enabled.enabled) - return 0; return __ompt_get_parallel_info_internal(ancestor_level, parallel_data, team_size); } OMPT_API_ROUTINE int ompt_get_state(ompt_wait_id_t *wait_id) { - if (!ompt_enabled.enabled) - return ompt_state_work_serial; int thread_state = __ompt_get_state_internal(wait_id); if (thread_state == ompt_state_undefined) { @@ -506,8 +499,6 @@ OMPT_API_ROUTINE int ompt_get_state(ompt_wait_id_t *wa ****************************************************************************/ OMPT_API_ROUTINE ompt_data_t *ompt_get_thread_data(void) { - if (!ompt_enabled.enabled) - return NULL; return __ompt_get_thread_data_internal(); } @@ -516,8 +507,6 @@ OMPT_API_ROUTINE int ompt_get_task_info(int ancestor_l ompt_frame_t **task_frame, ompt_data_t **parallel_data, int *thread_num) { - if (!ompt_enabled.enabled) - return 0; return __ompt_get_task_info_internal(ancestor_level, type, task_data, task_frame, parallel_data, thread_num); } @@ -592,7 +581,7 @@ OMPT_API_ROUTINE int ompt_get_place_num(void) { #if !KMP_AFFINITY_SUPPORTED return -1; #else - if (!ompt_enabled.enabled || __kmp_get_gtid() < 0) + if (__kmp_get_gtid() < 0) return -1; int gtid; @@ -613,7 +602,7 @@ OMPT_API_ROUTINE int ompt_get_partition_place_nums(int #if !KMP_AFFINITY_SUPPORTED return 0; #else - if (!ompt_enabled.enabled || __kmp_get_gtid() < 0) + if (__kmp_get_gtid() < 0) return 0; int i, gtid, place_num, first_place, last_place, start, end; @@ -648,7 +637,7 @@ OMPT_API_ROUTINE int ompt_get_partition_place_nums(int ****************************************************************************/ OMPT_API_ROUTINE int ompt_get_proc_id(void) { - if (!ompt_enabled.enabled || __kmp_get_gtid() < 0) + if (__kmp_get_gtid() < 0) return -1; #if KMP_OS_LINUX return sched_getcpu(); From owner-svn-src-all@freebsd.org Thu Mar 14 20:37:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B306152CCE2 for ; Thu, 14 Mar 2019 20:37:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E2A16B9B9 for ; Thu, 14 Mar 2019 20:37:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72e.google.com with SMTP id b74so4201228qkg.9 for ; Thu, 14 Mar 2019 13:37:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wH1K+1sj+7pA/0IHrW1ULZlkgsigxfEjQXuq0tZVgqM=; b=FRScQxqpi3Doj5R9B/kmyI9N0q5IW9FRloSlYG4riE4LzsPPWVCuNxZXNZosvUTExV ZVgmJwe9Ggv4Y9BzKuKTLyEdibqr8sa7G+k36nK/6cADHRg8d0F8AJ4db0WdDl7JG7Xl T2sB4hrV58Q3pIq287Ik2plsaAXbfCjsiv0UW15wk+590IM5+Kw40kXypefWugZSgTkW cfZMGf3/a3Hlb5cLBTbNdr7UNoV1y0WuKAJb32ds5B1nBidxbMHJJ/QCPNOEcuYtAc1R QJloSAcRyP4/8UxtcbvjAXsNOve0FJXqeftJ6R9iXkqNeB4zMiAbyR9TeoNxCoPuqzwA VEsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wH1K+1sj+7pA/0IHrW1ULZlkgsigxfEjQXuq0tZVgqM=; b=e52fV1TwLdNYPJAZofLJaGQOOxVDsqi5ZfD9i8R4TrklCrrRiNFKGYw2ZP5AbTwDHI 2WfxQTgkTk4zkoFFKG1511sROK7R0QjjvKI+DYKN/9Wq/Rnt6+UCGq5c59Ps7wuLoED7 4KaNfBE7psLXtYx3nDbq+p9ZAYv9oeH1P/dH7mlkdhQAqFIQ/mYmhMYxKbv5mIkyYPOK iFwrk9DIRPDfSAtO5gMu9fl4hxJC53/5dActQzXn4bzOgtrzcEJqvp6MS6vanxy7ycKs uKVZUvhy52vh+pIFhgiCeGNwNqY6/C8v1g2ZKmWj9OEg8rZuFl2QDPsjtN3ZKhnK2X7n LPgQ== X-Gm-Message-State: APjAAAX4d6pTNpIanSFkgxO96cngW7zJ21RHSFVovgxQtYrXnpqfRx5e 8m7pvWB++Ta8XAkjJ2Mt7jdYH0A+6t1sgsiZ94s5xg== X-Google-Smtp-Source: APXvYqwBITwvSzyQ9wxAhdY1ag7tfbbOZKjO0k0Uc2ucGK5PQmQegfY/HTaqvzL65QPe7E1WM5Tw0j5OUsTjCIsUUYY= X-Received: by 2002:a37:a34f:: with SMTP id m76mr157065qke.245.1552595856790; Thu, 14 Mar 2019 13:37:36 -0700 (PDT) MIME-Version: 1.0 References: <201903141709.x2EH97e7090941@repo.freebsd.org> <201903141855.x2EIt2ih026401@gndrsh.dnsmgr.net> <9B88CC0B-E997-4860-AE91-15ED7C133B22@panasas.com> In-Reply-To: <9B88CC0B-E997-4860-AE91-15ED7C133B22@panasas.com> From: Warner Losh Date: Thu, 14 Mar 2019 14:37:24 -0600 Message-ID: Subject: Re: svn commit: r345138 - head/share/man/man9 To: Ravi Pokala Cc: Ed Maste , "Rodney W. Grimes" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 8E2A16B9B9 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.971,0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 20:37:38 -0000 CTM was fixed years ago... Warner On Thu, Mar 14, 2019, 1:32 PM Ravi Pokala wrote: > I think maybe there was also a limitation on the > (repo-replication-over-email?) mechanism that we used to use? That rings = a > very faint bell for me for some reason, even though I'm pretty sure it wa= s > dead long before I got my bit. > > -Ravi (rpokala@) > > =EF=BB=BF-----Original Message----- > From: on behalf of Ed Maste < > emaste@freebsd.org> > Date: 2019-03-14, Thursday at 12:21 > To: "Rodney W. Grimes" > Cc: src-committers , , > > Subject: Re: svn commit: r345138 - head/share/man/man9 > > On Thu, 14 Mar 2019 at 14:55, Rodney W. Grimes > wrote: > > > > [ Charset UTF-8 unsupported, converting... ] > > > Author: emaste > > > Date: Thu Mar 14 17:09:07 2019 > > > New Revision: 345138 > > > URL: https://svnweb.freebsd.org/changeset/base/345138 > > > > > > Log: > > > firmware(9): remove uuencoded example > > > > > > We can (should) just commit the binary files to the source tree. > > > > This change could use wider discussion. > > If you or others have a reason to prefer having uuencoded files in the > src tree I'll happily revert. I was aware only of CVS limitations as a > reason for uuencoding. > > We have many binary files in the tree already (e.g. GIF PNG and JPEG > images, ELF and PE32 binaries, Berkeley DB files, and various > compressed formats). I count 430 uuencoded files in the tree, with 328 > of those coming from libarchive and 64 from sys/*/dev/ > > > > > From owner-svn-src-all@freebsd.org Thu Mar 14 20:58:58 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49AD2152DDF8 for ; Thu, 14 Mar 2019 20:58:58 +0000 (UTC) (envelope-from 010001697e001a9c-830df71c-b80d-4ee8-b78b-f421db95376b-000000@amazonses.com) Received: from a8-176.smtp-out.amazonses.com (a8-176.smtp-out.amazonses.com [54.240.8.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C0FE6CB1E for ; Thu, 14 Mar 2019 20:58:56 +0000 (UTC) (envelope-from 010001697e001a9c-830df71c-b80d-4ee8-b78b-f421db95376b-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57; d=tarsnap.com; t=1552597130; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=OaZMiMzXcUdbr6faEkkZ+/8C6+kOgVfm+B9+RVnco7Y=; b=W6tqkE5BQzvtWLrlSb83UngYHfTp0yj3oBx8k1ZwbMiKlk6hI5b+z+RNmhr9ZB+v 44Pmtjbox8NrTKdYe9JN1r+g/OhBa9xjJ7XGsURkZO+SwJVHcctfQRW819Y2f/MBxJI rPL6vDkBQy40vV738Juc16NPxmM8yvK9HN5fYfeg= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1552597130; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=OaZMiMzXcUdbr6faEkkZ+/8C6+kOgVfm+B9+RVnco7Y=; b=cLMnuvKlpvVk8rGpGdu5gKLXvH9x/9qv8hCn2YiX9nLHTMTX35EqLcqZyuOIu+VD utTrZ2t7VvFo1LuCEqpwGhlj0dGW2AxojF8bKVHv3w9q5G8XxihzojaZaJl5EIUxh7l Rmz3vj9j4m6b0xkRdE1RYBznEz5Vk5olxoTNWfKs= Subject: Re: svn commit: r332100 - in head: . lib/libc/gen sys/sys To: Ed Schouten , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201804061300.w36D0jTT025330@repo.freebsd.org> From: Colin Percival Openpgp: preference=signencrypt Autocrypt: addr=cperciva@tarsnap.com; prefer-encrypt=mutual; keydata= mQGhBElrAAcRBACDfDys4ZtK+ErCJ1HAzYeteKpm3OEsvT/49AjUTLihkF79HhIKrCQU+1KC zv7BwHCMLb6hq30As9L7iFKG7n5QFLFC4Te/VcITUnWHMG/c3ViLOfJGvi+9/nOEHaM1dVJY D6tEp5yM1nHmVQpo9932j4KGuGFR0LhOK5IHXOSfGwCgxSFDPdgxe2OEjWxjGgY+oV3EafcD +JROXCTjlcQiG/OguQH4Vks3mhHfFnEppLxTkDuYgHZQiUtpcT9ssH5khgqoTyMar05OUdAj ZIhNbWDh4LgTj+7ZmvLhXT5Zxw8LX9d7T36aTB8XDQSenDqEtinMWOb0TCBBLbsB8EFG1WTT ESbZci9jJS5yhtktuZoY/eM8uXMD/3k4FWFO80VRRkELSp+XSy/VlSQjyi/rhl2nQq/oOA9F oJbDaB0yq9VNhxP+uFBzBWSqeIX0t1ZWLtNfVFr4TRP5hihI5ICrg/0OpqgisKsU2NFe9xyO hyJLYmfD8ebpDJ/9k30C7Iju9pVrwLm1QgS4S2fqJRcR+U4WbjvP7CgStCVDb2xpbiBQZXJj aXZhbCA8Y3BlcmNpdmFAdGFyc25hcC5jb20+iGEEExECACEFAklrALYCGwMHCwkIBwMCAQQV AggDBBYCAwECHgECF4AACgkQOM7KaQxqam6/igCgn+z2k3V5ggNppmWrZstt1U2lugsAoL7L wS9V9yLtil3oWmHtwpUqYruEuQINBElrAAcQCAD3ZLMIsP4CIDoJORg+YY0lqLVBgcnF7pFb 4Uy2+KvdWofN+DKH61rZLjgXXkNE9M4EQC1B4lGttBP8IY2gs41y3AUogGdyFbidq99rCBz7 LTsgARHwFxZoaHmXyiZLEU1QZuMqwPZV1mCviRhN5E3rRqYNXVcrnXAAuhBpvNyj/ntHvcDN 2/m+ochiuBYueU4kX3lHya7sOj+mTsndcWmQ9soOUyr8O0r/BG088bMn4qqtUw4dl5/pglXk jbl7uOOPinKf0WVd2r6M0wLPJCD4NPHrCWRLLLAjwfjrtoSRvXxDbXhCdgGBa72+K8eYLzVs hgq7tJOoBWzjVK6XRxR7AAMGB/9Mo3iJ2DxqDecd02KCB5BsFDICbJGhPltU7FwrtbC7djSb XUrwsEVLHi4st4cbdGNCWCrp0BRezXZKohKnNAPFOTK++ZfgeKxrV2sJod+Q9RILF86tQ4XF 7A7Yme5hy92t/WgiU4vc/fWbgP8gV/19f8nunaT2E9NSa70mZFjZNu4iuwThoUUO5CV3Wo0Y UISsnRK8XD1+LR3A2qVyLiFRwh/miC1hgLFCTGCQ3GLxZeZzIpYSlGdQJ0L5lixW5ZQD9r1I 8i/8zhE6qRFAM0upUMI3Gt1Oq2w03DiXrZU0Fu/R8Rm8rlnkQKA+95mRTUq1xL5P5NZIi4gJ Z569OPMFiEkEGBECAAkFAklrAAcCGwwACgkQOM7KaQxqam41igCfbaldnFTu5uAdrnrghESv EI3CAo8AoLkNMks1pThl2BJNRm4CtTK9xZeH Message-ID: <010001697e001a9c-830df71c-b80d-4ee8-b78b-f421db95376b-000000@email.amazonses.com> Date: Thu, 14 Mar 2019 20:58:50 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <201804061300.w36D0jTT025330@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SES-Outgoing: 2019.03.14-54.240.8.176 Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-Rspamd-Queue-Id: 8C0FE6CB1E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tarsnap.com header.s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57 header.b=W6tqkE5B; dkim=pass header.d=amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.b=cLMnuvKl; spf=pass (mx1.freebsd.org: domain of 010001697e001a9c-830df71c-b80d-4ee8-b78b-f421db95376b-000000@amazonses.com designates 54.240.8.176 as permitted sender) smtp.mailfrom=010001697e001a9c-830df71c-b80d-4ee8-b78b-f421db95376b-000000@amazonses.com X-Spamd-Result: default: False [-2.74 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[tarsnap.com:s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57,amazonses.com:s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:54.240.0.0/18]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[tarsnap.com]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: feedback-smtp.us-east-1.amazonses.com]; DKIM_TRACE(0.00)[tarsnap.com:+,amazonses.com:+]; RCVD_IN_DNSWL_NONE(0.00)[176.8.240.54.list.dnswl.org : 127.0.15.0]; NEURAL_HAM_SHORT(-0.99)[-0.985,0]; FORGED_SENDER(0.30)[cperciva@tarsnap.com,010001697e001a9c-830df71c-b80d-4ee8-b78b-f421db95376b-000000@amazonses.com]; RCVD_COUNT_ZERO(0.00)[0]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-2.05)[ip: (-2.30), ipnet: 54.240.8.0/21(-4.57), asn: 14618(-3.31), country: US(-0.07)]; ASN(0.00)[asn:14618, ipnet:54.240.8.0/21, country:US]; FORGED_MUA_THUNDERBIRD_MSGID_UNKNOWN(2.50)[]; FROM_NEQ_ENVFROM(0.00)[cperciva@tarsnap.com, 010001697e001a9c-830df71c-b80d-4ee8-b78b-f421db95376b-000000@amazonses.com] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 20:58:58 -0000 On 4/6/18 6:00 AM, Ed Schouten wrote: > Author: ed > Date: Fri Apr 6 13:00:45 2018 > New Revision: 332100 > URL: https://svnweb.freebsd.org/changeset/base/332100 > > Log: > Let syslog(3) use RFC 5424. > > With r332099 changing syslogd(8) to parse RFC 5424 formatted syslog > messages, go ahead and also change the syslog(3) libc function to > generate them. Compared to RFC 3164, RFC 5424 has various advantages, > such as sub-second precision for log entry timestamps. > > As this change could have adverse effects when not updating syslogd(8) > or using a different system logging daemon, add a notice to UPDATING and > increase __FreeBSD_version. > > Differential Revision: https://reviews.freebsd.org/D14926 It looks like this changes the format in which messages are written to stderr via the LOG_PERROR flag; this is visible if you run # echo foo | logger -s which used to print "root: foo" but now prints "root 40038 - - foo". Was this intentional? -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@freebsd.org Thu Mar 14 21:08:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75EDB152E3F3; Thu, 14 Mar 2019 21:08:49 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B2296D329; Thu, 14 Mar 2019 21:08:49 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D42427FEB; Thu, 14 Mar 2019 21:08:49 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EL8m0E018393; Thu, 14 Mar 2019 21:08:48 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EL8mGv018392; Thu, 14 Mar 2019 21:08:48 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201903142108.x2EL8mGv018392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 14 Mar 2019 21:08:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345158 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 345158 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1B2296D329 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 21:08:49 -0000 Author: cem Date: Thu Mar 14 21:08:48 2019 New Revision: 345158 URL: https://svnweb.freebsd.org/changeset/base/345158 Log: bhyve(8): Fix uart emulation bug THRE is always asserted in LSR reads, so REG_IER writes that raise IER_ETXRDY must also set thre_int_pending. Reported by: Illumos, according to emaste@ https://twitter.com/ed_maste/status/1106195949087584258 MFC after: 2 weeks Modified: head/usr.sbin/bhyve/uart_emul.c Modified: head/usr.sbin/bhyve/uart_emul.c ============================================================================== --- head/usr.sbin/bhyve/uart_emul.c Thu Mar 14 20:32:48 2019 (r345157) +++ head/usr.sbin/bhyve/uart_emul.c Thu Mar 14 21:08:48 2019 (r345158) @@ -431,6 +431,9 @@ uart_write(struct uart_softc *sc, int offset, uint8_t sc->thre_int_pending = true; break; case REG_IER: + /* Set pending when IER_ETXRDY is raised (edge-triggered). */ + if ((sc->ier & IER_ETXRDY) == 0 && (value & IER_ETXRDY) != 0) + sc->thre_int_pending = true; /* * Apply mask so that bits 4-7 are 0 * Also enables bits 0-3 only if they're 1 From owner-svn-src-all@freebsd.org Thu Mar 14 21:43:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 642E9152F651; Thu, 14 Mar 2019 21:43:20 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it1-f176.google.com (mail-it1-f176.google.com [209.85.166.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 04BE26EB7D; Thu, 14 Mar 2019 21:43:19 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it1-f176.google.com with SMTP id e24so7200393itl.1; Thu, 14 Mar 2019 14:43:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ja0ZGbZ3YQtJGydGkuNaOSIK8A4PvGymVeQC5qQ8JKM=; b=UPF7On08NG6UYzUNswAIrXERfYCfhj5PaQUbELZ8n17ATFBpBNBgsgyiHHK5w+wb4l HG4lDpoQwdyyXSf/bsWUzpY4nNA8VSN+sjeZK2HMQcTUSRfjItK5UNdvW5z5dqr5AfiI Es3IC4tke1Q1UUsqWQYkp+IwKZbAWQf+FwvkB9lfgezB8jpmzhjcnPEYawNP0IocuAYB 7W83HTn/pFo6Y8XlOmiTjQPaoxR9lDvV+XpWn6HZ31xus99HwFbO7SsVqg6jf/9kXMnt 4BK/txxgiICIR6b+YB5Kc+FxCFQCWyIX4A+M52l4lXzN84WzNF1uf2mLI02HewKSBTl7 tq3A== X-Gm-Message-State: APjAAAXCy3PVwj57BL1GWMb4qNzT8RC33OFakNNENgMpt9GgsBzl+u+o Nkj4ScK72uVrm2q2Awh/zUNZ/cdeLiV8PCsH3+okcA== X-Google-Smtp-Source: APXvYqz5A0+4t++drG144x9Rf/BWFAwr3/pfWcDYRY9II/ejH09wWm1hLX2pa2buMJ/N9w4dk1w4kNKc1ystZIFEKEs= X-Received: by 2002:a24:6f94:: with SMTP id x142mr423558itb.33.1552599361427; Thu, 14 Mar 2019 14:36:01 -0700 (PDT) MIME-Version: 1.0 References: <201903141709.x2EH97e7090941@repo.freebsd.org> <201903141855.x2EIt2ih026401@gndrsh.dnsmgr.net> In-Reply-To: <201903141855.x2EIt2ih026401@gndrsh.dnsmgr.net> From: Ed Maste Date: Thu, 14 Mar 2019 17:35:47 -0400 Message-ID: Subject: Re: svn commit: r345138 - head/share/man/man9 To: "Rodney W. Grimes" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 04BE26EB7D X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.95)[-0.945,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 21:43:20 -0000 On Thu, 14 Mar 2019 at 14:55, Rodney W. Grimes wrote: > > We should of documented what the decision process and criteria was > that lead to the decission to uuencode the files. Doing some archaeology, the first instance of a uuencoded file I can find is r1796, "Got rid of a couple of binary files by uuencoding. 49 more to go." There's no explanation of why the change was made. Evidence suggests that in 1994 it was just accepted as impossible or not permitted to have binary files in the tree, but this has not been the case for quite some time. > Thus we could easily revist that criteria, see how much of it no > longer applies, possible add counter criteria, and change this > decision, with it documented as to why it changed. With none of this documented anywhere I'm going to rely on oral history from you, phk, or other FreeBSD committers active in the mid 90s to provide guidance on what we can revisit and what to check if it no longer applies. The reason not to do it is uuencoding adds about a 40% space penalty, adds to the build time (to uudecode), and makes changes harder to review. In my mind dropping the unnecessary uuencoding is similar to dropping build-time patching of files in the source tree (another workaround we used to have for limitations of our older VCS). > As is this is just another semi documented project guideline change, > I believe there are more than just the firmware files that this > change needs noted on. Yes, we should look at the other cases where we unnecessarily uuencode things. I'm not quite sure where we would document high level things like this though, do you have a suggestion? I could see a case for somewhat similra topics (e.g. 7-bit ASCII/UTF-8/ISO-8859 guidance) fitting into style.9, but I'm not sure this one does. > We should also note that if they are already in uuencode state > to leave them in uuencode state, or do we intened to convert > them on next commit, or ??? Good point, converting existing .uu files to binary is just unnecessary churn and is not recommended. If someone is going to make a change it can be done with the next update. From owner-svn-src-all@freebsd.org Thu Mar 14 22:08:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC6641530806; Thu, 14 Mar 2019 22:08:10 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E52B6F9AA; Thu, 14 Mar 2019 22:08:10 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B4B0AA8; Thu, 14 Mar 2019 22:08:10 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EM8AQH049650; Thu, 14 Mar 2019 22:08:10 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EM8Akf049649; Thu, 14 Mar 2019 22:08:10 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201903142208.x2EM8Akf049649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 14 Mar 2019 22:08:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345159 - head X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 345159 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5E52B6F9AA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 22:08:10 -0000 Author: manu Date: Thu Mar 14 22:08:09 2019 New Revision: 345159 URL: https://svnweb.freebsd.org/changeset/base/345159 Log: pkgbase: Use uname as ABI_FILE uname is always rebuild on FreeBSD so use this as ABI_FILE for pkg when building pkg for pkgbase. pkg uses uname too as default ABI_FILE as of commit d8bbf980b7f6f424fb7cc672c23ab2dfc82b6599 https://github.com/freebsd/pkg/commit/d8bbf980b7f6f424fb7cc672c23ab2dfc82b6599 Discussed with: bapt MFC after: 1 week Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Mar 14 21:08:48 2019 (r345158) +++ head/Makefile.inc1 Thu Mar 14 22:08:09 2019 (r345159) @@ -1864,11 +1864,11 @@ create-world-package-${pkgname}: .PHONY @if [ "${pkgname}" == "runtime" ]; then \ sed -i '' -e "s/%VCS_REVISION%/${VCS_REVISION}/" ${WSTAGEDIR}/${pkgname}.ucl ; \ fi - ${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes \ + ${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname -o ALLOW_BASE_SHLIBS=yes \ create -M ${WSTAGEDIR}/${pkgname}.ucl \ -p ${WSTAGEDIR}/${pkgname}.plist \ -r ${WSTAGEDIR} \ - -o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} + -o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname config ABI)/${PKG_VERSION} .endfor _default_flavor= -default From owner-svn-src-all@freebsd.org Thu Mar 14 22:20:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 120931530DE1; Thu, 14 Mar 2019 22:20:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A74317004C; Thu, 14 Mar 2019 22:20:48 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 996F6C76; Thu, 14 Mar 2019 22:20:48 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EMKm7d055800; Thu, 14 Mar 2019 22:20:48 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EMKmsN055799; Thu, 14 Mar 2019 22:20:48 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201903142220.x2EMKmsN055799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 14 Mar 2019 22:20:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345160 - head/sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/netpfil/ipfw X-SVN-Commit-Revision: 345160 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A74317004C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 22:20:49 -0000 Author: glebius Date: Thu Mar 14 22:20:48 2019 New Revision: 345160 URL: https://svnweb.freebsd.org/changeset/base/345160 Log: Simplify ipfw_bpf_mtap2(). No functional change. Modified: head/sys/netpfil/ipfw/ip_fw_bpf.c Modified: head/sys/netpfil/ipfw/ip_fw_bpf.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_bpf.c Thu Mar 14 22:08:09 2019 (r345159) +++ head/sys/netpfil/ipfw/ip_fw_bpf.c Thu Mar 14 22:20:48 2019 (r345160) @@ -163,22 +163,27 @@ ipfwlog_clone_create(struct if_clone *ifc, int unit, c void ipfw_bpf_mtap2(void *data, u_int dlen, struct mbuf *m) { + struct ifnet *logif; LOGIF_RLOCK_TRACKER; LOGIF_RLOCK(); - if (dlen == ETHER_HDR_LEN) { - if (V_log_if == NULL) { - LOGIF_RUNLOCK(); - return; - } - BPF_MTAP2(V_log_if, data, dlen, m); - } else if (dlen == PFLOG_HDRLEN) { - if (V_pflog_if == NULL) { - LOGIF_RUNLOCK(); - return; - } - BPF_MTAP2(V_pflog_if, data, dlen, m); + switch (dlen) { + case (ETHER_HDR_LEN): + logif = V_log_if; + break; + case (PFLOG_HDRLEN): + logif = V_pflog_if; + break; + default: +#ifdef INVARIANTS + panic("%s: unsupported len %d", __func__, dlen); +#endif + logif = NULL; } + + if (logif != NULL) + BPF_MTAP2(logif, data, dlen, m); + LOGIF_RUNLOCK(); } From owner-svn-src-all@freebsd.org Thu Mar 14 22:23:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B65E9153105B; Thu, 14 Mar 2019 22:23:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A42D70438; Thu, 14 Mar 2019 22:23:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 33248E07; Thu, 14 Mar 2019 22:23:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EMNBtV059641; Thu, 14 Mar 2019 22:23:11 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EMNAFt059635; Thu, 14 Mar 2019 22:23:10 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201903142223.x2EMNAFt059635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 14 Mar 2019 22:23:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345161 - in head/sys: netinet netpfil/ipfw netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head/sys: netinet netpfil/ipfw netpfil/pf X-SVN-Commit-Revision: 345161 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5A42D70438 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 22:23:12 -0000 Author: glebius Date: Thu Mar 14 22:23:09 2019 New Revision: 345161 URL: https://svnweb.freebsd.org/changeset/base/345161 Log: Make second argument of ip_divert(), that specifies packet direction a bool. This allows pf(4) to avoid including ipfw(4) private files. Modified: head/sys/netinet/ip_divert.c head/sys/netinet/ip_var.h head/sys/netinet/raw_ip.c head/sys/netpfil/ipfw/ip_fw_pfil.c head/sys/netpfil/pf/pf.c Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Thu Mar 14 22:20:48 2019 (r345160) +++ head/sys/netinet/ip_divert.c Thu Mar 14 22:23:09 2019 (r345161) @@ -184,7 +184,7 @@ div_input(struct mbuf **mp, int *offp, int proto) * then pass them along with mbuf chain. */ static void -divert_packet(struct mbuf *m, int incoming) +divert_packet(struct mbuf *m, bool incoming) { struct ip *ip; struct inpcb *inp; Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Thu Mar 14 22:20:48 2019 (r345160) +++ head/sys/netinet/ip_var.h Thu Mar 14 22:23:09 2019 (r345161) @@ -292,7 +292,7 @@ VNET_DECLARE(ip_fw_ctl_ptr_t, ip_fw_ctl_ptr); #define V_ip_fw_ctl_ptr VNET(ip_fw_ctl_ptr) /* Divert hooks. */ -extern void (*ip_divert_ptr)(struct mbuf *m, int incoming); +extern void (*ip_divert_ptr)(struct mbuf *m, bool incoming); /* ng_ipfw hooks -- XXX make it the same as divert and dummynet */ extern int (*ng_ipfw_input_p)(struct mbuf **, int, struct ip_fw_args *, int); Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Thu Mar 14 22:20:48 2019 (r345160) +++ head/sys/netinet/raw_ip.c Thu Mar 14 22:23:09 2019 (r345161) @@ -101,7 +101,7 @@ VNET_DEFINE(ip_fw_ctl_ptr_t, ip_fw_ctl_ptr) = NULL; int (*ip_dn_ctl_ptr)(struct sockopt *); int (*ip_dn_io_ptr)(struct mbuf **, int, struct ip_fw_args *); -void (*ip_divert_ptr)(struct mbuf *, int); +void (*ip_divert_ptr)(struct mbuf *, bool); int (*ng_ipfw_input_p)(struct mbuf **, int, struct ip_fw_args *, int); Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_pfil.c Thu Mar 14 22:20:48 2019 (r345160) +++ head/sys/netpfil/ipfw/ip_fw_pfil.c Thu Mar 14 22:23:09 2019 (r345161) @@ -85,7 +85,7 @@ VNET_DEFINE_STATIC(int, fwlink_enable) = 0; int ipfw_chg_hook(SYSCTL_HANDLER_ARGS); /* Forward declarations. */ -static int ipfw_divert(struct mbuf **, int, struct ipfw_rule_ref *, int); +static int ipfw_divert(struct mbuf **, bool, struct ipfw_rule_ref *, int); #ifdef SYSCTL_NODE @@ -282,7 +282,7 @@ again: break; } MPASS(args.flags & IPFW_ARGS_REF); - (void )ipfw_divert(m0, dir, &args.rule, + (void )ipfw_divert(m0, dir == DIR_IN, &args.rule, (ipfw == IP_FW_TEE) ? 1 : 0); /* continue processing for the original packet (tee). */ if (*m0) @@ -443,7 +443,7 @@ again: /* do the divert, return 1 on error 0 on success */ static int -ipfw_divert(struct mbuf **m0, int incoming, struct ipfw_rule_ref *rule, +ipfw_divert(struct mbuf **m0, bool incoming, struct ipfw_rule_ref *rule, int tee) { /* Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Thu Mar 14 22:20:48 2019 (r345160) +++ head/sys/netpfil/pf/pf.c Thu Mar 14 22:23:09 2019 (r345161) @@ -91,8 +91,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include /* XXX: only for DIR_IN/DIR_OUT */ - #ifdef INET6 #include #include @@ -6184,7 +6182,7 @@ done: m->m_flags &= ~M_FASTFWD_OURS; } } - ip_divert_ptr(*m0, dir == PF_IN ? DIR_IN : DIR_OUT); + ip_divert_ptr(*m0, dir == PF_IN); *m0 = NULL; return (action); From owner-svn-src-all@freebsd.org Thu Mar 14 22:28:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2349515311C0; Thu, 14 Mar 2019 22:28:52 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C8FA97064C; Thu, 14 Mar 2019 22:28:51 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD15BE22; Thu, 14 Mar 2019 22:28:51 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EMSpM3059931; Thu, 14 Mar 2019 22:28:51 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EMSo2h059922; Thu, 14 Mar 2019 22:28:50 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201903142228.x2EMSo2h059922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 14 Mar 2019 22:28:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345162 - head/sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/netpfil/ipfw X-SVN-Commit-Revision: 345162 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C8FA97064C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 22:28:52 -0000 Author: glebius Date: Thu Mar 14 22:28:50 2019 New Revision: 345162 URL: https://svnweb.freebsd.org/changeset/base/345162 Log: - Add more flags to ip_fw_args. At this changeset only IPFW_ARGS_IN and IPFW_ARGS_OUT are utilized. They are intented to substitute the "dir" parameter that is often passes together with args. - Rename ip_fw_args.oif to ifp and now it is set to either input or output interface, depending on IPFW_ARGS_IN/OUT bit set. Modified: head/sys/netpfil/ipfw/ip_dn_io.c head/sys/netpfil/ipfw/ip_fw2.c head/sys/netpfil/ipfw/ip_fw_dynamic.c head/sys/netpfil/ipfw/ip_fw_log.c head/sys/netpfil/ipfw/ip_fw_nat.c head/sys/netpfil/ipfw/ip_fw_pfil.c head/sys/netpfil/ipfw/ip_fw_private.h Modified: head/sys/netpfil/ipfw/ip_dn_io.c ============================================================================== --- head/sys/netpfil/ipfw/ip_dn_io.c Thu Mar 14 22:23:09 2019 (r345161) +++ head/sys/netpfil/ipfw/ip_dn_io.c Thu Mar 14 22:28:50 2019 (r345162) @@ -841,7 +841,7 @@ tag_mbuf(struct mbuf *m, int dir, struct ip_fw_args *f dt->rule = fwa->rule; dt->rule.info &= IPFW_ONEPASS; /* only keep this info */ dt->dn_dir = dir; - dt->ifp = fwa->oif; + dt->ifp = fwa->flags & IPFW_ARGS_OUT ? fwa->ifp : NULL; /* 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; Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Thu Mar 14 22:23:09 2019 (r345161) +++ head/sys/netpfil/ipfw/ip_fw2.c Thu Mar 14 22:28:50 2019 (r345162) @@ -1080,13 +1080,11 @@ check_uidgid(ipfw_insn_u32 *insn, struct ip_fw_args *a struct inpcbinfo *pi; struct ipfw_flow_id *id; struct inpcb *pcb, *inp; - struct ifnet *oif; int lookupflags; int match; id = &args->f_id; inp = args->inp; - oif = args->oif; /* * Check to see if the UDP or TCP stack supplied us with @@ -1124,16 +1122,16 @@ check_uidgid(ipfw_insn_u32 *insn, struct ip_fw_args *a if (*ugid_lookupp == 0) { if (id->addr_type == 6) { #ifdef INET6 - if (oif == NULL) + if (args->flags & IPFW_ARGS_IN) pcb = in6_pcblookup_mbuf(pi, &id->src_ip6, htons(id->src_port), &id->dst_ip6, htons(id->dst_port), - lookupflags, oif, args->m); + lookupflags, NULL, args->m); else pcb = in6_pcblookup_mbuf(pi, &id->dst_ip6, htons(id->dst_port), &id->src_ip6, htons(id->src_port), - lookupflags, oif, args->m); + lookupflags, args->ifp, args->m); #else *ugid_lookupp = -1; return (0); @@ -1141,16 +1139,16 @@ check_uidgid(ipfw_insn_u32 *insn, struct ip_fw_args *a } else { src_ip.s_addr = htonl(id->src_ip); dst_ip.s_addr = htonl(id->dst_ip); - if (oif == NULL) + if (args->flags & IPFW_ARGS_IN) pcb = in_pcblookup_mbuf(pi, src_ip, htons(id->src_port), dst_ip, htons(id->dst_port), - lookupflags, oif, args->m); + lookupflags, NULL, args->m); else pcb = in_pcblookup_mbuf(pi, dst_ip, htons(id->dst_port), src_ip, htons(id->src_port), - lookupflags, oif, args->m); + lookupflags, args->ifp, args->m); } if (pcb != NULL) { INP_RLOCK_ASSERT(pcb); @@ -1263,8 +1261,7 @@ jump_linear(struct ip_fw_chain *chain, struct ip_fw *f * args->eh (in) Mac header if present, NULL for layer3 packet. * args->L3offset Number of bytes bypassed if we came from L2. * e.g. often sizeof(eh) ** NOTYET ** - * args->oif Outgoing interface, NULL if packet is incoming. - * The incoming interface is in the mbuf. (in) + * args->ifp Incoming or outgoing interface. * args->divert_rule (in/out) * Skip up to the first rule past this rule number; * upon return, non-zero port number for divert or tee. @@ -1331,17 +1328,9 @@ ipfw_chk(struct ip_fw_args *args) struct ucred *ucred_cache = NULL; #endif int ucred_lookup = 0; - - /* - * oif | args->oif If NULL, ipfw_chk has been called on the - * inbound path (ether_input, ip_input). - * If non-NULL, ipfw_chk has been called on the outbound path - * (ether_output, ip_output). - */ - struct ifnet *oif = args->oif; - int f_pos = 0; /* index of current rule in the array */ int retval = 0; + struct ifnet *oif, *iif; /* * hlen The length of the IP header. @@ -1724,6 +1713,15 @@ do { \ f_pos = 0; } + if (args->flags & IPFW_ARGS_IN) { + iif = args->ifp; + oif = NULL; + } else { + MPASS(args->flags & IPFW_ARGS_OUT); + iif = m->m_pkthdr.rcvif; + oif = args->ifp; + } + /* * Now scan the rules, and parse microinstructions for each rule. * We have two nested loops and an inner switch. Sometimes we @@ -1820,8 +1818,8 @@ do { \ break; case O_RECV: - match = iface_match(m->m_pkthdr.rcvif, - (ipfw_insn_if *)cmd, chain, &tablearg); + match = iface_match(iif, (ipfw_insn_if *)cmd, + chain, &tablearg); break; case O_XMIT: @@ -1830,9 +1828,8 @@ do { \ break; case O_VIA: - match = iface_match(oif ? oif : - m->m_pkthdr.rcvif, (ipfw_insn_if *)cmd, - chain, &tablearg); + match = iface_match(args->ifp, + (ipfw_insn_if *)cmd, chain, &tablearg); break; case O_MACADDR2: @@ -2334,7 +2331,7 @@ do { \ case O_LOG: ipfw_log(chain, f, hlen, args, m, - oif, offset | ip6f_mf, tablearg, ip); + offset | ip6f_mf, tablearg, ip); match = 1; break; @@ -2344,16 +2341,14 @@ do { \ case O_VERREVPATH: /* Outgoing packets automatically pass/match */ - match = ((oif != NULL) || - (m->m_pkthdr.rcvif == NULL) || + match = (args->flags & IPFW_ARGS_OUT || ( #ifdef INET6 is_ipv6 ? verify_path6(&(args->f_id.src_ip6), - m->m_pkthdr.rcvif, args->f_id.fib) : + iif, args->f_id.fib) : #endif - verify_path(src_ip, m->m_pkthdr.rcvif, - args->f_id.fib))); + verify_path(src_ip, iif, args->f_id.fib))); break; case O_VERSRCREACH: @@ -2379,12 +2374,10 @@ do { \ match = #ifdef INET6 is_ipv6 ? verify_path6( - &(args->f_id.src_ip6), - m->m_pkthdr.rcvif, + &(args->f_id.src_ip6), iif, args->f_id.fib) : #endif - verify_path(src_ip, - m->m_pkthdr.rcvif, + verify_path(src_ip, iif, args->f_id.fib); else match = 1; Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_dynamic.c Thu Mar 14 22:23:09 2019 (r345161) +++ head/sys/netpfil/ipfw/ip_fw_dynamic.c Thu Mar 14 22:28:50 2019 (r345162) @@ -1173,12 +1173,9 @@ dyn_getscopeid(const struct ip_fw_args *args) * determine the scope zone id to resolve address scope ambiguity. */ if (IN6_IS_ADDR_LINKLOCAL(&args->f_id.src_ip6) || - IN6_IS_ADDR_LINKLOCAL(&args->f_id.dst_ip6)) { - MPASS(args->oif != NULL || - args->m->m_pkthdr.rcvif != NULL); - return (in6_getscopezone(args->oif != NULL ? args->oif: - args->m->m_pkthdr.rcvif, IPV6_ADDR_SCOPE_LINKLOCAL)); - } + IN6_IS_ADDR_LINKLOCAL(&args->f_id.dst_ip6)) + return (in6_getscopezone(args->ifp, IPV6_ADDR_SCOPE_LINKLOCAL)); + return (0); } Modified: head/sys/netpfil/ipfw/ip_fw_log.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_log.c Thu Mar 14 22:23:09 2019 (r345161) +++ head/sys/netpfil/ipfw/ip_fw_log.c Thu Mar 14 22:28:50 2019 (r345162) @@ -99,7 +99,7 @@ __FBSDID("$FreeBSD$"); */ void ipfw_log(struct ip_fw_chain *chain, struct ip_fw *f, u_int hlen, - struct ip_fw_args *args, struct mbuf *m, struct ifnet *oif, + struct ip_fw_args *args, struct mbuf *m, u_short offset, uint32_t tablearg, struct ip *ip) { char *action; @@ -405,19 +405,14 @@ ipfw_log(struct ip_fw_chain *chain, struct ip_fw *f, u } } #ifdef __FreeBSD__ - if (oif || m->m_pkthdr.rcvif) - log(LOG_SECURITY | LOG_INFO, - "ipfw: %d %s %s %s via %s%s\n", - f ? f->rulenum : -1, - action, proto, oif ? "out" : "in", - oif ? oif->if_xname : m->m_pkthdr.rcvif->if_xname, - fragment); - else + log(LOG_SECURITY | LOG_INFO, "ipfw: %d %s %s %s via %s%s\n", + f ? f->rulenum : -1, action, proto, + args->flags & IPFW_ARGS_OUT ? "out" : "in", args->ifp->if_xname, + fragment); +#else + log(LOG_SECURITY | LOG_INFO, "ipfw: %d %s %s [no if info]%s\n", + f ? f->rulenum : -1, action, proto, fragment); #endif - log(LOG_SECURITY | LOG_INFO, - "ipfw: %d %s %s [no if info]%s\n", - f ? f->rulenum : -1, - action, proto, fragment); if (limit_reached) log(LOG_SECURITY | LOG_NOTICE, "ipfw: limit %d reached on entry %d\n", Modified: head/sys/netpfil/ipfw/ip_fw_nat.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_nat.c Thu Mar 14 22:23:09 2019 (r345161) +++ head/sys/netpfil/ipfw/ip_fw_nat.c Thu Mar 14 22:28:50 2019 (r345162) @@ -347,7 +347,7 @@ ipfw_nat(struct ip_fw_args *args, struct cfg_nat *t, s /* Check if this is 'global' instance */ if (t == NULL) { - if (args->oif == NULL) { + if (args->flags & IPFW_ARGS_IN) { /* Wrong direction, skip processing */ args->m = mcl; return (IP_FW_NAT); @@ -374,7 +374,7 @@ ipfw_nat(struct ip_fw_args *args, struct cfg_nat *t, s return (IP_FW_NAT); } } else { - if (args->oif == NULL) + if (args->flags & IPFW_ARGS_IN) retval = LibAliasIn(t->lib, c, mcl->m_len + M_TRAILINGSPACE(mcl)); else @@ -391,7 +391,8 @@ ipfw_nat(struct ip_fw_args *args, struct cfg_nat *t, s * PKT_ALIAS_DENY_INCOMING flag is set. */ if (retval == PKT_ALIAS_ERROR || - (args->oif == NULL && (retval == PKT_ALIAS_UNRESOLVED_FRAGMENT || + ((args->flags & IPFW_ARGS_IN) && + (retval == PKT_ALIAS_UNRESOLVED_FRAGMENT || (retval == PKT_ALIAS_IGNORED && (t->mode & PKT_ALIAS_DENY_INCOMING) != 0)))) { /* XXX - should i add some logging? */ Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_pfil.c Thu Mar 14 22:23:09 2019 (r345161) +++ head/sys/netpfil/ipfw/ip_fw_pfil.c Thu Mar 14 22:28:50 2019 (r345162) @@ -118,17 +118,16 @@ SYSEND * The packet may be consumed. */ static pfil_return_t -ipfw_check_packet(struct mbuf **m0, struct ifnet *ifp, int dir, +ipfw_check_packet(struct mbuf **m0, struct ifnet *ifp, int flags, void *ruleset __unused, struct inpcb *inp) { struct ip_fw_args args; struct m_tag *tag; pfil_return_t ret; - int ipfw; + int ipfw, dir; - /* convert dir to IPFW values */ - dir = (dir & PFIL_IN) ? DIR_IN : DIR_OUT; - args.flags = 0; + args.flags = (flags & PFIL_IN) ? IPFW_ARGS_IN : IPFW_ARGS_OUT; + dir = (flags & PFIL_IN) ? DIR_IN : DIR_OUT; again: /* * extract and remove the tag if present. If we are left @@ -144,7 +143,7 @@ again: } args.m = *m0; - args.oif = dir == DIR_OUT ? ifp : NULL; + args.ifp = ifp; args.inp = inp; ipfw = ipfw_chk(&args); @@ -198,7 +197,7 @@ again: * m_tag_find. Outgoing packets may be tagged, so we * reuse the tag if present. */ - tag = (dir == DIR_IN) ? NULL : + tag = (flags & PFIL_IN) ? NULL : m_tag_find(*m0, PACKET_TAG_IPFORWARD, NULL); if (tag != NULL) { m_tag_unlink(*m0, tag); @@ -346,6 +345,7 @@ ipfw_check_frame(struct mbuf **m0, struct ifnet *ifp, int i; args.flags = IPFW_ARGS_ETHER; + args.flags |= (dir & PFIL_IN) ? IPFW_ARGS_IN : IPFW_ARGS_OUT; again: /* fetch start point from rule, if any. remove the tag if present. */ mtag = m_tag_locate(*m0, MTAG_IPFW_RULE, 0, NULL); @@ -372,7 +372,7 @@ again: m_adj(m, ETHER_HDR_LEN); /* strip ethernet header */ args.m = m; /* the packet we are looking at */ - args.oif = dir & PFIL_OUT ? ifp: NULL; /* destination, if any */ + args.ifp = ifp; args.eh = &save_eh; /* MAC header for bridged/MAC packets */ args.inp = inp; /* used by ipfw uid/gid/jail rules */ i = ipfw_chk(&args); Modified: head/sys/netpfil/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_private.h Thu Mar 14 22:23:09 2019 (r345161) +++ head/sys/netpfil/ipfw/ip_fw_private.h Thu Mar 14 22:28:50 2019 (r345162) @@ -85,12 +85,19 @@ struct _ip6dn_args { */ struct ip_fw_args { uint32_t flags; -#define IPFW_ARGS_ETHER 0x0001 /* has valid ethernet header */ -#define IPFW_ARGS_NH4 0x0002 /* has IPv4 next hop in hopstore */ -#define IPFW_ARGS_NH6 0x0004 /* has IPv6 next hop in hopstore */ -#define IPFW_ARGS_NH4PTR 0x0008 /* has IPv4 next hop in next_hop */ -#define IPFW_ARGS_NH6PTR 0x0010 /* has IPv6 next hop in next_hop6 */ -#define IPFW_ARGS_REF 0x0020 /* has valid ipfw_rule_ref */ +#define IPFW_ARGS_ETHER 0x00010000 /* valid ethernet header */ +#define IPFW_ARGS_NH4 0x00020000 /* IPv4 next hop in hopstore */ +#define IPFW_ARGS_NH6 0x00040000 /* IPv6 next hop in hopstore */ +#define IPFW_ARGS_NH4PTR 0x00080000 /* IPv4 next hop in next_hop */ +#define IPFW_ARGS_NH6PTR 0x00100000 /* IPv6 next hop in next_hop6 */ +#define IPFW_ARGS_REF 0x00200000 /* valid ipfw_rule_ref */ +#define IPFW_ARGS_IN 0x00400000 /* called on input */ +#define IPFW_ARGS_OUT 0x00800000 /* called on output */ +#define IPFW_ARGS_IP4 0x01000000 /* belongs to v4 ISR */ +#define IPFW_ARGS_IP6 0x02000000 /* belongs to v6 ISR */ +#define IPFW_ARGS_DROP 0x04000000 /* drop it (dummynet) */ +#define IPFW_ARGS_LENMASK 0x0000ffff /* length of data in *mem */ +#define IPFW_ARGS_LENGTH(f) ((f) & IPFW_ARGS_LENMASK) /* * On return, it points to the matching rule. * On entry, rule.slot > 0 means the info is valid and @@ -100,7 +107,7 @@ struct ip_fw_args { */ struct ipfw_rule_ref rule; /* match/restart info */ - struct ifnet *oif; /* output interface */ + struct ifnet *ifp; /* input/output interface */ struct inpcb *inp; union { /* @@ -181,7 +188,7 @@ void ipfw_bpf_init(int); void ipfw_bpf_uninit(int); void ipfw_bpf_mtap2(void *, u_int, struct mbuf *); void ipfw_log(struct ip_fw_chain *chain, struct ip_fw *f, u_int hlen, - struct ip_fw_args *args, struct mbuf *m, struct ifnet *oif, + struct ip_fw_args *args, struct mbuf *m, u_short offset, uint32_t tablearg, struct ip *ip); VNET_DECLARE(u_int64_t, norule_counter); #define V_norule_counter VNET(norule_counter) From owner-svn-src-all@freebsd.org Thu Mar 14 22:30:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 638A415312A9; Thu, 14 Mar 2019 22:30:07 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F40F370836; Thu, 14 Mar 2019 22:30:06 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E55F6E27; Thu, 14 Mar 2019 22:30:06 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EMU6xW060058; Thu, 14 Mar 2019 22:30:06 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EMU6pn060054; Thu, 14 Mar 2019 22:30:06 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201903142230.x2EMU6pn060054@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 14 Mar 2019 22:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345163 - in head/sys: netgraph netinet netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head/sys: netgraph netinet netpfil/ipfw X-SVN-Commit-Revision: 345163 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F40F370836 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 22:30:07 -0000 Author: glebius Date: Thu Mar 14 22:30:05 2019 New Revision: 345163 URL: https://svnweb.freebsd.org/changeset/base/345163 Log: Remove 'dir' argument in ng_ipfw_input, since ip_fw_args now has this info. While here make 'tee' boolean. Modified: head/sys/netgraph/ng_ipfw.c head/sys/netinet/ip_var.h head/sys/netinet/raw_ip.c head/sys/netpfil/ipfw/ip_fw_pfil.c Modified: head/sys/netgraph/ng_ipfw.c ============================================================================== --- head/sys/netgraph/ng_ipfw.c Thu Mar 14 22:28:50 2019 (r345162) +++ head/sys/netgraph/ng_ipfw.c Thu Mar 14 22:30:05 2019 (r345163) @@ -72,8 +72,7 @@ static ng_rcvdata_t ng_ipfw_rcvdata; static ng_disconnect_t ng_ipfw_disconnect; static hook_p ng_ipfw_findhook1(node_p, u_int16_t ); -static int ng_ipfw_input(struct mbuf **, int, struct ip_fw_args *, - int); +static int ng_ipfw_input(struct mbuf **, struct ip_fw_args *, bool); /* We have only one node */ static node_p fw_node; @@ -285,7 +284,7 @@ ng_ipfw_rcvdata(hook_p hook, item_p item) } static int -ng_ipfw_input(struct mbuf **m0, int dir, struct ip_fw_args *fwa, int tee) +ng_ipfw_input(struct mbuf **m0, struct ip_fw_args *fwa, bool tee) { struct mbuf *m; hook_p hook; @@ -303,7 +302,7 @@ ng_ipfw_input(struct mbuf **m0, int dir, struct ip_fw_ * important to return packet back to IP stack. In tee mode we make * a copy of a packet and forward it into netgraph without a tag. */ - if (tee == 0) { + if (tee == false) { struct m_tag *tag; struct ipfw_rule_ref *r; m = *m0; @@ -318,7 +317,8 @@ ng_ipfw_input(struct mbuf **m0, int dir, struct ip_fw_ r = (struct ipfw_rule_ref *)(tag + 1); *r = fwa->rule; r->info &= IPFW_ONEPASS; /* keep this info */ - r->info |= dir ? IPFW_INFO_IN : IPFW_INFO_OUT; + r->info |= (fwa->flags & IPFW_ARGS_IN) ? + IPFW_INFO_IN : IPFW_INFO_OUT; m_tag_prepend(m, tag); } else Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Thu Mar 14 22:28:50 2019 (r345162) +++ head/sys/netinet/ip_var.h Thu Mar 14 22:30:05 2019 (r345163) @@ -294,9 +294,7 @@ VNET_DECLARE(ip_fw_ctl_ptr_t, ip_fw_ctl_ptr); /* Divert hooks. */ extern void (*ip_divert_ptr)(struct mbuf *m, bool incoming); /* ng_ipfw hooks -- XXX make it the same as divert and dummynet */ -extern int (*ng_ipfw_input_p)(struct mbuf **, int, - struct ip_fw_args *, int); - +extern int (*ng_ipfw_input_p)(struct mbuf **, struct ip_fw_args *, bool); extern int (*ip_dn_ctl_ptr)(struct sockopt *); extern int (*ip_dn_io_ptr)(struct mbuf **, int, struct ip_fw_args *); #endif /* _KERNEL */ Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Thu Mar 14 22:28:50 2019 (r345162) +++ head/sys/netinet/raw_ip.c Thu Mar 14 22:30:05 2019 (r345163) @@ -102,8 +102,7 @@ VNET_DEFINE(ip_fw_ctl_ptr_t, ip_fw_ctl_ptr) = NULL; int (*ip_dn_ctl_ptr)(struct sockopt *); int (*ip_dn_io_ptr)(struct mbuf **, int, struct ip_fw_args *); void (*ip_divert_ptr)(struct mbuf *, bool); -int (*ng_ipfw_input_p)(struct mbuf **, int, - struct ip_fw_args *, int); +int (*ng_ipfw_input_p)(struct mbuf **, struct ip_fw_args *, bool); #ifdef INET /* Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_pfil.c Thu Mar 14 22:28:50 2019 (r345162) +++ head/sys/netpfil/ipfw/ip_fw_pfil.c Thu Mar 14 22:30:05 2019 (r345163) @@ -296,8 +296,7 @@ again: break; } MPASS(args.flags & IPFW_ARGS_REF); - (void )ng_ipfw_input_p(m0, dir, &args, - (ipfw == IP_FW_NGTEE) ? 1 : 0); + (void )ng_ipfw_input_p(m0, &args, ipfw == IP_FW_NGTEE); if (ipfw == IP_FW_NGTEE) /* ignore errors for NGTEE */ goto again; /* continue with packet */ ret = PFIL_CONSUMED; @@ -421,8 +420,7 @@ again: break; } MPASS(args.flags & IPFW_ARGS_REF); - (void )ng_ipfw_input_p(m0, (dir & PFIL_IN) ? DIR_IN : DIR_OUT, - &args, (i == IP_FW_NGTEE) ? 1 : 0); + (void )ng_ipfw_input_p(m0, &args, i == IP_FW_NGTEE); if (i == IP_FW_NGTEE) /* ignore errors for NGTEE */ goto again; /* continue with packet */ ret = PFIL_CONSUMED; From owner-svn-src-all@freebsd.org Thu Mar 14 22:31:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 828F415314DC; Thu, 14 Mar 2019 22:31:13 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 20CF570A26; Thu, 14 Mar 2019 22:31:13 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D56AF79; Thu, 14 Mar 2019 22:31:13 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EMVCNU063110; Thu, 14 Mar 2019 22:31:12 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EMVCwW063109; Thu, 14 Mar 2019 22:31:12 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201903142231.x2EMVCwW063109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 14 Mar 2019 22:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345164 - head/sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/netpfil/ipfw X-SVN-Commit-Revision: 345164 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 20CF570A26 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 22:31:13 -0000 Author: glebius Date: Thu Mar 14 22:31:12 2019 New Revision: 345164 URL: https://svnweb.freebsd.org/changeset/base/345164 Log: Reduce argument list to ipfw_divert(), as args holds the rule ref and the direction. While here make 'tee' a bool. Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_pfil.c Thu Mar 14 22:30:05 2019 (r345163) +++ head/sys/netpfil/ipfw/ip_fw_pfil.c Thu Mar 14 22:31:12 2019 (r345164) @@ -85,7 +85,7 @@ VNET_DEFINE_STATIC(int, fwlink_enable) = 0; int ipfw_chg_hook(SYSCTL_HANDLER_ARGS); /* Forward declarations. */ -static int ipfw_divert(struct mbuf **, bool, struct ipfw_rule_ref *, int); +static int ipfw_divert(struct mbuf **, struct ip_fw_args *, bool); #ifdef SYSCTL_NODE @@ -281,8 +281,7 @@ again: break; } MPASS(args.flags & IPFW_ARGS_REF); - (void )ipfw_divert(m0, dir == DIR_IN, &args.rule, - (ipfw == IP_FW_TEE) ? 1 : 0); + (void )ipfw_divert(m0, &args, ipfw == IP_FW_TEE); /* continue processing for the original packet (tee). */ if (*m0) goto again; @@ -441,8 +440,7 @@ again: /* do the divert, return 1 on error 0 on success */ static int -ipfw_divert(struct mbuf **m0, bool incoming, struct ipfw_rule_ref *rule, - int tee) +ipfw_divert(struct mbuf **m0, struct ip_fw_args *args, bool tee) { /* * ipfw_chk() has already tagged the packet with the divert tag. @@ -454,7 +452,7 @@ ipfw_divert(struct mbuf **m0, bool incoming, struct ip struct m_tag *tag; /* Cloning needed for tee? */ - if (tee == 0) { + if (tee == false) { clone = *m0; /* use the original mbuf */ *m0 = NULL; } else { @@ -474,7 +472,7 @@ ipfw_divert(struct mbuf **m0, bool incoming, struct ip * Note that we now have the 'reass' ipfw option so if we care * we can do it before a 'tee'. */ - if (!tee) switch (ip->ip_v) { + if (tee == false) switch (ip->ip_v) { case IPVERSION: if (ntohs(ip->ip_off) & (IP_MF | IP_OFFMASK)) { int hlen; @@ -523,11 +521,11 @@ ipfw_divert(struct mbuf **m0, bool incoming, struct ip FREE_PKT(clone); return 1; } - *((struct ipfw_rule_ref *)(tag+1)) = *rule; + *((struct ipfw_rule_ref *)(tag+1)) = args->rule; m_tag_prepend(clone, tag); /* Do the dirty job... */ - ip_divert_ptr(clone, incoming); + ip_divert_ptr(clone, args->flags & IPFW_ARGS_IN); return 0; } From owner-svn-src-all@freebsd.org Thu Mar 14 22:32:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22C181531607; Thu, 14 Mar 2019 22:32:53 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B4FF370DD3; Thu, 14 Mar 2019 22:32:52 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A49E0FE0; Thu, 14 Mar 2019 22:32:52 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EMWqF3064856; Thu, 14 Mar 2019 22:32:52 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EMWpmx064848; Thu, 14 Mar 2019 22:32:51 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201903142232.x2EMWpmx064848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 14 Mar 2019 22:32:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345165 - in head/sys: netinet netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head/sys: netinet netpfil/ipfw X-SVN-Commit-Revision: 345165 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B4FF370DD3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 22:32:53 -0000 Author: glebius Date: Thu Mar 14 22:32:50 2019 New Revision: 345165 URL: https://svnweb.freebsd.org/changeset/base/345165 Log: Remove 'dir' argument from dummynet_io(). This makes it possible to make dn_dir flags private to dummynet. There is still some room for improvement. Modified: head/sys/netinet/ip_var.h head/sys/netinet/raw_ip.c head/sys/netpfil/ipfw/ip_dn_io.c head/sys/netpfil/ipfw/ip_dn_private.h head/sys/netpfil/ipfw/ip_fw2.c head/sys/netpfil/ipfw/ip_fw_pfil.c head/sys/netpfil/ipfw/ip_fw_private.h Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Thu Mar 14 22:31:12 2019 (r345164) +++ head/sys/netinet/ip_var.h Thu Mar 14 22:32:50 2019 (r345165) @@ -296,7 +296,7 @@ extern void (*ip_divert_ptr)(struct mbuf *m, bool inco /* ng_ipfw hooks -- XXX make it the same as divert and dummynet */ extern int (*ng_ipfw_input_p)(struct mbuf **, struct ip_fw_args *, bool); extern int (*ip_dn_ctl_ptr)(struct sockopt *); -extern int (*ip_dn_io_ptr)(struct mbuf **, int, struct ip_fw_args *); +extern int (*ip_dn_io_ptr)(struct mbuf **, struct ip_fw_args *); #endif /* _KERNEL */ #endif /* !_NETINET_IP_VAR_H_ */ Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Thu Mar 14 22:31:12 2019 (r345164) +++ head/sys/netinet/raw_ip.c Thu Mar 14 22:32:50 2019 (r345165) @@ -100,7 +100,7 @@ VNET_DEFINE(ip_fw_chk_ptr_t, ip_fw_chk_ptr) = NULL; VNET_DEFINE(ip_fw_ctl_ptr_t, ip_fw_ctl_ptr) = NULL; int (*ip_dn_ctl_ptr)(struct sockopt *); -int (*ip_dn_io_ptr)(struct mbuf **, int, struct ip_fw_args *); +int (*ip_dn_io_ptr)(struct mbuf **, struct ip_fw_args *); void (*ip_divert_ptr)(struct mbuf *, bool); int (*ng_ipfw_input_p)(struct mbuf **, struct ip_fw_args *, bool); Modified: head/sys/netpfil/ipfw/ip_dn_io.c ============================================================================== --- head/sys/netpfil/ipfw/ip_dn_io.c Thu Mar 14 22:31:12 2019 (r345164) +++ head/sys/netpfil/ipfw/ip_dn_io.c Thu Mar 14 22:32:50 2019 (r345165) @@ -854,22 +854,27 @@ tag_mbuf(struct mbuf *m, int dir, struct ip_fw_args *f * We use the argument to locate the flowset fs and the sched_set sch * associated to it. The we apply flow_mask and sched_mask to * determine the queue and scheduler instances. - * - * dir where shall we send the packet after dummynet. - * *m0 the mbuf with the packet - * ifp the 'ifp' parameter from the caller. - * NULL in ip_input, destination interface in ip_output, */ int -dummynet_io(struct mbuf **m0, int dir, struct ip_fw_args *fwa) +dummynet_io(struct mbuf **m0, struct ip_fw_args *fwa) { struct mbuf *m = *m0; struct dn_fsk *fs = NULL; struct dn_sch_inst *si; struct dn_queue *q = NULL; /* default */ + int fs_id, dir; - int fs_id = (fwa->rule.info & IPFW_INFO_MASK) + + fs_id = (fwa->rule.info & IPFW_INFO_MASK) + ((fwa->rule.info & IPFW_IS_PIPE) ? 2*DN_MAX_ID : 0); + /* XXXGL: convert args to dir */ + if (fwa->flags & IPFW_ARGS_IN) + dir = DIR_IN; + else + dir = DIR_OUT; + if (fwa->flags & IPFW_ARGS_ETHER) + dir |= PROTO_LAYER2; + else if (fwa->flags & IPFW_ARGS_IP6) + dir |= PROTO_IPV6; DN_BH_WLOCK(); io_pkt++; /* we could actually tag outside the lock, but who cares... */ Modified: head/sys/netpfil/ipfw/ip_dn_private.h ============================================================================== --- head/sys/netpfil/ipfw/ip_dn_private.h Thu Mar 14 22:31:12 2019 (r345164) +++ head/sys/netpfil/ipfw/ip_dn_private.h Thu Mar 14 22:32:50 2019 (r345165) @@ -387,11 +387,26 @@ struct dn_pkt_tag { uint16_t iphdr_off; /* IP header offset for mtodo() */ }; +/* + * Possible values for dn_dir. XXXGL: this needs to be reviewed + * and converted to same values ip_fw_args.flags use. + */ +enum { + DIR_OUT = 0, + DIR_IN = 1, + DIR_FWD = 2, + DIR_DROP = 3, + PROTO_LAYER2 = 0x4, /* set for layer 2 */ + PROTO_IPV4 = 0x08, + PROTO_IPV6 = 0x10, + PROTO_IFB = 0x0c, /* layer2 + ifbridge */ +}; + extern struct dn_parms dn_cfg; //VNET_DECLARE(struct dn_parms, _base_dn_cfg); //#define dn_cfg VNET(_base_dn_cfg) -int dummynet_io(struct mbuf **, int , struct ip_fw_args *); +int dummynet_io(struct mbuf **, 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); Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Thu Mar 14 22:31:12 2019 (r345164) +++ head/sys/netpfil/ipfw/ip_fw2.c Thu Mar 14 22:32:50 2019 (r345165) @@ -1436,6 +1436,7 @@ do { \ struct ip6_hdr *ip6 = (struct ip6_hdr *)ip; is_ipv6 = 1; + args->flags |= IPFW_ARGS_IP6; hlen = sizeof(struct ip6_hdr); proto = ip6->ip6_nxt; /* Search extension headers to find upper layer protocols */ @@ -1618,6 +1619,7 @@ do { \ } else if (pktlen >= sizeof(struct ip) && (etype == 0 || etype == ETHERTYPE_IP) && ip->ip_v == 4) { is_ipv4 = 1; + args->flags |= IPFW_ARGS_IP4; hlen = ip->ip_hl << 2; /* * Collect parameters into local variables for faster Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_pfil.c Thu Mar 14 22:31:12 2019 (r345164) +++ head/sys/netpfil/ipfw/ip_fw_pfil.c Thu Mar 14 22:32:50 2019 (r345165) @@ -124,10 +124,9 @@ ipfw_check_packet(struct mbuf **m0, struct ifnet *ifp, struct ip_fw_args args; struct m_tag *tag; pfil_return_t ret; - int ipfw, dir; + int ipfw; args.flags = (flags & PFIL_IN) ? IPFW_ARGS_IN : IPFW_ARGS_OUT; - dir = (flags & PFIL_IN) ? DIR_IN : DIR_OUT; again: /* * extract and remove the tag if present. If we are left @@ -254,10 +253,8 @@ again: break; } MPASS(args.flags & IPFW_ARGS_REF); - if (mtod(*m0, struct ip *)->ip_v == 4) - (void )ip_dn_io_ptr(m0, dir, &args); - else if (mtod(*m0, struct ip *)->ip_v == 6) - (void )ip_dn_io_ptr(m0, dir | PROTO_IPV6, &args); + if (args.flags & (IPFW_ARGS_IP4 | IPFW_ARGS_IP6)) + (void )ip_dn_io_ptr(m0, &args); else { ret = PFIL_DROPPED; break; @@ -331,7 +328,7 @@ again: * ipfw processing for ethernet packets (in and out). */ static pfil_return_t -ipfw_check_frame(struct mbuf **m0, struct ifnet *ifp, int dir, +ipfw_check_frame(struct mbuf **m0, struct ifnet *ifp, int flags, void *ruleset __unused, struct inpcb *inp) { struct ip_fw_args args; @@ -343,7 +340,7 @@ ipfw_check_frame(struct mbuf **m0, struct ifnet *ifp, int i; args.flags = IPFW_ARGS_ETHER; - args.flags |= (dir & PFIL_IN) ? IPFW_ARGS_IN : IPFW_ARGS_OUT; + args.flags |= (flags & PFIL_IN) ? IPFW_ARGS_IN : IPFW_ARGS_OUT; again: /* fetch start point from rule, if any. remove the tag if present. */ mtag = m_tag_locate(*m0, MTAG_IPFW_RULE, 0, NULL); @@ -407,9 +404,8 @@ again: break; } *m0 = NULL; - dir = (dir & PFIL_IN) ? DIR_IN : DIR_OUT; MPASS(args.flags & IPFW_ARGS_REF); - ip_dn_io_ptr(&m, dir | PROTO_LAYER2, &args); + ip_dn_io_ptr(&m, &args); return (PFIL_CONSUMED); case IP_FW_NGTEE: Modified: head/sys/netpfil/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_private.h Thu Mar 14 22:31:12 2019 (r345164) +++ head/sys/netpfil/ipfw/ip_fw_private.h Thu Mar 14 22:32:50 2019 (r345165) @@ -136,28 +136,6 @@ struct ip_fw_args { MALLOC_DECLARE(M_IPFW); -/* - * Hooks sometime need to know the direction of the packet - * (divert, dummynet, netgraph, ...) - * We use a generic definition here, with bit0-1 indicating the - * direction, bit 2 indicating layer2 or 3, bit 3-4 indicating the - * specific protocol - * indicating the protocol (if necessary) - */ -enum { - DIR_MASK = 0x3, - DIR_OUT = 0, - DIR_IN = 1, - DIR_FWD = 2, - DIR_DROP = 3, - PROTO_LAYER2 = 0x4, /* set for layer 2 */ - /* PROTO_DEFAULT = 0, */ - PROTO_IPV4 = 0x08, - PROTO_IPV6 = 0x10, - PROTO_IFB = 0x0c, /* layer2 + ifbridge */ - /* PROTO_OLDBDG = 0x14, unused, old bridge */ -}; - /* wrapper for freeing a packet, in case we need to do more work */ #ifndef FREE_PKT #if defined(__linux__) || defined(_WIN32) From owner-svn-src-all@freebsd.org Thu Mar 14 22:42:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B75A21531A87; Thu, 14 Mar 2019 22:42:16 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 4EE2471441; Thu, 14 Mar 2019 22:42:16 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (v-critter.freebsd.dk [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id CDDEB202562A; Thu, 14 Mar 2019 22:42:08 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id x2EMg8ET001701 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 14 Mar 2019 22:42:08 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id x2EMg8Z4001700; Thu, 14 Mar 2019 22:42:08 GMT (envelope-from phk) To: Ed Maste cc: "Rodney W. Grimes" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r345138 - head/share/man/man9 In-reply-to: From: "Poul-Henning Kamp" References: <201903141709.x2EH97e7090941@repo.freebsd.org> <201903141855.x2EIt2ih026401@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1698.1552603328.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Thu, 14 Mar 2019 22:42:08 +0000 Message-ID: <1699.1552603328@critter.freebsd.dk> X-Rspamd-Queue-Id: 4EE2471441 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 22:42:16 -0000 -------- In message , Ed Maste writes: >On Thu, 14 Mar 2019 at 14:55, Rodney W. Grimes >Doing some archaeology, the first instance of a uuencoded file I can >find is r1796, "Got rid of a couple of binary files by uuencoding. 49 >more to go." There's no explanation of why the change was made. I am pretty sure that we discussed the question of binary files in the tree on either core@ or hackers@ (not much difference back then), but that probably predates the "Dont mount the projects mail archives on /tmp/something" incident. The first versions of CTM used diff -e and ed(1) to transmit changes, and that choked up on binary files. We didn't have patch in the tree back then. I can't answer definitively if modern CTM has any such restrictions, but I would not expect so, either way, it should not matter. >> We should also note that if they are already in uuencode state >> to leave them in uuencode state, or do we intened to convert >> them on next commit, or ??? > >Good point, converting existing .uu files to binary is just >unnecessary churn and is not recommended. If someone is going to make >a change it can be done with the next update. Agreed. -- = Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe = Never attribute to malice what can adequately be explained by incompetence= . From owner-svn-src-all@freebsd.org Thu Mar 14 22:52:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3E15153211E; Thu, 14 Mar 2019 22:52:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7FCFB71A90; Thu, 14 Mar 2019 22:52:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 533D51358; Thu, 14 Mar 2019 22:52:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EMqHfI074948; Thu, 14 Mar 2019 22:52:17 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EMqGss074944; Thu, 14 Mar 2019 22:52:16 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201903142252.x2EMqGss074944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 14 Mar 2019 22:52:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345166 - head/sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/netpfil/ipfw X-SVN-Commit-Revision: 345166 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7FCFB71A90 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 22:52:18 -0000 Author: glebius Date: Thu Mar 14 22:52:16 2019 New Revision: 345166 URL: https://svnweb.freebsd.org/changeset/base/345166 Log: PFIL_MEMPTR for ipfw link level hook With new pfil(9) KPI it is possible to pass a void pointer with length instead of mbuf pointer to a packet filter. Until this commit no filters supported that, so pfil run through a shim function pfil_fake_mbuf(). Now the ipfw(4) hook named "default-link", that is instantiated when net.link.ether.ipfw sysctl is on, supports processing pointer/length packets natively. - ip_fw_args now has union for either mbuf or void *, and if flags have non-zero length, then we use the void *. - through ipfw_chk() we handle mem/mbuf cases differently. - ether_header goes away from args. It is ipfw_chk() responsibility to do parsing of Ethernet header. - ipfw_log() now uses different bpf APIs to log packets. Although ipfw_chk() is now capable to process pointer/length packets, this commit adds support for the link level hook only, see ipfw_check_frame(). Potentially the IP processing hook ipfw_check_packet() can be improved too, but that requires more changes since the hook supports more complex actions: NAT, divert, etc. Reviewed by: ae Differential Revision: https://reviews.freebsd.org/D19357 Modified: head/sys/netpfil/ipfw/ip_fw2.c head/sys/netpfil/ipfw/ip_fw_bpf.c head/sys/netpfil/ipfw/ip_fw_log.c head/sys/netpfil/ipfw/ip_fw_pfil.c head/sys/netpfil/ipfw/ip_fw_private.h Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Thu Mar 14 22:32:50 2019 (r345165) +++ head/sys/netpfil/ipfw/ip_fw2.c Thu Mar 14 22:52:16 2019 (r345166) @@ -1258,7 +1258,6 @@ jump_linear(struct ip_fw_chain *chain, struct ip_fw *f * * args->m (in/out) The packet; we set to NULL when/if we nuke it. * Starts with the IP header. - * args->eh (in) Mac header if present, NULL for layer3 packet. * args->L3offset Number of bytes bypassed if we came from L2. * e.g. often sizeof(eh) ** NOTYET ** * args->ifp Incoming or outgoing interface. @@ -1297,23 +1296,19 @@ ipfw_chk(struct ip_fw_args *args) * the implementation of the various instructions to make sure * that they still work. * - * args->eh The MAC header. It is non-null for a layer2 - * packet, it is NULL for a layer-3 packet. - * **notyet** - * args->L3offset Offset in the packet to the L3 (IP or equiv.) header. - * * m | args->m Pointer to the mbuf, as received from the caller. * It may change if ipfw_chk() does an m_pullup, or if it * consumes the packet because it calls send_reject(). * XXX This has to change, so that ipfw_chk() never modifies * or consumes the buffer. - * ip is the beginning of the ip(4 or 6) header. - * Calculated by adding the L3offset to the start of data. - * (Until we start using L3offset, the packet is - * supposed to start with the ip header). + * OR + * args->mem Pointer to contigous memory chunk. + * ip Is the beginning of the ip(4 or 6) header. + * eh Ethernet header in case if input is Layer2. */ - struct mbuf *m = args->m; - struct ip *ip = mtod(m, struct ip *); + struct mbuf *m; + struct ip *ip; + struct ether_header *eh; /* * For rules which contain uid/gid or jail constraints, cache @@ -1370,7 +1365,6 @@ ipfw_chk(struct ip_fw_args *args) struct in_addr src_ip, dst_ip; /* NOTE: network format */ int iplen = 0; int pktlen; - uint16_t etype; /* Host order stored ether type */ struct ipfw_dyn_info dyn_info; struct ip_fw *q = NULL; @@ -1394,14 +1388,45 @@ ipfw_chk(struct ip_fw_args *args) int done = 0; /* flag to exit the outer loop */ IPFW_RLOCK_TRACKER; + bool mem; - if (m->m_flags & M_SKIP_FIREWALL || (! V_ipfw_vnet_ready)) - return (IP_FW_PASS); /* accept */ + if ((mem = (args->flags & IPFW_ARGS_LENMASK))) { + if (args->flags & IPFW_ARGS_ETHER) { + eh = (struct ether_header *)args->mem; + if (eh->ether_type == htons(ETHERTYPE_VLAN)) + ip = (struct ip *) + ((struct ether_vlan_header *)eh + 1); + else + ip = (struct ip *)(eh + 1); + } else { + eh = NULL; + ip = (struct ip *)args->mem; + } + pktlen = IPFW_ARGS_LENGTH(args->flags); + args->f_id.fib = args->ifp->if_fib; /* best guess */ + } else { + m = args->m; + if (m->m_flags & M_SKIP_FIREWALL || (! V_ipfw_vnet_ready)) + return (IP_FW_PASS); /* accept */ + if (args->flags & IPFW_ARGS_ETHER) { + /* We need some amount of data to be contiguous. */ + if (m->m_len < min(m->m_pkthdr.len, max_protohdr) && + (args->m = m = m_pullup(m, min(m->m_pkthdr.len, + max_protohdr))) == NULL) + goto pullup_failed; + eh = mtod(m, struct ether_header *); + ip = (struct ip *)(eh + 1); + } else { + eh = NULL; + ip = mtod(m, struct ip *); + } + pktlen = m->m_pkthdr.len; + args->f_id.fib = M_GETFIB(m); /* mbuf not altered */ + } dst_ip.s_addr = 0; /* make sure it is initialized */ src_ip.s_addr = 0; /* make sure it is initialized */ src_port = dst_port = 0; - pktlen = m->m_pkthdr.len; DYN_INFO_INIT(&dyn_info); /* @@ -1411,28 +1436,41 @@ ipfw_chk(struct ip_fw_args *args) * this way). */ #define PULLUP_TO(_len, p, T) PULLUP_LEN(_len, p, sizeof(T)) +#define EHLEN (eh != NULL ? ((char *)ip - (char *)eh) : 0) #define PULLUP_LEN(_len, p, T) \ do { \ - int x = (_len) + T; \ - if ((m)->m_len < x) { \ - args->m = m = m_pullup(m, x); \ - if (m == NULL) \ - goto pullup_failed; \ + int x = (_len) + T + EHLEN; \ + if (mem) { \ + MPASS(pktlen >= x); \ + p = (char *)args->mem + (_len) + EHLEN; \ + } else { \ + if (__predict_false((m)->m_len < x)) { \ + args->m = m = m_pullup(m, x); \ + if (m == NULL) \ + goto pullup_failed; \ + } \ + p = mtod(m, char *) + (_len) + EHLEN; \ } \ - p = (mtod(m, char *) + (_len)); \ } while (0) +/* + * In case pointers got stale after pullups, update them. + */ +#define UPDATE_POINTERS() \ +do { \ + if (!mem) { \ + if (eh != NULL) { \ + eh = mtod(m, struct ether_header *); \ + ip = (struct ip *)(eh + 1); \ + } else \ + ip = mtod(m, struct ip *); \ + args->m = m; \ + } \ +} while (0) - /* - * if we have an ether header, - */ - if (args->flags & IPFW_ARGS_ETHER) - etype = ntohs(args->eh->ether_type); - else - etype = 0; - /* Identify IP packets and fill up variables. */ if (pktlen >= sizeof(struct ip6_hdr) && - (etype == 0 || etype == ETHERTYPE_IPV6) && ip->ip_v == 6) { + (eh == NULL || eh->ether_type == htons(ETHERTYPE_IPV6)) && + ip->ip_v == 6) { struct ip6_hdr *ip6 = (struct ip6_hdr *)ip; is_ipv6 = 1; @@ -1609,7 +1647,7 @@ do { \ break; } /*switch */ } - ip = mtod(m, struct ip *); + UPDATE_POINTERS(); ip6 = (struct ip6_hdr *)ip; args->f_id.addr_type = 6; args->f_id.src_ip6 = ip6->ip6_src; @@ -1617,7 +1655,8 @@ do { \ args->f_id.flow_id6 = ntohl(ip6->ip6_flow); iplen = ntohs(ip6->ip6_plen) + sizeof(*ip6); } else if (pktlen >= sizeof(struct ip) && - (etype == 0 || etype == ETHERTYPE_IP) && ip->ip_v == 4) { + (eh == NULL || eh->ether_type == htons(ETHERTYPE_IP)) && + ip->ip_v == 4) { is_ipv4 = 1; args->flags |= IPFW_ARGS_IP4; hlen = ip->ip_hl << 2; @@ -1675,7 +1714,7 @@ do { \ } } - ip = mtod(m, struct ip *); + UPDATE_POINTERS(); args->f_id.addr_type = 4; args->f_id.src_ip = ntohl(src_ip.s_addr); args->f_id.dst_ip = ntohl(dst_ip.s_addr); @@ -1692,7 +1731,6 @@ do { \ args->f_id.proto = proto; args->f_id.src_port = src_port = ntohs(src_port); args->f_id.dst_port = dst_port = ntohs(dst_port); - args->f_id.fib = M_GETFIB(m); IPFW_PF_RLOCK(chain); if (! V_ipfw_vnet_ready) { /* shutting down, leave NOW. */ @@ -1720,7 +1758,7 @@ do { \ oif = NULL; } else { MPASS(args->flags & IPFW_ARGS_OUT); - iif = m->m_pkthdr.rcvif; + iif = mem ? NULL : m->m_pkthdr.rcvif; oif = args->ifp; } @@ -1840,7 +1878,7 @@ do { \ ((ipfw_insn_mac *)cmd)->addr; u_int32_t *mask = (u_int32_t *) ((ipfw_insn_mac *)cmd)->mask; - u_int32_t *hdr = (u_int32_t *)args->eh; + u_int32_t *hdr = (u_int32_t *)eh; match = ( want[0] == (hdr[0] & mask[0]) && @@ -1857,8 +1895,11 @@ do { \ for (i = cmdlen - 1; !match && i>0; i--, p += 2) - match = (etype >= p[0] && - etype <= p[1]); + match = + (ntohs(eh->ether_type) >= + p[0] && + ntohs(eh->ether_type) <= + p[1]); } break; @@ -2332,7 +2373,7 @@ do { \ } case O_LOG: - ipfw_log(chain, f, hlen, args, m, + ipfw_log(chain, f, hlen, args, offset | ip6f_mf, tablearg, ip); match = 1; break; Modified: head/sys/netpfil/ipfw/ip_fw_bpf.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_bpf.c Thu Mar 14 22:32:50 2019 (r345165) +++ head/sys/netpfil/ipfw/ip_fw_bpf.c Thu Mar 14 22:52:16 2019 (r345166) @@ -161,6 +161,28 @@ ipfwlog_clone_create(struct if_clone *ifc, int unit, c } void +ipfw_bpf_tap(u_char *pkt, u_int pktlen) +{ + LOGIF_RLOCK_TRACKER; + + LOGIF_RLOCK(); + if (V_log_if != NULL) + BPF_TAP(V_log_if, pkt, pktlen); + LOGIF_RUNLOCK(); +} + +void +ipfw_bpf_mtap(struct mbuf *m) +{ + LOGIF_RLOCK_TRACKER; + + LOGIF_RLOCK(); + if (V_log_if != NULL) + BPF_MTAP(V_log_if, m); + LOGIF_RUNLOCK(); +} + +void ipfw_bpf_mtap2(void *data, u_int dlen, struct mbuf *m) { struct ifnet *logif; Modified: head/sys/netpfil/ipfw/ip_fw_log.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_log.c Thu Mar 14 22:32:50 2019 (r345165) +++ head/sys/netpfil/ipfw/ip_fw_log.c Thu Mar 14 22:52:16 2019 (r345166) @@ -99,30 +99,32 @@ __FBSDID("$FreeBSD$"); */ void ipfw_log(struct ip_fw_chain *chain, struct ip_fw *f, u_int hlen, - struct ip_fw_args *args, struct mbuf *m, - u_short offset, uint32_t tablearg, struct ip *ip) + struct ip_fw_args *args, u_short offset, uint32_t tablearg, struct ip *ip) { char *action; int limit_reached = 0; char action2[92], proto[128], fragment[32]; if (V_fw_verbose == 0) { - if (args->flags & IPFW_ARGS_ETHER) /* layer2, use orig hdr */ - ipfw_bpf_mtap2(args->eh, ETHER_HDR_LEN, m); + if (args->flags & IPFW_ARGS_LENMASK) + ipfw_bpf_tap(args->mem, IPFW_ARGS_LENGTH(args->flags)); + else if (args->flags & IPFW_ARGS_ETHER) + /* layer2, use orig hdr */ + ipfw_bpf_mtap(args->m); else { /* Add fake header. Later we will store * more info in the header. */ if (ip->ip_v == 4) ipfw_bpf_mtap2("DDDDDDSSSSSS\x08\x00", - ETHER_HDR_LEN, m); + ETHER_HDR_LEN, args->m); else if (ip->ip_v == 6) ipfw_bpf_mtap2("DDDDDDSSSSSS\x86\xdd", - ETHER_HDR_LEN, m); + ETHER_HDR_LEN, args->m); else /* Obviously bogus EtherType. */ ipfw_bpf_mtap2("DDDDDDSSSSSS\xff\xff", - ETHER_HDR_LEN, m); + ETHER_HDR_LEN, args->m); } return; } Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_pfil.c Thu Mar 14 22:32:50 2019 (r345165) +++ head/sys/netpfil/ipfw/ip_fw_pfil.c Thu Mar 14 22:52:16 2019 (r345166) @@ -328,69 +328,50 @@ again: * ipfw processing for ethernet packets (in and out). */ static pfil_return_t -ipfw_check_frame(struct mbuf **m0, struct ifnet *ifp, int flags, +ipfw_check_frame(pfil_packet_t p, struct ifnet *ifp, int flags, void *ruleset __unused, struct inpcb *inp) { struct ip_fw_args args; - struct ether_header save_eh; - struct ether_header *eh; - struct m_tag *mtag; - struct mbuf *m; pfil_return_t ret; - int i; + bool mem, realloc; + int ipfw; - args.flags = IPFW_ARGS_ETHER; - args.flags |= (flags & PFIL_IN) ? IPFW_ARGS_IN : IPFW_ARGS_OUT; -again: - /* fetch start point from rule, if any. remove the tag if present. */ - mtag = m_tag_locate(*m0, MTAG_IPFW_RULE, 0, NULL); - if (mtag != NULL) { - args.rule = *((struct ipfw_rule_ref *)(mtag+1)); - m_tag_delete(*m0, mtag); - if (args.rule.info & IPFW_ONEPASS) - return (0); - args.flags |= IPFW_ARGS_REF; + if (flags & PFIL_MEMPTR) { + mem = true; + realloc = false; + args.flags = PFIL_LENGTH(flags) | IPFW_ARGS_ETHER; + args.mem = p.mem; + } else { + mem = realloc = false; + args.flags = IPFW_ARGS_ETHER; } - - /* I need some amt of data to be contiguous */ - m = *m0; - i = min(m->m_pkthdr.len, max_protohdr); - if (m->m_len < i) { - m = m_pullup(m, i); - if (m == NULL) { - *m0 = m; - return (0); - } - } - eh = mtod(m, struct ether_header *); - save_eh = *eh; /* save copy for restore below */ - m_adj(m, ETHER_HDR_LEN); /* strip ethernet header */ - - args.m = m; /* the packet we are looking at */ + args.flags |= (flags & PFIL_IN) ? IPFW_ARGS_IN : IPFW_ARGS_OUT; args.ifp = ifp; - args.eh = &save_eh; /* MAC header for bridged/MAC packets */ - args.inp = inp; /* used by ipfw uid/gid/jail rules */ - i = ipfw_chk(&args); - m = args.m; - if (m != NULL) { + args.inp = inp; + +again: + if (!mem) { /* - * Restore Ethernet header, as needed, in case the - * mbuf chain was replaced by ipfw. + * Fetch start point from rule, if any. + * Remove the tag if present. */ - M_PREPEND(m, ETHER_HDR_LEN, M_NOWAIT); - if (m == NULL) { - *m0 = NULL; - return (0); + struct m_tag *mtag; + + mtag = m_tag_locate(*p.m, MTAG_IPFW_RULE, 0, NULL); + if (mtag != NULL) { + args.rule = *((struct ipfw_rule_ref *)(mtag+1)); + m_tag_delete(*p.m, mtag); + if (args.rule.info & IPFW_ONEPASS) + return (PFIL_PASS); + args.flags |= IPFW_ARGS_REF; } - if (eh != mtod(m, struct ether_header *)) - bcopy(&save_eh, mtod(m, struct ether_header *), - ETHER_HDR_LEN); + args.m = *p.m; } - *m0 = m; + ipfw = ipfw_chk(&args); + ret = PFIL_PASS; - /* Check result of ipfw_chk() */ - switch (i) { + switch (ipfw) { case IP_FW_PASS: break; @@ -403,9 +384,16 @@ again: ret = PFIL_DROPPED; break; } - *m0 = NULL; + if (mem) { + if (pfil_realloc(&p, flags, ifp) != 0) { + ret = PFIL_DROPPED; + break; + } + mem = false; + realloc = true; + } MPASS(args.flags & IPFW_ARGS_REF); - ip_dn_io_ptr(&m, &args); + ip_dn_io_ptr(p.m, &args); return (PFIL_CONSUMED); case IP_FW_NGTEE: @@ -414,9 +402,17 @@ again: ret = PFIL_DROPPED; break; } + if (mem) { + if (pfil_realloc(&p, flags, ifp) != 0) { + ret = PFIL_DROPPED; + break; + } + mem = false; + realloc = true; + } MPASS(args.flags & IPFW_ARGS_REF); - (void )ng_ipfw_input_p(m0, &args, i == IP_FW_NGTEE); - if (i == IP_FW_NGTEE) /* ignore errors for NGTEE */ + (void )ng_ipfw_input_p(p.m, &args, ipfw == IP_FW_NGTEE); + if (ipfw == IP_FW_NGTEE) /* ignore errors for NGTEE */ goto again; /* continue with packet */ ret = PFIL_CONSUMED; break; @@ -425,12 +421,15 @@ again: KASSERT(0, ("%s: unknown retval", __func__)); } - if (ret != PFIL_PASS) { - if (*m0) - FREE_PKT(*m0); - *m0 = NULL; + if (!mem && ret != PFIL_PASS) { + if (*p.m) + FREE_PKT(*p.m); + *p.m = NULL; } + if (realloc && ret == PFIL_PASS) + ret = PFIL_REALLOCED; + return (ret); } @@ -545,7 +544,7 @@ ipfw_hook(int onoff, int pf) pfil_hook_t *h; pha.pa_version = PFIL_VERSION; - pha.pa_flags = PFIL_IN | PFIL_OUT; + pha.pa_flags = PFIL_IN | PFIL_OUT | PFIL_MEMPTR; pha.pa_modname = "ipfw"; pha.pa_ruleset = NULL; Modified: head/sys/netpfil/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_private.h Thu Mar 14 22:32:50 2019 (r345165) +++ head/sys/netpfil/ipfw/ip_fw_private.h Thu Mar 14 22:52:16 2019 (r345166) @@ -111,14 +111,11 @@ struct ip_fw_args { struct inpcb *inp; union { /* - * We don't support forwarding on layer2, thus we can - * keep eh pointer in this union. * next_hop[6] pointers can be used to point to next hop * stored in rule's opcode to avoid copying into hopstore. * Also, it is expected that all 0x1-0x10 flags are mutually * exclusive. */ - struct ether_header *eh; /* for bridged packets */ struct sockaddr_in *next_hop; struct sockaddr_in6 *next_hop6; /* ipfw next hop storage */ @@ -129,8 +126,10 @@ struct ip_fw_args { uint16_t sin6_port; } hopstore6; }; - - struct mbuf *m; /* the mbuf chain */ + union { + struct mbuf *m; /* the mbuf chain */ + void *mem; /* or memory pointer */ + }; struct ipfw_flow_id f_id; /* grabbed from IP header */ }; @@ -164,10 +163,11 @@ struct ip_fw_chain; void ipfw_bpf_init(int); void ipfw_bpf_uninit(int); +void ipfw_bpf_tap(u_char *, u_int); +void ipfw_bpf_mtap(struct mbuf *); void ipfw_bpf_mtap2(void *, u_int, struct mbuf *); void ipfw_log(struct ip_fw_chain *chain, struct ip_fw *f, u_int hlen, - struct ip_fw_args *args, struct mbuf *m, - u_short offset, uint32_t tablearg, struct ip *ip); + struct ip_fw_args *args, u_short offset, uint32_t tablearg, struct ip *ip); VNET_DECLARE(u_int64_t, norule_counter); #define V_norule_counter VNET(norule_counter) VNET_DECLARE(int, verbose_limit); From owner-svn-src-all@freebsd.org Thu Mar 14 23:10:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BED831532E3D for ; Thu, 14 Mar 2019 23:10:07 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-yw1-xc2e.google.com (mail-yw1-xc2e.google.com [IPv6:2607:f8b0:4864:20::c2e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 43AC5728F9 for ; Thu, 14 Mar 2019 23:10:05 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-yw1-xc2e.google.com with SMTP id j66so5814435ywc.10 for ; Thu, 14 Mar 2019 16:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=sFZqCyrC197WtdiLngm2zOe83AfAzzee3UoI/KKMGGk=; b=fjuZtmjVD2Ymy84k+xiJ4tU5woxA1K6/DSGjzpbXTkSnL6R+NyPDV6tziXsi8Ku7+r uk9ZD4W9MpQpK29JD2fdapEpRcYxsFyfDixQQgexzDQYFcZondYGQHx9231kjyxJWSse A87kyAjWqSE1hfmYj59HmkOLMU+MA9UnZ126XXfPxyP56ITl9+Ya+guicCOyBKQyGQzG 3C9LrRv+45yoQ3IPeYqIhVx9rpU7mOrwFRXfV9rH0xNLoyXWpHekvJaPPhJq3JjcvJ1R RUdfPkqme1ebCqycg4YeqUn8LTqI0/nOTc84OGhZDNnE2bqTG6eZC6+n5tfBOkP8yxAU Dk7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=sFZqCyrC197WtdiLngm2zOe83AfAzzee3UoI/KKMGGk=; b=FBHs/BqGyht58ETnPqSbjqNZQXUV22zRnpsyUuiFnDz3EENsM7o2HhWCsjab3dDdZv Vke7HEr5fVBNBjbYNuR/6KVoTma4b81iB2Op1ADXpCiwN6YM3zKnaT30NBp9WHVbV17+ p3UNn3gDznyiE6zw/ioQLqW7GlI5Xzf0BgWYCPIZ2KVptAHDNoKsrBfKaEIwuVMJZnaE YDu1ZXNS0mLhiPRMR0cDwEGJbcbD2x4yVZe9gThc2i7Rff6Se8nNqRgi2+N1T0b8NTPW SmjaQ4nuHv/CvWTyGkKpYAR1o39WhL+QWRzGSB4do8eRCgiyBLkfAu5gZfrFMAvn+QsR 4Q/A== X-Gm-Message-State: APjAAAUNsLOHAikqGlz+h4UOM6zh/2/V9Tf144Mii/0smU10UNi06mSH 101QxbNjvwij56/EuSRpmAa4ICI9TJE6Qf8ReKsZHjGf X-Google-Smtp-Source: APXvYqxTlV4bK2o+syoommf9/MuZN8dLj717QR2be7Jld6jPBE+sivfxLVKGD1Kiwu37e5OYCbHq+DomaZnv7xbVwGA= X-Received: by 2002:a25:a027:: with SMTP id x36mr594688ybh.158.1552605005110; Thu, 14 Mar 2019 16:10:05 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a5b:b0e:0:0:0:0:0 with HTTP; Thu, 14 Mar 2019 16:10:04 -0700 (PDT) In-Reply-To: <201804061300.w36D0jTT025330@repo.freebsd.org> References: <201804061300.w36D0jTT025330@repo.freebsd.org> From: Oliver Pinter Date: Fri, 15 Mar 2019 00:10:04 +0100 Message-ID: Subject: Re: svn commit: r332100 - in head: . lib/libc/gen sys/sys To: Ed Schouten Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Rspamd-Queue-Id: 43AC5728F9 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=fjuZtmjV; spf=pass (mx1.freebsd.org: domain of oliver.pinter@hardenedbsd.org designates 2607:f8b0:4864:20::c2e as permitted sender) smtp.mailfrom=oliver.pinter@hardenedbsd.org X-Spamd-Result: default: False [-6.17 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[hardenedbsd.org:s=google]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[hardenedbsd.org]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[hardenedbsd.org:+]; MX_GOOD(-0.01)[alt1.aspmx.l.google.com,aspmx.l.google.com,aspmx2.googlemail.com,alt2.aspmx.l.google.com,aspmx3.googlemail.com]; RCVD_IN_DNSWL_NONE(0.00)[e.2.c.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.89)[-0.885,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; IP_SCORE(-2.77)[ip: (-8.99), ipnet: 2607:f8b0::/32(-2.73), asn: 15169(-2.08), country: US(-0.07)] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 23:10:08 -0000 On Friday, April 6, 2018, Ed Schouten wrote: > Author: ed > Date: Fri Apr 6 13:00:45 2018 > New Revision: 332100 > URL: https://svnweb.freebsd.org/changeset/base/332100 > > Log: > Let syslog(3) use RFC 5424. > > With r332099 changing syslogd(8) to parse RFC 5424 formatted syslog > messages, go ahead and also change the syslog(3) libc function to > generate them. Compared to RFC 3164, RFC 5424 has various advantages, > such as sub-second precision for log entry timestamps. > > As this change could have adverse effects when not updating syslogd(8) > or using a different system logging daemon, add a notice to UPDATING and > increase __FreeBSD_version. > > Differential Revision: https://reviews.freebsd.org/D14926 += relnotes = yes > > Modified: > head/UPDATING > head/lib/libc/gen/syslog.3 > head/lib/libc/gen/syslog.c > head/sys/sys/param.h > > Modified: head/UPDATING > ============================================================ > ================== > --- head/UPDATING Fri Apr 6 12:57:01 2018 (r332099) > +++ head/UPDATING Fri Apr 6 13:00:45 2018 (r332100) > @@ -51,6 +51,45 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: > > ****************************** SPECIAL WARNING: > ****************************** > > +20180406: > + In addition to supporting RFC 3164 formatted messages, the > + syslogd(8) service is now capable of parsing RFC 5424 formatted > + log messages. The main benefit of using RFC 5424 is that clients > + may now send log messages with timestamps containing year numbers, > + microseconds and time zone offsets. > + > + Similarly, the syslog(3) C library function has been altered to > + send RFC 5424 formatted messages to the local system logging > + daemon. On systems using syslogd(8), this change should have no > + negative impact, as long as syslogd(8) and the C library are > + updated at the same time. On systems using a different system > + logging daemon, it may be necessary to make configuration > + adjustments, depending on the software used. > + > + When using syslog-ng, add the 'syslog-protocol' flag to local > + input sources to enable parsing of RFC 5424 formatted messages: > + > + source src { > + unix-dgram("/var/run/log" flags(syslog-protocol)); > + } > + > + When using rsyslog, disable the 'SysSock.UseSpecialParser' option > + of the 'imuxsock' module to let messages be processed by the > + regular RFC 3164/5424 parsing pipeline: > + > + module(load="imuxsock" SysSock.UseSpecialParser="off") > + > + Do note that these changes only affect communication between local > + applications and syslogd(8). The format that syslogd(8) uses to > + store messages on disk or forward messages to other systems > + remains unchanged. syslogd(8) still uses RFC 3164 for these > + purposes. Options to customize this behaviour will be added in the > + future. Utilities that process log files stored in /var/log are > + thus expected to continue to function as before. > + > + __FreeBSD_version has been incremented to 1200061 to denote this > + change. > + > 20180328: > Support for token ring networks has been removed. If you > have "device token" in your kernel config you should remove > > Modified: head/lib/libc/gen/syslog.3 > ============================================================ > ================== > --- head/lib/libc/gen/syslog.3 Fri Apr 6 12:57:01 2018 (r332099) > +++ head/lib/libc/gen/syslog.3 Fri Apr 6 13:00:45 2018 (r332100) > @@ -28,7 +28,7 @@ > .\" @(#)syslog.3 8.1 (Berkeley) 6/4/93 > .\" $FreeBSD$ > .\" > -.Dd November 5, 2017 > +.Dd April 6, 2018 > .Dt SYSLOG 3 > .Os > .Sh NAME > @@ -156,6 +156,9 @@ Write the message to standard error output as well to > .It Dv LOG_PID > Log the process id with each message: useful for identifying > instantiations of daemons. > +On > +.Fx , > +this option is enabled by default. > .El > .Pp > The > > Modified: head/lib/libc/gen/syslog.c > ============================================================ > ================== > --- head/lib/libc/gen/syslog.c Fri Apr 6 12:57:01 2018 (r332099) > +++ head/lib/libc/gen/syslog.c Fri Apr 6 13:00:45 2018 (r332100) > @@ -36,9 +36,10 @@ static char sccsid[] = "@(#)syslog.c 8.5 (Berkeley) 4/ > __FBSDID("$FreeBSD$"); > > #include "namespace.h" > -#include > +#include > #include > #include > +#include > #include > #include > #include > @@ -134,11 +135,13 @@ syslog(int pri, const char *fmt, ...) > static void > vsyslog1(int pri, const char *fmt, va_list ap) > { > - int cnt; > + struct timeval now; > + struct tm tm; > char ch, *p; > - time_t now; > - int fd, saved_errno; > - char *stdp, tbuf[2048], fmt_cpy[1024], timbuf[26], errstr[64]; > + long tz_offset; > + int cnt, fd, saved_errno; > + char hostname[MAXHOSTNAMELEN], *stdp, tbuf[2048], fmt_cpy[1024], > + errstr[64], tz_sign; > FILE *fp, *fmt_fp; > struct bufcookie tbuf_cookie; > struct bufcookie fmt_cookie; > @@ -168,24 +171,46 @@ vsyslog1(int pri, const char *fmt, va_list ap) > if (fp == NULL) > return; > > - /* Build the message. */ > - (void)time(&now); > - (void)fprintf(fp, "<%d>", pri); > - (void)fprintf(fp, "%.15s ", ctime_r(&now, timbuf) + 4); > + /* Build the message according to RFC 5424. Tag and version. */ > + (void)fprintf(fp, "<%d>1 ", pri); > + /* Timestamp similar to RFC 3339. */ > + if (gettimeofday(&now, NULL) == 0 && > + localtime_r(&now.tv_sec, &tm) != NULL) { > + if (tm.tm_gmtoff < 0) { > + tz_sign = '-'; > + tz_offset = -tm.tm_gmtoff; > + } else { > + tz_sign = '+'; > + tz_offset = tm.tm_gmtoff; > + } > + > + (void)fprintf(fp, > + "%04d-%02d-%02d" /* Date. */ > + "T%02d:%02d:%02d.%06ld" /* Time. */ > + "%c%02ld:%02ld ", /* Time zone offset. */ > + tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, > + tm.tm_hour, tm.tm_min, tm.tm_sec, now.tv_usec, > + tz_sign, tz_offset / 3600, (tz_offset % 3600) / 60); > + } else > + (void)fprintf(fp, "- "); > + /* Hostname. */ > + (void)gethostname(hostname, sizeof(hostname)); > + (void)fprintf(fp, "%s ", hostname); > if (LogStat & LOG_PERROR) { > /* Transfer to string buffer */ > (void)fflush(fp); > stdp = tbuf + (sizeof(tbuf) - tbuf_cookie.left); > } > + /* > + * Application name, process ID, message ID and structured data. > + * Provide the process ID regardless of whether LOG_PID has been > + * specified, as it provides valuable information. Many > + * applications tend not to use this, even though they should. > + */ > if (LogTag == NULL) > LogTag = _getprogname(); > - if (LogTag != NULL) > - (void)fprintf(fp, "%s", LogTag); > - if (LogStat & LOG_PID) > - (void)fprintf(fp, "[%d]", getpid()); > - if (LogTag != NULL) { > - (void)fprintf(fp, ": "); > - } > + (void)fprintf(fp, "%s %d - - ", > + LogTag == NULL ? "-" : LogTag, getpid()); > > /* Check to see if we can skip expanding the %m */ > if (strstr(fmt, "%m")) { > @@ -313,7 +338,7 @@ vsyslog1(int pri, const char *fmt, va_list ap) > struct iovec iov[2]; > struct iovec *v = iov; > > - p = strchr(tbuf, '>') + 1; > + p = strchr(tbuf, '>') + 3; > v->iov_base = p; > v->iov_len = cnt - (p - tbuf); > ++v; > > Modified: head/sys/sys/param.h > ============================================================ > ================== > --- head/sys/sys/param.h Fri Apr 6 12:57:01 2018 (r332099) > +++ head/sys/sys/param.h Fri Apr 6 13:00:45 2018 (r332100) > @@ -60,7 +60,7 @@ > * in the range 5 to 9. > */ > #undef __FreeBSD_version > -#define __FreeBSD_version 1200060 /* Master, propagated to newvers */ > +#define __FreeBSD_version 1200061 /* Master, propagated to newvers */ > > /* > * __FreeBSD_kernel__ indicates that this system uses the kernel of > FreeBSD, > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Thu Mar 14 23:36:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBAF815339A6 for ; Thu, 14 Mar 2019 23:36:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59FEE73AAA for ; Thu, 14 Mar 2019 23:36:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82c.google.com with SMTP id v32so8161061qtc.10 for ; Thu, 14 Mar 2019 16:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=X0Fo4l0JJKy4J3hU4TDhR75ISizDYLfrLeyWdB34qQA=; b=K1u0cYNc08bvPyPly03kCn+LR6V8pqPvP4GwZsbH/lailcr3M5zf8X8sLW9KqbcZLW K8isZP10TYALh4zzAk/XqHmzioKDvBQ2QNXuc6s66OLFWFr849V94UjdgH0tEp/raiSZ V7qmT9B56YKgk8Z8ngP0TzRTll3Oa7mIqjp5MhKEgjJhunrJMx+wuCtlin0tyvVHtHPe 9+CvExiFHAJcE0G5Z6zreqC7zGzA2IOE7OE/pKYqm1NRsXkjBXfL0GWyM/B5IieixZ/s jeuoPnRcWvSGwSwu3z4xT1FpSGgDQB8OofgCL10HRRGMUrKQdbu1FyPezPdkuik4aEsv IZdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=X0Fo4l0JJKy4J3hU4TDhR75ISizDYLfrLeyWdB34qQA=; b=cfgJmcVCeii9CZAqAjnUpMQ6EWz1aylMjy6Pj6aZwes0F+Y4CXkqccayjEjEBlCYaF xxo5tNP3GF88if4v1vpWR2KTh18a/EkW26/T+OKkvzXKNb7bR7LRZzqaSyoGxTk9ElgZ 7a4Sd+3lZvqW/5z01jsyDCtLRSaVIJnG9y9T8w8qLmYNEJTzsQ1FxOAnjSFKLdcYmOKs m75haWPSaQQqx/FLUIE6r4rVPRqE/E6/tKN7L9X3m8wdZS6xgwixA3xsWz6/Pow6/qIq 8DqUWidonly/otNOdpI1KdtnHphxithI03ioKrEgrrF0ND7P7FMC49oSJZywnd0nLNd7 DVQQ== X-Gm-Message-State: APjAAAXe6ppvjcvj8yBHbNezilTE/h67an4J2IxSBVAnAdLsnIzbxXDk md4xQ7kcSL+tk/d0L9hYhU2Zms4XRvyApq+79PUcOA== X-Google-Smtp-Source: APXvYqypJzWjF2mIVAheqD4ymhSnB2P3TmC7YYsbBjmVcX/g49aXLnrUVkCnK4MyNHI9uILxHIrWbT1U1IwHd8lWfJE= X-Received: by 2002:ac8:1aec:: with SMTP id h41mr508303qtk.345.1552606577869; Thu, 14 Mar 2019 16:36:17 -0700 (PDT) MIME-Version: 1.0 References: <201903141709.x2EH97e7090941@repo.freebsd.org> <201903141855.x2EIt2ih026401@gndrsh.dnsmgr.net> In-Reply-To: From: Warner Losh Date: Thu, 14 Mar 2019 17:36:06 -0600 Message-ID: Subject: Re: svn commit: r345138 - head/share/man/man9 To: Ed Maste Cc: "Rodney W. Grimes" , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 59FEE73AAA X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.955,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 23:36:19 -0000 On Thu, Mar 14, 2019 at 3:43 PM Ed Maste wrote: > On Thu, 14 Mar 2019 at 14:55, Rodney W. Grimes > wrote: > > > > We should of documented what the decision process and criteria was > > that lead to the decission to uuencode the files. > > Doing some archaeology, the first instance of a uuencoded file I can > find is r1796, "Got rid of a couple of binary files by uuencoding. 49 > more to go." There's no explanation of why the change was made. > Evidence suggests that in 1994 it was just accepted as impossible or > not permitted to have binary files in the tree, but this has not been > the case for quite some time. > CVS had issues with them. sup had issues with them (remember sup?). CTM originally didn't cope but does now (not sure when that changed). By the time I joined in 95 or so, it was already part of the oral tradition. It was all over the mailing lists and just something you were expected to know. I even have a recollection of people screwing up and there being CVS repo surgery to remove the binary version and bring forward only the .uu versions. But that was 20ish years ago, so I'm not certain. > > Thus we could easily revist that criteria, see how much of it no > > longer applies, possible add counter criteria, and change this > > decision, with it documented as to why it changed. > > With none of this documented anywhere I'm going to rely on oral > history from you, phk, or other FreeBSD committers active in the mid > 90s to provide guidance on what we can revisit and what to check if it > no longer applies. > It no longer applies. svn copes well, git copes well, perforce coped well (though not too relevant these days). IIRC, there used to be something about it in the CVS section of one of the handbook chapters, but all that stuff was removed a long time ago and may be hard to find today. > The reason not to do it is uuencoding adds about a 40% space penalty, > adds to the build time (to uudecode), and makes changes harder to > review. In my mind dropping the unnecessary uuencoding is similar to > dropping build-time patching of files in the source tree (another > workaround we used to have for limitations of our older VCS). > Yes. Bringing a file off a vendor branch was generally greeted with much gnashing of teeth and much bile. And for good reason: the person taking it off the vendor branch was trivial, but it caused real and lasting conflicts for every single new import after that. The pain was real, and borne by the maintainer, not by the taker-off-the-brancher. > > As is this is just another semi documented project guideline change, > > I believe there are more than just the firmware files that this > > change needs noted on. > > Yes, we should look at the other cases where we unnecessarily uuencode > things. I'm not quite sure where we would document high level things > like this though, do you have a suggestion? I could see a case for > somewhat similra topics (e.g. 7-bit ASCII/UTF-8/ISO-8859 guidance) > fitting into style.9, but I'm not sure this one does. > This feels more like committer guide material, not style.9 to me. The committer guide is showing its age and collection of random detritus that we need to reorganize and update. This is one of the many issues. > > We should also note that if they are already in uuencode state > > to leave them in uuencode state, or do we intened to convert > > them on next commit, or ??? > > Good point, converting existing .uu files to binary is just > unnecessary churn and is not recommended. If someone is going to make > a change it can be done with the next update. > I'd convert them when there's some other reason to handle them. I'm not swayed by the churn argument, but more because there's little gain here, at the moment, and it would take someone's time. But if someone takes the time, I wouldn't stand in the way. Warner From owner-svn-src-all@freebsd.org Fri Mar 15 00:20:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 980C11534FED; Fri, 15 Mar 2019 00:20:29 +0000 (UTC) (envelope-from ygy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A965757DB; Fri, 15 Mar 2019 00:20:29 +0000 (UTC) (envelope-from ygy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E09021B9; Fri, 15 Mar 2019 00:20:29 +0000 (UTC) (envelope-from ygy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2F0KTF4018948; Fri, 15 Mar 2019 00:20:29 GMT (envelope-from ygy@FreeBSD.org) Received: (from ygy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2F0KTAe018947; Fri, 15 Mar 2019 00:20:29 GMT (envelope-from ygy@FreeBSD.org) Message-Id: <201903150020.x2F0KTAe018947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ygy set sender to ygy@FreeBSD.org using -f From: Guangyuan Yang Date: Fri, 15 Mar 2019 00:20:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345168 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: ygy X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 345168 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3A965757DB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 00:20:29 -0000 Author: ygy (doc committer) Date: Fri Mar 15 00:20:28 2019 New Revision: 345168 URL: https://svnweb.freebsd.org/changeset/base/345168 Log: Add myself to committers-doc.dot. Reminded by: rgrimes Modified: head/share/misc/committers-doc.dot Modified: head/share/misc/committers-doc.dot ============================================================================== --- head/share/misc/committers-doc.dot Thu Mar 14 23:05:59 2019 (r345167) +++ head/share/misc/committers-doc.dot Fri Mar 15 00:20:28 2019 (r345168) @@ -92,6 +92,7 @@ skreuzer [label="Steven Kreuzer\nskreuzer@FreeBSD.org\ taras [label="Taras Korenko\ntaras@FreeBSD.org\n2010/06/25"] trhodes [label="Tom Rhodes\ntrhodes@FreeBSD.org\n2002/03/25"] wblock [label="Warren Block\nwblock@FreeBSD.org\n2011/09/12"] +ygy [label="Guangyuan Yang\nygy@FreeBSD.org\n2017/09/18"] zeising [label="Niclas Zeising\nzeising@FreeBSD.org\n2012/07/03"] # Here are the mentor/mentee relationships. From owner-svn-src-all@freebsd.org Fri Mar 15 01:26:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77CEA15367B1; Fri, 15 Mar 2019 01:26:11 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A4DA7755D; Fri, 15 Mar 2019 01:26:11 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E2292D80; Fri, 15 Mar 2019 01:26:11 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2F1QArQ055046; Fri, 15 Mar 2019 01:26:10 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2F1QAqX055045; Fri, 15 Mar 2019 01:26:10 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201903150126.x2F1QAqX055045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Fri, 15 Mar 2019 01:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345169 - stable/12/sys/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: stable/12/sys/sys X-SVN-Commit-Revision: 345169 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1A4DA7755D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 01:26:11 -0000 Author: mmacy Date: Fri Mar 15 01:26:10 2019 New Revision: 345169 URL: https://svnweb.freebsd.org/changeset/base/345169 Log: bump version to reflect MFC of CCM for the benefit of the ZoF port Sponsored by: iX Systems Modified: stable/12/sys/sys/param.h Modified: stable/12/sys/sys/param.h ============================================================================== --- stable/12/sys/sys/param.h Fri Mar 15 00:20:28 2019 (r345168) +++ stable/12/sys/sys/param.h Fri Mar 15 01:26:10 2019 (r345169) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200503 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200504 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Fri Mar 15 01:38:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59EDB1536CFA; Fri, 15 Mar 2019 01:38:27 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 9BDBC77AF3; Fri, 15 Mar 2019 01:38:26 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2F1cLq5027727; Thu, 14 Mar 2019 18:38:21 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2F1cLiu027726; Thu, 14 Mar 2019 18:38:21 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903150138.x2F1cLiu027726@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345138 - head/share/man/man9 In-Reply-To: <9B88CC0B-E997-4860-AE91-15ED7C133B22@panasas.com> To: Ravi Pokala Date: Thu, 14 Mar 2019 18:38:21 -0700 (PDT) CC: Ed Maste , "Rodney W. Grimes" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 9BDBC77AF3 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 01:38:27 -0000 > I think maybe there was also a limitation on the (repo-replication-over-email?) mechanism that we used to use? That rings a very faint bell for me for some reason, even though I'm pretty sure it was dead long before I got my bit. CTM is still in use today, in a recent action to depricate it in base it was found that there are infact users, and users who wish to maintain it. I do not know of CTM is impacted by this, that group would need to respond. > > -Ravi (rpokala@) > > ?-----Original Message----- > From: on behalf of Ed Maste > Date: 2019-03-14, Thursday at 12:21 > To: "Rodney W. Grimes" > Cc: src-committers , , > Subject: Re: svn commit: r345138 - head/share/man/man9 > > On Thu, 14 Mar 2019 at 14:55, Rodney W. Grimes > wrote: > > > > [ Charset UTF-8 unsupported, converting... ] > > > Author: emaste > > > Date: Thu Mar 14 17:09:07 2019 > > > New Revision: 345138 > > > URL: https://svnweb.freebsd.org/changeset/base/345138 > > > > > > Log: > > > firmware(9): remove uuencoded example > > > > > > We can (should) just commit the binary files to the source tree. > > > > This change could use wider discussion. > > If you or others have a reason to prefer having uuencoded files in the > src tree I'll happily revert. I was aware only of CVS limitations as a > reason for uuencoding. That was only one of the reasons IIRC. > We have many binary files in the tree already (e.g. GIF PNG and JPEG > images, ELF and PE32 binaries, Berkeley DB files, and various > compressed formats). I count 430 uuencoded files in the tree, with 328 > of those coming from libarchive and 64 from sys/*/dev/ Why didnt you also count the "binary" files in the tree? Where are they? -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 15 01:42:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 123E71536F7C; Fri, 15 Mar 2019 01:42:46 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 78DE677EFA; Fri, 15 Mar 2019 01:42:45 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2F1gh9J027746; Thu, 14 Mar 2019 18:42:43 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2F1ghMa027745; Thu, 14 Mar 2019 18:42:43 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903150142.x2F1ghMa027745@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345158 - head/usr.sbin/bhyve In-Reply-To: <201903142108.x2EL8mGv018392@repo.freebsd.org> To: Conrad Meyer Date: Thu, 14 Mar 2019 18:42:43 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 78DE677EFA X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 01:42:46 -0000 > Author: cem > Date: Thu Mar 14 21:08:48 2019 > New Revision: 345158 > URL: https://svnweb.freebsd.org/changeset/base/345158 > > Log: > bhyve(8): Fix uart emulation bug > > THRE is always asserted in LSR reads, so REG_IER writes that raise > IER_ETXRDY must also set thre_int_pending. > > Reported by: Illumos, according to emaste@ > https://twitter.com/ed_maste/status/1106195949087584258 > MFC after: 2 weeks Per MAINTAINERS this should of had a formal review. And this is already in process from Patrick Mooney via the bhyve developemnt group. Revert this please. > Modified: > head/usr.sbin/bhyve/uart_emul.c > > Modified: head/usr.sbin/bhyve/uart_emul.c > ============================================================================== > --- head/usr.sbin/bhyve/uart_emul.c Thu Mar 14 20:32:48 2019 (r345157) > +++ head/usr.sbin/bhyve/uart_emul.c Thu Mar 14 21:08:48 2019 (r345158) > @@ -431,6 +431,9 @@ uart_write(struct uart_softc *sc, int offset, uint8_t > sc->thre_int_pending = true; > break; > case REG_IER: > + /* Set pending when IER_ETXRDY is raised (edge-triggered). */ > + if ((sc->ier & IER_ETXRDY) == 0 && (value & IER_ETXRDY) != 0) > + sc->thre_int_pending = true; > /* > * Apply mask so that bits 4-7 are 0 > * Also enables bits 0-3 only if they're 1 -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 15 01:51:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAAA1153727A; Fri, 15 Mar 2019 01:51:23 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 25C09802BE; Fri, 15 Mar 2019 01:51:23 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-lf1-x132.google.com with SMTP id u9so5649829lfe.11; Thu, 14 Mar 2019 18:51:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=2i0A9l6SvQz8uWLImgGwIbZ8EjGWc8DtVOdzUwyI5Gw=; b=BBeyxC0YZ4XJ1RtLdx/FifLImgOOlaO1zLoLcZxMb/U3IRoGtWgH2lOva1XjsOm8es l1gSpkYtT107ND+AeDgTKnlOq+wokkfUKT9XrdL2MlIvacW3+kk/lDc20NHUqTCI+XIe UQhbosxO469cEdx0A7D09kU9FDYW/oxbfB1GFCkIlrqsLuAJc/5RU3S1HYqA74Fr4ilB yFQE2Mr72CcprtzOfy8MDhL6L2F5AHyO409cWbuouRJcfrUNDJe35Fig9ADVb2V3F71T WzfAIQdXHxp1zvV2Cz9Il7lBQTbOqYImkZc96N2Ad/oRaY17wQFFFTQIoUbiL7gMNs30 cs7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=2i0A9l6SvQz8uWLImgGwIbZ8EjGWc8DtVOdzUwyI5Gw=; b=AWjlvWY00Lis6oQKkjm5ONyRkzsuCkVIhWLb1KOmzaKDxBKTrLJZaXANm8q41G432H eQpDhorwm9LiRs5DouH6SAx1cS/cQUYSpj1aTu3uN0EVcFWmtjQHUINASTb9iJWMcMtd ZJBGM2x/9g7S59xwQBp21TROk3jRWcrrVVGtYl5jXvdMB+W2DAzh9XB2QkUm+CPEQtPK P/+1L6kuRK4C0rA6gUJvyJfdDkSqdZSmHBK4gPA6mLZJwcXmav22CSAFShBfh/jnhzHx WH5FY/5ZvQmx1LGZTOB9zaAYZmjiB3FbiXMh5kzZsUsi/cPwqthw0x0vmYTFo15bqUnV //yQ== X-Gm-Message-State: APjAAAUDbuCLdOxJsBlAfi7jrpSbXl3h7rKWevvPj9qcODTYcC9XbNMY /THHZxdKprtjXRmGFGq6mrUI4WgBixKfsKXzgJaMINiu X-Google-Smtp-Source: APXvYqz/1hEVejSMGiIrvflFaEaPpTuyIMD5GIHzzb+Kj9Y0iTbPuepNRyf6xnO9Nu8cmniNCv7QuQ3fkaAoV2IYSbU= X-Received: by 2002:a19:ed19:: with SMTP id y25mr697043lfy.80.1552614681388; Thu, 14 Mar 2019 18:51:21 -0700 (PDT) MIME-Version: 1.0 References: <201903142108.x2EL8mGv018392@repo.freebsd.org> In-Reply-To: <201903142108.x2EL8mGv018392@repo.freebsd.org> Reply-To: araujo@freebsd.org From: Marcelo Araujo Date: Fri, 15 Mar 2019 09:51:09 +0800 Message-ID: Subject: Re: svn commit: r345158 - head/usr.sbin/bhyve To: Conrad Meyer Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 25C09802BE X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 01:51:24 -0000 Em sex, 15 de mar de 2019 =C3=A0s 05:09, Conrad Meyer esc= reveu: > Author: cem > Date: Thu Mar 14 21:08:48 2019 > New Revision: 345158 > URL: https://svnweb.freebsd.org/changeset/base/345158 > > Log: > bhyve(8): Fix uart emulation bug > > THRE is always asserted in LSR reads, so REG_IER writes that raise > IER_ETXRDY must also set thre_int_pending. > > Reported by: Illumos, according to emaste@ > https://twitter.com/ed_maste/status/1106195949087584258 > MFC after: 2 weeks > > Modified: > head/usr.sbin/bhyve/uart_emul.c > > Modified: head/usr.sbin/bhyve/uart_emul.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/bhyve/uart_emul.c Thu Mar 14 20:32:48 2019 > (r345157) > +++ head/usr.sbin/bhyve/uart_emul.c Thu Mar 14 21:08:48 2019 > (r345158) > @@ -431,6 +431,9 @@ uart_write(struct uart_softc *sc, int offset, uint8_t > sc->thre_int_pending =3D true; > break; > case REG_IER: > + /* Set pending when IER_ETXRDY is raised (edge-triggered)= . > */ > + if ((sc->ier & IER_ETXRDY) =3D=3D 0 && (value & IER_ETXRD= Y) !=3D > 0) > + sc->thre_int_pending =3D true; > /* > * Apply mask so that bits 4-7 are 0 > * Also enables bits 0-3 only if they're 1 > > Hi cem@, FYI: https://svnweb.freebsd.org/base?view=3Drevision&revision=3D344057 So there is some license concern around this patch, core@ reverted my first attempt to import this patch from Illumos. I guess core@ will ping you soon to do the same. There is a review made by the Illumos guys: https://reviews.freebsd.org/D19499 Pending now bhyve maintainer to approve it. Dark days, we had 2 committers trying to fix the same thing and our hands are tied. Best, --=20 --=20 Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_) From owner-svn-src-all@freebsd.org Fri Mar 15 01:52:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B15615372BE; Fri, 15 Mar 2019 01:52:07 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 7D77880441; Fri, 15 Mar 2019 01:52:06 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2F1q3Uw027790; Thu, 14 Mar 2019 18:52:03 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2F1q34w027789; Thu, 14 Mar 2019 18:52:03 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903150152.x2F1q34w027789@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345138 - head/share/man/man9 In-Reply-To: <1699.1552603328@critter.freebsd.dk> To: Poul-Henning Kamp Date: Thu, 14 Mar 2019 18:52:03 -0700 (PDT) CC: Ed Maste , "Rodney W. Grimes" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 7D77880441 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 01:52:07 -0000 > -------- > In message > , Ed Maste writes: > >On Thu, 14 Mar 2019 at 14:55, Rodney W. Grimes > > >Doing some archaeology, the first instance of a uuencoded file I can > >find is r1796, "Got rid of a couple of binary files by uuencoding. 49 > >more to go." There's no explanation of why the change was made. > > I am pretty sure that we discussed the question of binary files in > the tree on either core@ or hackers@ (not much difference back > then), but that probably predates the "Dont mount the projects mail > archives on /tmp/something" incident. It would of been hackers@, this would of not been a core discussion. > The first versions of CTM used diff -e and ed(1) to transmit changes, > and that choked up on binary files. We didn't have patch in the > tree back then. patch has always been in the tree. https://github.com/sergev/4.4BSD-Lite2/tree/master/usr/src/usr.bin/patch > > I can't answer definitively if modern CTM has any such restrictions, > but I would not expect so, either way, it should not matter. Warner said in another reply it does not, but this should be listed in the decision criteral, with a "not effected or formally effected" state. > >> We should also note that if they are already in uuencode state > >> to leave them in uuencode state, or do we intened to convert > >> them on next commit, or ??? > > > >Good point, converting existing .uu files to binary is just > >unnecessary churn and is not recommended. If someone is going to make > >a change it can be done with the next update. > > Agreed. So is it leave them forever .uu, on next import/whatever bring in the binary and remove the .uu, Or ? > phk@FreeBSD.ORG | TCP/IP since RFC 956 -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 15 02:05:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0D011537688; Fri, 15 Mar 2019 02:05:32 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it1-f176.google.com (mail-it1-f176.google.com [209.85.166.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B4A9809A3; Fri, 15 Mar 2019 02:05:32 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it1-f176.google.com with SMTP id m137so8010749ita.0; Thu, 14 Mar 2019 19:05:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HrTj/bH0oDtKKsa0+kUkDriaerz94amsxNuHIO5upe8=; b=ullYB5uZHgOccYmXvCeWw6kDKoC+UnCJuoaKbkS7vx1nY07L+iwopRDuA6OjqM05lv 0640tYpH4KNv8V/YSRRcPKwnK+VQ5SEb28ZhrU3n6XjFfXeX40fBlLBnhN0btV8Vhbsx gbJe3ImeQXQoAJVWjAS9OQMgk6svS6QH27lMgqYQdozm8wmB1JJHatEQx2CZ0aqMJsYG yAJ1BVv/UwrxKq1EbpffTVcN4sJutM3sb5+F969yNgfUJFegQxlMGbQCAxCdfTSmsn3z CT1Kw4UGDVHwMpH6E90TKF1nbCHzvRA5UJrX8NpBwYYyRDH/v0vo6Nd4RmJnbj+GnA+A 4rMA== X-Gm-Message-State: APjAAAVLrGtT+kuHDlidX7V/pj9++guRYFf1PAoFuZ/ewVk2RGB9eeRu xCdE2KaCVL+efqx/PqGKBpO8cAmaC597cfKtx5Hoqw== X-Google-Smtp-Source: APXvYqx0Qudvz6u4J45ISSLa4IXSy2b3JWQUCWFVe6Lv6SEnVlFaWE/XKMMeW28JWvJwW6INzv3t9ngq8c+IJmvHnpc= X-Received: by 2002:a24:6f94:: with SMTP id x142mr478341itb.33.1552615530708; Thu, 14 Mar 2019 19:05:30 -0700 (PDT) MIME-Version: 1.0 References: <201903142108.x2EL8mGv018392@repo.freebsd.org> In-Reply-To: From: Ed Maste Date: Thu, 14 Mar 2019 22:05:18 -0400 Message-ID: Subject: Re: svn commit: r345158 - head/usr.sbin/bhyve To: Marcelo Araujo Cc: Conrad Meyer , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 6B4A9809A3 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.937,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 02:05:33 -0000 On Thu, 14 Mar 2019 at 21:51, Marcelo Araujo wrote: > > So there is some license concern around this patch, core@ reverted my first attempt to import this patch from Illumos. Conrad wrote the patch based on the description I posted on twitter, it's not imported from anywhere. However, I was not aware of the history here, and with a patch already accepted in review we should take it; although the description of the bug and the patch itself are both trivial there was clearly a substantial effort involved in taking the bug to root cause. From owner-svn-src-all@freebsd.org Fri Mar 15 02:05:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8149815376D5; Fri, 15 Mar 2019 02:05:56 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 CDC3A80AD1; Fri, 15 Mar 2019 02:05:55 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2F25qSC027857; Thu, 14 Mar 2019 19:05:52 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2F25qtD027856; Thu, 14 Mar 2019 19:05:52 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903150205.x2F25qtD027856@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345138 - head/share/man/man9 In-Reply-To: To: Warner Losh Date: Thu, 14 Mar 2019 19:05:52 -0700 (PDT) CC: Ed Maste , "Rodney W. Grimes" , src-committers , svn-src-all , svn-src-head 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-Rspamd-Queue-Id: CDC3A80AD1 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 02:05:56 -0000 > On Thu, Mar 14, 2019 at 3:43 PM Ed Maste wrote: > > > On Thu, 14 Mar 2019 at 14:55, Rodney W. Grimes > > wrote: > > > > > > We should of documented what the decision process and criteria was > > > that lead to the decission to uuencode the files. > > > > Doing some archaeology, the first instance of a uuencoded file I can > > find is r1796, "Got rid of a couple of binary files by uuencoding. 49 > > more to go." There's no explanation of why the change was made. > > Evidence suggests that in 1994 it was just accepted as impossible or > > not permitted to have binary files in the tree, but this has not been > > the case for quite some time. > > > > CVS had issues with them. sup had issues with them (remember sup?). CTM > originally didn't cope but does now (not sure when that changed). Diff and patch had issues with them, and still do? > By the time I joined in 95 or so, it was already part of the oral > tradition. It was all over the mailing lists and just something you were > expected to know. I even have a recollection of people screwing up and > there being CVS repo surgery to remove the binary version and bring forward > only the .uu versions. But that was 20ish years ago, so I'm not certain. Yes, there was some cvs admin and/or rm's done, not exactly repo surgery, which did occur on other types of repairs, some very poorly. > > > Thus we could easily revist that criteria, see how much of it no > > > longer applies, possible add counter criteria, and change this > > > decision, with it documented as to why it changed. > > > > With none of this documented anywhere I'm going to rely on oral > > history from you, phk, or other FreeBSD committers active in the mid > > 90s to provide guidance on what we can revisit and what to check if it > > no longer applies. > > > > It no longer applies. svn copes well, git copes well, perforce coped well > (though not too relevant these days). > > IIRC, there used to be something about it in the CVS section of one of the > handbook chapters, but all that stuff was removed a long time ago and may > be hard to find today. This rings a bell. > > The reason not to do it is uuencoding adds about a 40% space penalty, > > adds to the build time (to uudecode), and makes changes harder to > > review. In my mind dropping the unnecessary uuencoding is similar to > > dropping build-time patching of files in the source tree (another > > workaround we used to have for limitations of our older VCS). > > > > Yes. Bringing a file off a vendor branch was generally greeted with much > gnashing of teeth and much bile. And for good reason: the person taking it > off the vendor branch was trivial, but it caused real and lasting conflicts > for every single new import after that. The pain was real, and borne by the > maintainer, not by the taker-off-the-brancher. How do the tools today deal with taking a binary off the vendor branch? Isn't this still a for-ever night mare merge thing to deal with? > > > As is this is just another semi documented project guideline change, > > > I believe there are more than just the firmware files that this > > > change needs noted on. > > > > Yes, we should look at the other cases where we unnecessarily uuencode > > things. I'm not quite sure where we would document high level things > > like this though, do you have a suggestion? I could see a case for > > somewhat similra topics (e.g. 7-bit ASCII/UTF-8/ISO-8859 guidance) > > fitting into style.9, but I'm not sure this one does. > > > > This feels more like committer guide material, not style.9 to me. The > committer guide is showing its age and collection of random detritus that > we need to reorganize and update. This is one of the many issues. I agree on location, in or near the committers guide. It may be time to expand that to have a procedures section (how to vendor import, how to MFC, etc), and a guidelines section (commit messages, must/should/ can/shall not etc) > > > > > We should also note that if they are already in uuencode state > > > to leave them in uuencode state, or do we intened to convert > > > them on next commit, or ??? > > > > Good point, converting existing .uu files to binary is just > > unnecessary churn and is not recommended. If someone is going to make > > a change it can be done with the next update. > > > > I'd convert them when there's some other reason to handle them. I'm not > swayed by the churn argument, but more because there's little gain here, at > the moment, and it would take someone's time. But if someone takes the > time, I wouldn't stand in the way. Agree, and that is probably all the document should say on that subject. > Warner -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 15 02:10:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82B681537812; Fri, 15 Mar 2019 02:10:14 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 CE58280C87; Fri, 15 Mar 2019 02:10:13 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2F2ABJY027878; Thu, 14 Mar 2019 19:10:11 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2F2ABwZ027877; Thu, 14 Mar 2019 19:10:11 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903150210.x2F2ABwZ027877@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345138 - head/share/man/man9 In-Reply-To: To: Ed Maste Date: Thu, 14 Mar 2019 19:10:11 -0700 (PDT) CC: "Rodney W. Grimes" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: CE58280C87 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 02:10:14 -0000 > On Thu, 14 Mar 2019 at 14:55, Rodney W. Grimes > wrote: > > > > We should of documented what the decision process and criteria was > > that lead to the decission to uuencode the files. > > Doing some archaeology, the first instance of a uuencoded file I can > find is r1796, "Got rid of a couple of binary files by uuencoding. 49 > more to go." There's no explanation of why the change was made. > Evidence suggests that in 1994 it was just accepted as impossible or > not permitted to have binary files in the tree, but this has not been > the case for quite some time. > > > Thus we could easily revist that criteria, see how much of it no > > longer applies, possible add counter criteria, and change this > > decision, with it documented as to why it changed. > > With none of this documented anywhere I'm going to rely on oral > history from you, phk, or other FreeBSD committers active in the mid > 90s to provide guidance on what we can revisit and what to check if it > no longer applies. > > The reason not to do it is uuencoding adds about a 40% space penalty, > adds to the build time (to uudecode), and makes changes harder to > review. In my mind dropping the unnecessary uuencoding is similar to > dropping build-time patching of files in the source tree (another > workaround we used to have for limitations of our older VCS). I think I covered all the above in other replies. > > As is this is just another semi documented project guideline change, > > I believe there are more than just the firmware files that this > > change needs noted on. > > Yes, we should look at the other cases where we unnecessarily uuencode > things. I'm not quite sure where we would document high level things > like this though, do you have a suggestion? I could see a case for > somewhat similra topics (e.g. 7-bit ASCII/UTF-8/ISO-8859 guidance) > fitting into style.9, but I'm not sure this one does. I think the committers guide, which needs a revamp. That should also cover the 7-bit/... > > We should also note that if they are already in uuencode state > > to leave them in uuencode state, or do we intened to convert > > them on next commit, or ??? > > Good point, converting existing .uu files to binary is just > unnecessary churn and is not recommended. If someone is going to make > a change it can be done with the next update. Covered this in my reply to Warners reply. I think we also need to look at how this might affect vendor imported stuff, is there some if it that was .uu'ed before import? -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 15 02:10:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E7371537838 for ; Fri, 15 Mar 2019 02:10:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E595380D90 for ; Fri, 15 Mar 2019 02:10:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x731.google.com with SMTP id u22so4613320qkj.11 for ; Thu, 14 Mar 2019 19:10:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5gpeD1ubF39crkVSPVy/syITZ6Snrdi79iAoT2dQucw=; b=srzrsNzVsXSIVZoK/hZTXe7fisQ7lzm19bJKGUX4xU2YOqEcRDIh0AEIACrwygamHd iVKtomXU13fzKC8ijj7na/+hcFD1cb4HOyBQV+hdt+4+u7qfsxlMiAp744S9xs6vIvGw AoF9qhs4EWlaFb9sVJGJ6u3foFOPrtNizcnSB6cXamUa5DWq87VLGn6Xc8/uWuQ4yT1G rBLP2sYf5ZAtJNhw1bbX9laxl16jcJUJ06s+8OhnBQudy+m5eavcG0vNiGOubs4rzSTk 6vpCRDf/IUuYCDCK+fferjm82+6fU4Zj8kFD/eUnX41pQf2FtIeP1pV7ajv5s2OHR6CA Ta0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5gpeD1ubF39crkVSPVy/syITZ6Snrdi79iAoT2dQucw=; b=m+XQxI8eBb5PDr55bUhyZm9aH67dOd7Nz03iDkydigL/SLw0FGVZT0AK667ZIQWcZ4 A9c3JjqI5QqEW8tlnPRfO0ldUDY1si/jECVvvnvndD1aJSjEfdvsBYU4VjW2653ADUt0 Tu/aBIp4cJO5CjIUSazGS0rmXy3kisdbfR1SNpmTHSPFF4++vUTt5GKO01Sro9pInM2x xPMVuGwAU4+LfP4qIS5qTU1uWGObTvUXliw3eUJhUOwh9WzTUpfttcUXsDbp4fHT1WSk HSSYWSy6BfFMaFbttv55e1H0k24P/suN/wuwjDdDwPiUHcsoKgFFEe+SPjPuFcWA/aI8 JHog== X-Gm-Message-State: APjAAAUAXp9IEKaIQ/kW9cu2f9dwRKpzXOqAycT8V4D6VlJM7LTdvQyL NbglXI2D+zqVpmRy2wiS4ToUIFFtAdJYd0xDB7gSzA== X-Google-Smtp-Source: APXvYqyXw3nPq8K4wKxB4OZdAYEVY1N4Y7LOkre+1UDOM5So/cR6SfTIpoG+4n2ONNy7XWRAUYF+UCZZrkXamkNkjsU= X-Received: by 2002:a37:a34f:: with SMTP id m76mr1062864qke.245.1552615827783; Thu, 14 Mar 2019 19:10:27 -0700 (PDT) MIME-Version: 1.0 References: <9B88CC0B-E997-4860-AE91-15ED7C133B22@panasas.com> <201903150138.x2F1cLiu027726@gndrsh.dnsmgr.net> In-Reply-To: <201903150138.x2F1cLiu027726@gndrsh.dnsmgr.net> From: Warner Losh Date: Thu, 14 Mar 2019 20:10:15 -0600 Message-ID: Subject: Re: svn commit: r345138 - head/share/man/man9 To: "Rodney W. Grimes" Cc: Ravi Pokala , Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: E595380D90 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 02:10:29 -0000 On Thu, Mar 14, 2019, 7:38 PM Rodney W. Grimes wrote: > > I think maybe there was also a limitation on the > (repo-replication-over-email?) mechanism that we used to use? That rings a > very faint bell for me for some reason, even though I'm pretty sure it was > dead long before I got my bit. > > CTM is still in use today, in a recent action to depricate it in base > it was found that there are infact users, and users who wish to maintain > it. I do not know of CTM is impacted by this, that group would need > to respond. > CTM handles binaries just fine these days. We have dozens of binaries in the tree already. In the 90s there was an issue, but that was fixed well before we migrated to subversion. Warner > > > -Ravi (rpokala@) > > > > ?-----Original Message----- > > From: on behalf of Ed Maste < > emaste@freebsd.org> > > Date: 2019-03-14, Thursday at 12:21 > > To: "Rodney W. Grimes" > > Cc: src-committers , < > svn-src-all@freebsd.org>, > > Subject: Re: svn commit: r345138 - head/share/man/man9 > > > > On Thu, 14 Mar 2019 at 14:55, Rodney W. Grimes > > wrote: > > > > > > [ Charset UTF-8 unsupported, converting... ] > > > > Author: emaste > > > > Date: Thu Mar 14 17:09:07 2019 > > > > New Revision: 345138 > > > > URL: https://svnweb.freebsd.org/changeset/base/345138 > > > > > > > > Log: > > > > firmware(9): remove uuencoded example > > > > > > > > We can (should) just commit the binary files to the source tree. > > > > > > This change could use wider discussion. > > > > If you or others have a reason to prefer having uuencoded files in the > > src tree I'll happily revert. I was aware only of CVS limitations as a > > reason for uuencoding. > That was only one of the reasons IIRC. > > > We have many binary files in the tree already (e.g. GIF PNG and JPEG > > images, ELF and PE32 binaries, Berkeley DB files, and various > > compressed formats). I count 430 uuencoded files in the tree, with 328 > > of those coming from libarchive and 64 from sys/*/dev/ > > Why didnt you also count the "binary" files in the tree? > Where are they? > > -- > Rod Grimes > rgrimes@freebsd.org > > From owner-svn-src-all@freebsd.org Fri Mar 15 02:11:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02F8115378E6; Fri, 15 Mar 2019 02:11:28 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 92E0F80FD7; Fri, 15 Mar 2019 02:11:27 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 850603749; Fri, 15 Mar 2019 02:11:27 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2F2BRTW079856; Fri, 15 Mar 2019 02:11:27 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2F2BRPh079855; Fri, 15 Mar 2019 02:11:27 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <201903150211.x2F2BRPh079855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Fri, 15 Mar 2019 02:11:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345170 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 345170 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 92E0F80FD7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 02:11:28 -0000 Author: chuck Date: Fri Mar 15 02:11:27 2019 New Revision: 345170 URL: https://svnweb.freebsd.org/changeset/base/345170 Log: Fix bhyve's NVMe Identify Namespace data The NVMe Identify Namespace data structure's Number of LBA Formats (NLBAF) field is a 0's based value (i.e. 0x0 means 1). Since the emulation only supports a single format, set NLBAF to 0x0, not 1. Reviewed by: imp, araujo, rgrimes Approved by: imp (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D19579 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Fri Mar 15 01:26:10 2019 (r345169) +++ head/usr.sbin/bhyve/pci_nvme.c Fri Mar 15 02:11:27 2019 (r345170) @@ -358,7 +358,7 @@ pci_nvme_init_nsdata(struct pci_nvme_softc *sc) nd->nuse = nd->nsze; /* Get LBA and backstore information from backing store */ - nd->nlbaf = 1; + nd->nlbaf = 0; /* NLBAF is a 0's based value (i.e. 1 LBA Format) */ /* LBA data-sz = 2^lbads */ nd->lbaf[0] = sc->nvstore.sectsz_bits << NVME_NS_DATA_LBAF_LBADS_SHIFT; From owner-svn-src-all@freebsd.org Fri Mar 15 02:11:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CB8A15378EB; Fri, 15 Mar 2019 02:11:29 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 30E6680FDD; Fri, 15 Mar 2019 02:11:29 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B111374B; Fri, 15 Mar 2019 02:11:29 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2F2BSjc079899; Fri, 15 Mar 2019 02:11:28 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2F2BSai079898; Fri, 15 Mar 2019 02:11:28 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <201903150211.x2F2BSai079898@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Fri, 15 Mar 2019 02:11:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345171 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 345171 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 30E6680FDD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 02:11:29 -0000 Author: chuck Date: Fri Mar 15 02:11:28 2019 New Revision: 345171 URL: https://svnweb.freebsd.org/changeset/base/345171 Log: Fix bhyve PCIe capability emulation PCIe devices starting with version 1.1 must set the Role-Based Error Reporting bit. And while we're in the neighborhood, generalize the code assigning the device type. Reviewed by: imp, araujo, rgrimes Approved by: imp (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D19580 Modified: head/usr.sbin/bhyve/pci_emul.c Modified: head/usr.sbin/bhyve/pci_emul.c ============================================================================== --- head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:27 2019 (r345170) +++ head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:28 2019 (r345171) @@ -953,7 +953,10 @@ pci_emul_add_pciecap(struct pci_devinst *pi, int type) bzero(&pciecap, sizeof(pciecap)); pciecap.capid = PCIY_EXPRESS; - pciecap.pcie_capabilities = PCIECAP_VERSION | PCIEM_TYPE_ROOT_PORT; + pciecap.pcie_capabilities = PCIECAP_VERSION | type; + /* Devices starting with version 1.1 must set the RBER bit */ + if (PCIECAP_VERSION >= 1) + pciecap.dev_capabilities = PCIEM_CAP_ROLE_ERR_RPT; pciecap.link_capabilities = 0x411; /* gen1, x1 */ pciecap.link_status = 0x11; /* gen1, x1 */ From owner-svn-src-all@freebsd.org Fri Mar 15 02:13:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C68BA1537BA2; Fri, 15 Mar 2019 02:13:15 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it1-f174.google.com (mail-it1-f174.google.com [209.85.166.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 67AFF814D2; Fri, 15 Mar 2019 02:13:15 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it1-f174.google.com with SMTP id w18so7982175itj.4; Thu, 14 Mar 2019 19:13:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZTCbtk6QtTZFWvFgDZfB6C9gTp2UMU6vHmhlYXfSa98=; b=LEZ54S6HjEFqy72c0F4mT5VN7jmDkWwMN2A6G2BzVz1w+b5MOh6ANcmN3BWsmztF7P LUT9/IS9UZqXTi9//v+cklX5VUDHL8xTJ7bV7uc1WeK/dQN0oOwO1etKyPPSPcWplkxg Bbibu1kc2+T0BV4CfnLte98MfTovXgxXLzG7ps2RHp/8nDCoLuhW8SS9WGfWnoRpGArB lI9JDPP3Gy0NYMQECr83SvFzcz7WsJtq0amsHWz5mtj3jP0lafPpxHXUc8zACSt5xN6f QuDP8si/+yJx6QPtz7QRLVGvvgwaXpSv1SsfSUhXuDW/FE71zmL09tUU7sFuJtWx2E9E Buhg== X-Gm-Message-State: APjAAAWrKV6Lsm22PXU25JoJi37VbT31P2HABVIf1G8HvtIdwlA0UV1w v+dc56DRc0KZJdnmpWFpBzyiCwQRlvaD3gjn4VXBnQ== X-Google-Smtp-Source: APXvYqzqqfTPlZo0DMSkf00K6v0OnIhfFjLv2uPmJl3smK7yvUPUsUbaqAThfwvYzlEsPK9uBiJFFpf9g8elSFp0qgc= X-Received: by 2002:a02:c9:: with SMTP id 192mr915428jaa.129.1552615988770; Thu, 14 Mar 2019 19:13:08 -0700 (PDT) MIME-Version: 1.0 References: <201903150210.x2F2ABwZ027877@gndrsh.dnsmgr.net> In-Reply-To: <201903150210.x2F2ABwZ027877@gndrsh.dnsmgr.net> From: Ed Maste Date: Thu, 14 Mar 2019 22:12:56 -0400 Message-ID: Subject: Re: svn commit: r345138 - head/share/man/man9 To: "Rodney W. Grimes" Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 67AFF814D2 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.94)[-0.939,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 02:13:15 -0000 On Thu, 14 Mar 2019 at 22:10, Rodney W. Grimes wrote: > > Covered this in my reply to Warners reply. I think we also need to > look at how this might affect vendor imported stuff, is there some if > it that was .uu'ed before import? We definitely don't want to change files in contrib/ - that's up to the upstreams. From owner-svn-src-all@freebsd.org Fri Mar 15 02:21:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F6201537FDA; Fri, 15 Mar 2019 02:21:10 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it1-f175.google.com (mail-it1-f175.google.com [209.85.166.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD4CD8178E; Fri, 15 Mar 2019 02:21:09 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it1-f175.google.com with SMTP id g17so8022046ita.2; Thu, 14 Mar 2019 19:21:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=maCWIyJQ1cLK9nMpdTxYvFgzO+9xdBq5r/ijzHyGjR4=; b=qc7cUTlKjWWF2VLaWNyLh3R02TtAdfgvXEt8AqiMjcEtPcbasZ2QeZPXYTH/1cp1Nm 4GvuqvAHRJYsnDM8MYmNPqNAvWfG9bj/4/Kd4x+Oj7/KxQlxUI0BJq6KG0laa75XZhP3 Ahyp05dI0SaHpYtCoZLfJoo0BX1Yw/FoArzPaMgqfJvOGb4DEKNp59QWUsmHEUZM6vV1 8pvN+lza7Rs8vh5NLc2Rpk2D3gw/gpNhBLraU0X+HUcNpl+x1cW+/kCSJSv3or+k0yis Fr+bXUjnXZZ/wUyRU/axLdcU05ii6Ms0QR7YaaophOAVOKiHLvxaUKjRBLSEgiHZnjRZ d63w== X-Gm-Message-State: APjAAAVap96liT4UoXXRGFlE8n/wjjenFnYoUCeFSI3TERwuJbss9I0R bDkSuou/TOErZLZ78CmDISWqr4XT4KyR5vuOLLzgaQ== X-Google-Smtp-Source: APXvYqzpGvpWni/J/mbl+Gcd2IKXvk/CfIx3CW/LfgeHvhfTP6IV8I76R5KtjvMDW/KTKfJH/PYSoK29XEDRrSqdtAk= X-Received: by 2002:a24:b501:: with SMTP id v1mr526468ite.174.1552616462313; Thu, 14 Mar 2019 19:21:02 -0700 (PDT) MIME-Version: 1.0 References: <201903150210.x2F2ABwZ027877@gndrsh.dnsmgr.net> In-Reply-To: <201903150210.x2F2ABwZ027877@gndrsh.dnsmgr.net> From: Ed Maste Date: Thu, 14 Mar 2019 22:20:50 -0400 Message-ID: Subject: Re: svn commit: r345138 - head/share/man/man9 To: "Rodney W. Grimes" Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: CD4CD8178E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.939,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 02:21:10 -0000 On Thu, 14 Mar 2019 at 22:10, Rodney W. Grimes wrote: > > > The reason not to do it is uuencoding adds about a 40% space penalty, > > adds to the build time (to uudecode), and makes changes harder to > > review. In my mind dropping the unnecessary uuencoding is similar to > > dropping build-time patching of files in the source tree (another > > workaround we used to have for limitations of our older VCS). > > I think I covered all the above in other replies. So: 1. We used to use a VCS which does not support binary files well, but have not used it for years. 2. Another source delivery tool (ctm) previously did not support binary files, but has for some time. 3. There may have been other reasons, but none that anyone can recall (at present). > > Yes, we should look at the other cases where we unnecessarily uuencode > > things. I'm not quite sure where we would document high level things > > like this though, do you have a suggestion? I could see a case for > > somewhat similra topics (e.g. 7-bit ASCII/UTF-8/ISO-8859 guidance) > > fitting into style.9, but I'm not sure this one does. > > I think the committers guide, which needs a revamp. That > should also cover the 7-bit/... Probably, yes. That said, I'm very much in favour of having the documentation in the tree itself, for those topics pertaining to the software in that tree (e.g. style(9), ports(7), development(7), arch(7)). From owner-svn-src-all@freebsd.org Fri Mar 15 02:28:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC02A1538257; Fri, 15 Mar 2019 02:28:02 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 48B0981DCA; Fri, 15 Mar 2019 02:28:02 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2F2S0lu027979; Thu, 14 Mar 2019 19:28:00 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2F2RxUU027978; Thu, 14 Mar 2019 19:27:59 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903150227.x2F2RxUU027978@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345168 - head/share/misc In-Reply-To: <201903150020.x2F0KTAe018947@repo.freebsd.org> To: Guangyuan Yang Date: Thu, 14 Mar 2019 19:27:59 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 48B0981DCA X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 02:28:03 -0000 > Author: ygy (doc committer) > Date: Fri Mar 15 00:20:28 2019 > New Revision: 345168 > URL: https://svnweb.freebsd.org/changeset/base/345168 > > Log: > Add myself to committers-doc.dot. > > Reminded by: rgrimes Thank you > Modified: > head/share/misc/committers-doc.dot > > Modified: head/share/misc/committers-doc.dot > ============================================================================== > --- head/share/misc/committers-doc.dot Thu Mar 14 23:05:59 2019 (r345167) > +++ head/share/misc/committers-doc.dot Fri Mar 15 00:20:28 2019 (r345168) > @@ -92,6 +92,7 @@ skreuzer [label="Steven Kreuzer\nskreuzer@FreeBSD.org\ > taras [label="Taras Korenko\ntaras@FreeBSD.org\n2010/06/25"] > trhodes [label="Tom Rhodes\ntrhodes@FreeBSD.org\n2002/03/25"] > wblock [label="Warren Block\nwblock@FreeBSD.org\n2011/09/12"] > +ygy [label="Guangyuan Yang\nygy@FreeBSD.org\n2017/09/18"] > zeising [label="Niclas Zeising\nzeising@FreeBSD.org\n2012/07/03"] > > # Here are the mentor/mentee relationships. > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 15 02:31:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DCDE1538757; Fri, 15 Mar 2019 02:31:52 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 E59F1821FE; Fri, 15 Mar 2019 02:31:51 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2F2VnWB027996; Thu, 14 Mar 2019 19:31:49 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2F2VnR6027995; Thu, 14 Mar 2019 19:31:49 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903150231.x2F2VnR6027995@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve In-Reply-To: <201903150211.x2F2BSai079898@repo.freebsd.org> To: Chuck Tuffli Date: Thu, 14 Mar 2019 19:31:49 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: E59F1821FE X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 02:31:52 -0000 > Author: chuck > Date: Fri Mar 15 02:11:28 2019 > New Revision: 345171 > URL: https://svnweb.freebsd.org/changeset/base/345171 > > Log: > Fix bhyve PCIe capability emulation > > PCIe devices starting with version 1.1 must set the Role-Based Error > Reporting bit. > > And while we're in the neighborhood, generalize the code assigning the > device type. > > Reviewed by: imp, araujo, rgrimes > Approved by: imp (mentor) > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D19580 This code requires maintainer approval before a commit, though this was well reviewed that doesnt exclude it from the MAINTAINERS entry. Leave it for now, I am sure jhb or thyco are fine with it, this is just a heads up FYI for future commits. Bhyve code has been and still is under a fairly tight MAINTAINER status. > Modified: > head/usr.sbin/bhyve/pci_emul.c > > Modified: head/usr.sbin/bhyve/pci_emul.c > ============================================================================== > --- head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:27 2019 (r345170) > +++ head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:28 2019 (r345171) > @@ -953,7 +953,10 @@ pci_emul_add_pciecap(struct pci_devinst *pi, int type) > bzero(&pciecap, sizeof(pciecap)); > > pciecap.capid = PCIY_EXPRESS; > - pciecap.pcie_capabilities = PCIECAP_VERSION | PCIEM_TYPE_ROOT_PORT; > + pciecap.pcie_capabilities = PCIECAP_VERSION | type; > + /* Devices starting with version 1.1 must set the RBER bit */ > + if (PCIECAP_VERSION >= 1) > + pciecap.dev_capabilities = PCIEM_CAP_ROLE_ERR_RPT; > pciecap.link_capabilities = 0x411; /* gen1, x1 */ > pciecap.link_status = 0x11; /* gen1, x1 */ > > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 15 02:34:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B3061538830; Fri, 15 Mar 2019 02:34:47 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 903948253C; Fri, 15 Mar 2019 02:34:46 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2F2YieT028022; Thu, 14 Mar 2019 19:34:44 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2F2YiAv028021; Thu, 14 Mar 2019 19:34:44 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903150234.x2F2YiAv028021@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345138 - head/share/man/man9 In-Reply-To: To: Ed Maste Date: Thu, 14 Mar 2019 19:34:44 -0700 (PDT) CC: "Rodney W. Grimes" , src-committers , svn-src-all , svn-src-head 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-Rspamd-Queue-Id: 903948253C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 02:34:47 -0000 > On Thu, 14 Mar 2019 at 22:10, Rodney W. Grimes > wrote: > > > > Covered this in my reply to Warners reply. I think we also need to > > look at how this might affect vendor imported stuff, is there some if > > it that was .uu'ed before import? > > We definitely don't want to change files in contrib/ - that's up to > the upstreams. I think you miss understood, I belive in the paste, and possibly even still, that prep work was done to vendor code before import. We use to have shell scripts and such to deal with things like having to .uu files, remove stuff you dont want, etc. I suspect some of that is inplace and we probably do not want to just undo it without some careful thought. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 15 02:39:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D793F15389AE; Fri, 15 Mar 2019 02:39:20 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 342578274B; Fri, 15 Mar 2019 02:39:20 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2F2dHJg028043; Thu, 14 Mar 2019 19:39:17 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2F2dH9m028042; Thu, 14 Mar 2019 19:39:17 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903150239.x2F2dH9m028042@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345138 - head/share/man/man9 In-Reply-To: To: Ed Maste Date: Thu, 14 Mar 2019 19:39:17 -0700 (PDT) CC: "Rodney W. Grimes" , src-committers , svn-src-all , svn-src-head 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-Rspamd-Queue-Id: 342578274B X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.95)[-0.949,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 02:39:21 -0000 > On Thu, 14 Mar 2019 at 22:10, Rodney W. Grimes > wrote: > > > > > The reason not to do it is uuencoding adds about a 40% space penalty, > > > adds to the build time (to uudecode), and makes changes harder to > > > review. In my mind dropping the unnecessary uuencoding is similar to > > > dropping build-time patching of files in the source tree (another > > > workaround we used to have for limitations of our older VCS). > > > > I think I covered all the above in other replies. > > So: > 1. We used to use a VCS which does not support binary files well, but > have not used it for years. > 2. Another source delivery tool (ctm) previously did not support > binary files, but has for some time. > 3. There may have been other reasons, but none that anyone can recall > (at present). 4. There is no easy way to show "changed byte at offset 0x432 from 0xef to 0xfe" So far, that looks right. Do we have a decent binary diff and binary patch tool? > > > Yes, we should look at the other cases where we unnecessarily uuencode > > > things. I'm not quite sure where we would document high level things > > > like this though, do you have a suggestion? I could see a case for > > > somewhat similra topics (e.g. 7-bit ASCII/UTF-8/ISO-8859 guidance) > > > fitting into style.9, but I'm not sure this one does. > > > > I think the committers guide, which needs a revamp. That > > should also cover the 7-bit/... > > Probably, yes. That said, I'm very much in favour of having the > documentation in the tree itself, for those topics pertaining to the > software in that tree (e.g. style(9), ports(7), development(7), > arch(7)). I do not have much problem with it being multiple places, so long as they are all cross referenced either directly in words, or at least in markup comments so that when one place is changed the others are too. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 15 02:39:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1975215389FB; Fri, 15 Mar 2019 02:39:34 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A955B82834; Fri, 15 Mar 2019 02:39:33 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f50.google.com with SMTP id x9so6974473iog.12; Thu, 14 Mar 2019 19:39:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=caSF2vZImltydkatwx0U052d8+GeNxZYh+6GZzSyUAo=; b=HNsFkJE2UdhHuKEyOOCF1SOaVvkIyXp2pM9q2gM1A5hxYWep7TymUA3HbNz9UHj7Wx FhTVkUxcy8i3vdgT7juFiLAysDYyvS6yW356uAhFa3z/GXfW7dgO6p2q7sKGgtVv/A5s Yok1M04NnTTk1+h3eqzX7PUvDMpGc3ZOMtCMH0CWuOMvPi2uuHymYBpeSSfCmsgseOQN KMOOPFCFq+QSj5WJZwOkWIxleCUGJraMT5xZOf3YohGAO6Us/rYOsFffIyvLEQRUwHlW sGIRAV++Om87PMe7p4AH5OnVwe5i8/DxHMbp4r43tNtyBkoy6GFYvLD60xyePw+I3cSW w2VQ== X-Gm-Message-State: APjAAAV9rOFTwP2Ki89DexENPs4NVXl2IcgiMaGCv/gebsxWEXRt/YER 5/eHnAhJ//d1nVpc85owLbhmED0qH7F0XR8Z9ZrZiQ== X-Google-Smtp-Source: APXvYqxzXyGnK6h3SZpGj3PS5fjAb84fB9Q5c+zth+x2Q53u7zfYAao450G0vi2w0DL+8EIDn9MmN9ES3E76WTvwhA8= X-Received: by 2002:a6b:fb02:: with SMTP id h2mr804596iog.239.1552617566342; Thu, 14 Mar 2019 19:39:26 -0700 (PDT) MIME-Version: 1.0 References: <201903150205.x2F25qtD027856@gndrsh.dnsmgr.net> In-Reply-To: <201903150205.x2F25qtD027856@gndrsh.dnsmgr.net> From: Ed Maste Date: Thu, 14 Mar 2019 22:39:13 -0400 Message-ID: Subject: Re: svn commit: r345138 - head/share/man/man9 To: "Rodney W. Grimes" Cc: Warner Losh , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: A955B82834 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.940,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 02:39:34 -0000 On Thu, 14 Mar 2019 at 22:05, Rodney W. Grimes wrote: > > How do the tools today deal with taking a binary off the vendor branch? > Isn't this still a for-ever night mare merge thing to deal with? There isn't really the concept of taking a file off the vendor branch in the same way as with CVS, although it's still prudent to limit changes to vendor/contrib files to avoid conflicts during future imports. Modifying binary contrib files is a different matter, but that would be difficult to deal with regardless of whether they're uuencoded or not. Anyway, I'm not aware of us having done that before. From owner-svn-src-all@freebsd.org Fri Mar 15 02:46:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A4681538D3F for ; Fri, 15 Mar 2019 02:46:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B6BC082CF4 for ; Fri, 15 Mar 2019 02:46:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82c.google.com with SMTP id w30so3244978qta.8 for ; Thu, 14 Mar 2019 19:46:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=w5ECsBsoP9sUMtAYNUWtsvT45Z9pMe4z/pFJ1VKwD9k=; b=Fsj3lRPtvm/aNvvUYL8EO1VJPv44NO7crj0zCElgxiEFVWV3wDJZiQSK3Y03flpQqu irhLCyYyYBVa+LVnaDwDedmZtHBu3RLuoW/2C4+KYcA8wbS7yFgfKQhVNVPte16iK+Nw AHlIcGouiaMxpZPE8VXG1J2tfLwTgmpjiamqXE3jdggvN2UAfoGcVZdMtCmJ0djBYkDy kAVTZBKmVd9WfcarawILVoLTAKLHtJCjQGadrYwRhlLeOOQjG2hUuYix/0tEoez4HHp2 YCkwA1hRB3SjYmBYIVP4ZRz7D8fTVV7sAyNuMWbx4ZLaFYQtiAfCeLrdzH+7v1xlg2Sk AfCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=w5ECsBsoP9sUMtAYNUWtsvT45Z9pMe4z/pFJ1VKwD9k=; b=YD5FPQwv0HxSBqL/WlJijx2ZZChBQBxwmqtWAIvA/8Dl3c7k/yhbN0KfV14QhumAcr rQDuFSzts3ggdq4uIoGF+Vl6tZKQyPreUQ+H8iZdsiBaRaOZJGvA+RO8yQQDdJa/craB 4vlz1pTqh9gqTxM7ti5f6ZuBzfDSwy04Q57KXa5LugEJ47RWJkI+WFOxHGcuvIHvTqmk t8AwWW76Q21zLxSTXf6NPj0AkUGljWj8LVHIiMvrdTuEyYiRyH4kKtv2x9e0yJqaGlSv fg0RY8yQdNluVnobV/sQzMnR3C7nrdYHq17vO+oPl7bA1cJgI3AyqlZ8tfD7sgPfcgwg ks7g== X-Gm-Message-State: APjAAAVTgntVHavYL7ATh/6e5WzGsPOnFcaQ/j7Qt0c8CPKVdoRM5Jwn Csp3tWZeFYbD6QcjP6Ee2o2x9iE10La4aPbXWaUpvA== X-Google-Smtp-Source: APXvYqysMKm/g1ABqjlsg+a7iHibSH5/WuZCrFsOCnDt9bpbXKS70UUO3ITuu2DeEg5VwFMz4tH7vRANEihAP+mUSPo= X-Received: by 2002:ad4:5103:: with SMTP id g3mr855637qvp.214.1552617996859; Thu, 14 Mar 2019 19:46:36 -0700 (PDT) MIME-Version: 1.0 References: <201903150234.x2F2YiAv028021@gndrsh.dnsmgr.net> In-Reply-To: <201903150234.x2F2YiAv028021@gndrsh.dnsmgr.net> From: Warner Losh Date: Thu, 14 Mar 2019 20:46:24 -0600 Message-ID: Subject: Re: svn commit: r345138 - head/share/man/man9 To: "Rodney W. Grimes" Cc: Ed Maste , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: B6BC082CF4 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.975,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 02:46:38 -0000 On Thu, Mar 14, 2019, 8:35 PM Rodney W. Grimes wrote: > > On Thu, 14 Mar 2019 at 22:10, Rodney W. Grimes > > wrote: > > > > > > Covered this in my reply to Warners reply. I think we also need to > > > look at how this might affect vendor imported stuff, is there some if > > > it that was .uu'ed before import? > > > > We definitely don't want to change files in contrib/ - that's up to > > the upstreams. > > I think you miss understood, I belive in the paste, and possibly even > still, that prep work was done to vendor code before import. We use > to have shell scripts and such to deal with things like having to > .uu files, remove stuff you dont want, etc. > > I suspect some of that is inplace and we probably do not want to just > undo it without some careful thought. > Libarchive tests and a few bzip2 files are all that is left in contrib. All can be converted without hassle from what I can see. Anything that used to be done seems to be gone. Sys/config only has firmware in it, none of which is native format. Some of which can be converted, but there are build fixes that would be needed too. Warner > -- > Rod Grimes > rgrimes@freebsd.org > > From owner-svn-src-all@freebsd.org Fri Mar 15 02:52:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE17B1538F6A; Fri, 15 Mar 2019 02:52:02 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it1-f177.google.com (mail-it1-f177.google.com [209.85.166.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 81CD58309C; Fri, 15 Mar 2019 02:52:02 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it1-f177.google.com with SMTP id e24so8110652itl.1; Thu, 14 Mar 2019 19:52:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hFU8M2jr1mUQz97YAd9105/JwIfR33AuEr9VZp2YWOw=; b=terlCzmiaxQgKBd92LlHY5ly6IqDv7bJpZJPXAqr3PoUW5mEcfrUjAc13YQowVcTb6 eVvB9eYpvPITTyoCP/2hIfmiO5UBoy+/LPUCLiSFeJUjgUMVkODMoR3cSysRDsOJaZXw UdLsq/ys7BHF1gktp2rwADA0n9JOHNZgVEwbKtW9I22TKtMJspVl4ccL2YvnyLeY5Q0t HHPypQbnytnkUIvILkbtVu//+CPtozSG6ee3d6HJ7XU061m5MXGxZZo7FedqpIoj4efd M0yeW1t7DhitRtQeGYjZ7Mda678yRrGLdlzGqOhfSgB1+XggCTtrimdzoeUthFj4LVuI +1RQ== X-Gm-Message-State: APjAAAU2dU3M0Jf40VpvcjsFRl1uRnjsSTFULCRne/J1q4OYiUtOuFMm I1OvW4SIoai3ANWu83ES1fOvYt85+jGvySLRxKEOZwhk X-Google-Smtp-Source: APXvYqw7bw6CEVOlk+bwR10mxuajKpitRlwLzf/cypOAWHIplzI0YuA7ElOxVSVZtdG6IrsIxUZPnUJbILoIhIaKAeE= X-Received: by 2002:a24:5a8d:: with SMTP id v135mr557041ita.87.1552618315442; Thu, 14 Mar 2019 19:51:55 -0700 (PDT) MIME-Version: 1.0 References: <201903150234.x2F2YiAv028021@gndrsh.dnsmgr.net> In-Reply-To: <201903150234.x2F2YiAv028021@gndrsh.dnsmgr.net> From: Ed Maste Date: Thu, 14 Mar 2019 22:51:41 -0400 Message-ID: Subject: Re: svn commit: r345138 - head/share/man/man9 To: "Rodney W. Grimes" Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 81CD58309C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.939,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 02:52:03 -0000 On Thu, 14 Mar 2019 at 22:34, Rodney W. Grimes wrote: > > > We definitely don't want to change files in contrib/ - that's up to > > the upstreams. > > I think you miss understood, I belive in the paste, and possibly even > still, that prep work was done to vendor code before import. We use > to have shell scripts and such to deal with things like having to > .uu files, remove stuff you dont want, etc. Ah, I did misunderstand what you meant. Those sorts of scripts/processes are unique per vendor tree; uuencoding steps could be removed from any that have it (along with changes to our build infrastructure). I have a subset of the vendor tree checked out locally and none of the FreeBSD-Upgrade files I have reference uuencoding -- but I did not check everything. Note that we already have several vendor src trees that have verbatim binary files - for one example, contrib/file/tests/JW07022A.mp3.testfile. > I suspect some of that is inplace and we probably do not want to just > undo it without some careful thought. Fair point; I would leave process changes for vendor/contrib to the individual maintainers. From owner-svn-src-all@freebsd.org Fri Mar 15 03:05:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E46F6153979F for ; Fri, 15 Mar 2019 03:05:26 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-it1-x131.google.com (mail-it1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79C4B83D83 for ; Fri, 15 Mar 2019 03:05:24 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: by mail-it1-x131.google.com with SMTP id z124so8655067itc.2 for ; Thu, 14 Mar 2019 20:05:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fud-org-nz.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=B0tjL3HIsHWt0uRBzsJJy6sndDbBy7ezM9ZNxv9nmzg=; b=j8kkyVz90XelEFnFxQdy7nqOaIRzRNBDuNt7yD0jCRM0pUmfncb7QD7mOlUqRLGKzW 2n7Um/M37VCy0AcegnbDuT6aMz3A0meGohqEzSVLW+eNVzoMd5g54W6ViP+yBwvnmk7H 44fac5O+58DcLLS2M7HbK4UO8fzuwEoW75PimJ1SQKtWPA6eT4sA0GPwSrQMFg2vLIHx BMcPB6m5nmPeP9agdivDDAxYqHaH4DSM51D65b5LB1Ifg6Rz4YuP0jutq6JCKS+NIR2r yqq3+qemJLHM6CY9xFUVvksPjCcHLALvWugNEuDClWPwxLvcwF+WpRqrU+wHSs+XF0dd ugDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=B0tjL3HIsHWt0uRBzsJJy6sndDbBy7ezM9ZNxv9nmzg=; b=tPavpMs5lkwVcc5RhTZbU7wDEfB/Uvj0epkqbm9WAyeYux7OvUxjLnfUzJ3pY9AC1X 9q+O5PJFBerELG2dqxIiGSqUBopU4tUyJ2yXBkw5RLAupnbsFeokUYtrDrF3bqP4V45j WZa6gGEQpLN5jQ4/P6zehAjoJnZLmPqjFZqORz3lZo9yUGgOjnY0TiID8VK3UiuP8Xkj W8uTDF8tA7m7zpepOzusJS1V8Dk550IAP5G55eVZfkQ9hm8ux2ekscJD8ZSxW7yEuhwA +qSqsxCyrfD7or0J8AhorVtweHXUfYyXzNGhPbCBZv8F+Z6Da6BBCwL9autlbDBTcj/y v36A== X-Gm-Message-State: APjAAAWC7xZjvYbBApay7a17Zz1px/rBEXQmnJj9yuQPIXz/MZV6ss4P pw2fl2JXmFM29xcPPS4gtGuChQ9rCpbrCmPN2o6yLA== X-Google-Smtp-Source: APXvYqxyDoUhVmNiRw7jaEl8MpkbC7PiAWAwMqG6PurRb/Hs4kSMEdXttkkH3MDU++JZi5V4p4DX5x7/hZ5pw4DpduM= X-Received: by 2002:a24:2811:: with SMTP id h17mr667611ith.54.1552619124026; Thu, 14 Mar 2019 20:05:24 -0700 (PDT) MIME-Version: 1.0 References: <201903150211.x2F2BSai079898@repo.freebsd.org> In-Reply-To: <201903150211.x2F2BSai079898@repo.freebsd.org> From: Andrew Thompson Date: Fri, 15 Mar 2019 16:05:12 +1300 Message-ID: Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve To: Chuck Tuffli Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 79C4B83D83 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 03:05:27 -0000 On Fri, 15 Mar 2019 at 15:11, Chuck Tuffli wrote: > Author: chuck > Date: Fri Mar 15 02:11:28 2019 > New Revision: 345171 > URL: https://svnweb.freebsd.org/changeset/base/345171 > > Log: > Fix bhyve PCIe capability emulation > > PCIe devices starting with version 1.1 must set the Role-Based Error > Reporting bit. > > And while we're in the neighborhood, generalize the code assigning the > device type. > > Reviewed by: imp, araujo, rgrimes > Approved by: imp (mentor) > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D19580 > > Modified: > head/usr.sbin/bhyve/pci_emul.c > > Modified: head/usr.sbin/bhyve/pci_emul.c > > ============================================================================== > --- head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:27 2019 > (r345170) > +++ head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:28 2019 > (r345171) > @@ -953,7 +953,10 @@ pci_emul_add_pciecap(struct pci_devinst *pi, int type) > bzero(&pciecap, sizeof(pciecap)); > > pciecap.capid = PCIY_EXPRESS; > - pciecap.pcie_capabilities = PCIECAP_VERSION | PCIEM_TYPE_ROOT_PORT; > + pciecap.pcie_capabilities = PCIECAP_VERSION | type; > + /* Devices starting with version 1.1 must set the RBER bit */ > + if (PCIECAP_VERSION >= 1) > + pciecap.dev_capabilities = PCIEM_CAP_ROLE_ERR_RPT; > pciecap.link_capabilities = 0x411; /* gen1, x1 */ > pciecap.link_status = 0x11; /* gen1, x1 */ > If the message you say 'set the bit' but you are overwriting the whole variable, is this intended? Andrew From owner-svn-src-all@freebsd.org Fri Mar 15 03:14:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0ABF1539D38; Fri, 15 Mar 2019 03:14:52 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it1-f170.google.com (mail-it1-f170.google.com [209.85.166.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 90EC884341; Fri, 15 Mar 2019 03:14:52 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it1-f170.google.com with SMTP id m137so8194747ita.0; Thu, 14 Mar 2019 20:14:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Vc8vY+WuBkkUb3hmrnxaxAztTa2Rzrb0/1qjBP7ZSOA=; b=mpb3hM4jMH63csq/+e8KacptWF9c0bKySkTOyhfx+e2L8IEwoRfvOo/Q5nPCJzeedd YRA3fiEWu+VOL0njlkzo+nbiz5rpR4uu5X8VVQ4xucMDFilbZNpqoV0SQo82WDmoEvnl +8YlocQWxiHWYRys2ZGVrSiaB4yuRIxaS9OH0RTQTBDFi5+s562/it+Jw2dlr0ks4ddT Z1r0yCfSi6Q2WcNOW6DcMid5PDshzd4tJKabkBT6zo7xOhEfHpfxhybFuiA6Ra/liroH TxtJBhI+Zl+ZTuUecDDgfSSFBqqj6IfeIhitJXE7MRu2eBBOm5ZuR5+1Vw+oceTAkouT 4oaw== X-Gm-Message-State: APjAAAWdW9wclUIu03HFkOJ84nqHjKs2I+0pOZx3rmb9aJDkLH7XgQbx 4+FH+Vjx3ZFNs8csIsOTSWwfKnFmY36hPi8XOOA= X-Google-Smtp-Source: APXvYqz9ah8a/SRodkHH4sO4W2Ons9GRgd3RI566Ybe0A0YoIc9PlljPFgRqSGxMOcoKX2ghUgYzsmgcZIZl8Bgla1g= X-Received: by 2002:a02:1209:: with SMTP id i9mr1078707jad.111.1552619685875; Thu, 14 Mar 2019 20:14:45 -0700 (PDT) MIME-Version: 1.0 References: <201903150234.x2F2YiAv028021@gndrsh.dnsmgr.net> In-Reply-To: From: Ed Maste Date: Thu, 14 Mar 2019 23:14:33 -0400 Message-ID: Subject: Re: svn commit: r345138 - head/share/man/man9 To: Warner Losh Cc: "Rodney W. Grimes" , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 90EC884341 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 03:14:53 -0000 On Thu, 14 Mar 2019 at 22:46, Warner Losh wrote: > > Libarchive tests and a few bzip2 files are all that is left in contrib. All can be converted without hassle from what I can see. But these (libarchive at least) are uuencoded in the upstream repo, and we won't make a local change to undo that. Perhaps libarchive's upstream developers will decide that there's no need to uuencode the test files any longer, though. From owner-svn-src-all@freebsd.org Fri Mar 15 03:26:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 783CB153A2E6 for ; Fri, 15 Mar 2019 03:26:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1657E849A1 for ; Fri, 15 Mar 2019 03:26:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x733.google.com with SMTP id z76so4700194qkb.12 for ; Thu, 14 Mar 2019 20:26:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yCHgR+nljh9RfZU9sEhe0AutnNopP5esS/eTztReauY=; b=NV49bZaMYbYK93JbCZ5g1NhaP8qR8XBOs7P1y8s+H8i4MWaeUajVtzBpPtWsqUZI3A QAiESiUVBULr+wdZfyQL87o/x5W/AVO5ZW80FeL4TXi85Q+bC6JfszaE4opKfVgo4QKk NQroB/O5MJCn2JL4KqTGKHOfc4k0YfW+hMeZlaEraGl9Nj+YW58znSOVwDkE4++SeasX crcsPJUGfrtvJfvULqgmRncokYyiS/yLrYj6sajgZR/C3PA4G+eCCUiStHQSwJMYOgtS i+Oszx7LaMUskHfCyGX+Fa/1L1J+fFJ7/RWomAA77KGupSzQTXed0O5x0j9jj9fIf2rz Qgug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yCHgR+nljh9RfZU9sEhe0AutnNopP5esS/eTztReauY=; b=k0+galfd4t37KqZ4USKXG7P78KeJMcsGHjhRvhWk4xPmbjcoeBgIwXA6SGqLpbDpsd bE/7gL925wM8bzNTH3SgJhpNHSR5CN1co5q2yPb3gTQ6xNusp0tI73SZApse23Axnn/E 6nZ6DM+wOcH9AmCdQ/6N3v01+gWpdgbS3jmSlRGyyI+otl6BHl6fezVIa86ke230iqrh OwUXf2Ql3sUWsoGKDl1/FoPHMskP0ECY2Oke9pY+yE7gJgx8pp9nKX3tiyhzRqkvUWi2 JAfl56zBlx0n4jRPux+1kSFUPmT5k9Kqb/pd27bhqphFtWbdwD0mL4sMBHx7LYJsNsWr JDEQ== X-Gm-Message-State: APjAAAU69KxG8BIK3sDBR+M6xIAJpRwu3wX/Ln9z7ABQ4I7obpzBCKFY hYON1nMOsmnsVK0bJDlCi8MkKE1usKEMN2e1Ly2Brg== X-Google-Smtp-Source: APXvYqyvVYBhpjDhSDftBc5O8Fb2BzlygV9YH5YrfKvgE3T4ZIEKYzdCTYJVMQE4PKwv6EOQu11Y4L/i1bCdU8I8z1E= X-Received: by 2002:a37:a34f:: with SMTP id m76mr1221140qke.245.1552620375476; Thu, 14 Mar 2019 20:26:15 -0700 (PDT) MIME-Version: 1.0 References: <201903150234.x2F2YiAv028021@gndrsh.dnsmgr.net> In-Reply-To: From: Warner Losh Date: Thu, 14 Mar 2019 21:26:00 -0600 Message-ID: Subject: Re: svn commit: r345138 - head/share/man/man9 To: Ed Maste Cc: "Rodney W. Grimes" , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 1657E849A1 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 03:26:16 -0000 On Thu, Mar 14, 2019 at 9:14 PM Ed Maste wrote: > On Thu, 14 Mar 2019 at 22:46, Warner Losh wrote: > > > > Libarchive tests and a few bzip2 files are all that is left in contrib. > All can be converted without hassle from what I can see. > > But these (libarchive at least) are uuencoded in the upstream repo, > and we won't make a local change to undo that. Perhaps libarchive's > upstream developers will decide that there's no need to uuencode the > test files any longer, though Fair enough, I didn't check upstream. I'd have thought that libarchive was new enough, but I concur: if they are upstream that way, then it's fine. So it looks like we're down to a few stragglers that are still uuencoded, but we don't need to do that any more. And there's hundreds of files in the tree that are binaries already. From owner-svn-src-all@freebsd.org Fri Mar 15 03:31:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3831E153A6A3; Fri, 15 Mar 2019 03:31:18 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it1-f177.google.com (mail-it1-f177.google.com [209.85.166.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CC096850C8; Fri, 15 Mar 2019 03:31:17 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it1-f177.google.com with SMTP id h9so8730788itl.1; Thu, 14 Mar 2019 20:31:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8qOpX4zbV4ebRrWawGY8yzOLv9pUjCeZRrpD+fm8teA=; b=MkXoOoEX+EhFUa0QnC8coBjBikXoxoEL1o7olKn5wcgbR9BKk7HO3t38qps3Dxqixk tQxHhvko8E5LCQCyZVHT05cp31UpL+cp6jLwJ8o/CqOKpcw0yujSYVdHLGwtGFi9M2Ay VAaC6zP785Ml1/tyFzXVpb+t83qCsR1HmtUoiEKwO8mYrk3aRdcSTmp+5NfAcs083W9f LDMX2CynAaasaRmgj6muWPXlzrvZb56Pr4W7AEBihBzEN/Aq8DQmJMUz478EfkV+705u 51oxEuDrCs5kELhTdF0+bUZHs0rOwsd8tEqcdJLnLpDeDCVJuI6hQSkk8suzl2Mu22G1 PtIg== X-Gm-Message-State: APjAAAWLqs53EgcKaCgucTdpyLnKbTkJ5DWIglsvBnVk2UCFr2Vc22U2 rxZ8OwJcV8Uux0TwJMFsWH54SchVEIJN4koU0SYhfNBw X-Google-Smtp-Source: APXvYqx3zFONgLOrFTg4HAdUMW3BZLgNBqTKdHR3FpGuW8CRs8VjwH7nRDninM9teWLfZjVtXwFQXM4aQbnsDAy1FsY= X-Received: by 2002:a24:5a8d:: with SMTP id v135mr586281ita.87.1552619237163; Thu, 14 Mar 2019 20:07:17 -0700 (PDT) MIME-Version: 1.0 References: <201903150239.x2F2dH9m028042@gndrsh.dnsmgr.net> In-Reply-To: <201903150239.x2F2dH9m028042@gndrsh.dnsmgr.net> From: Ed Maste Date: Thu, 14 Mar 2019 23:07:05 -0400 Message-ID: Subject: Re: svn commit: r345138 - head/share/man/man9 To: "Rodney W. Grimes" Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: CC096850C8 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 03:31:18 -0000 On Thu, 14 Mar 2019 at 22:39, Rodney W. Grimes wrote: > > 4. There is no easy way to show > "changed byte at offset 0x432 from 0xef to 0xfe" But this is not that easy with uuencoded files, either - I'd just end up uudecoding both files before running cmp -x. And for the case under discussion here (firmware files) we treat them as opaque binary objects; comparing them is generally not interesting anyway. > Do we have a decent binary diff and binary patch tool? We have bsdiff and bspatch, but their output is not designed for human consumption or editing. From owner-svn-src-all@freebsd.org Fri Mar 15 03:36:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30086153A9BB; Fri, 15 Mar 2019 03:36:04 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 7FEAF853DB; Fri, 15 Mar 2019 03:36:03 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2F3a1nC028367; Thu, 14 Mar 2019 20:36:01 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2F3a1ZN028366; Thu, 14 Mar 2019 20:36:01 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903150336.x2F3a1ZN028366@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345138 - head/share/man/man9 In-Reply-To: To: Ed Maste Date: Thu, 14 Mar 2019 20:36:01 -0700 (PDT) CC: "Rodney W. Grimes" , src-committers , svn-src-all , svn-src-head 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-Rspamd-Queue-Id: 7FEAF853DB X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 03:36:04 -0000 [ Charset UTF-8 unsupported, converting... ] > On Thu, 14 Mar 2019 at 22:39, Rodney W. Grimes > wrote: > > > > 4. There is no easy way to show > > "changed byte at offset 0x432 from 0xef to 0xfe" How do we represent Copyright and License in such objects? This is an issue that is totally left out of even .uu version. > But this is not that easy with uuencoded files, either - I'd just end > up uudecoding both files before running cmp -x. And for the case under > discussion here (firmware files) we treat them as opaque binary > objects; comparing them is generally not interesting anyway. > > > Do we have a decent binary diff and binary patch tool? > > We have bsdiff and bspatch, but their output is not designed for human > consumption or editing. > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 15 03:36:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1F94153AA16 for ; Fri, 15 Mar 2019 03:36:48 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3FB8F85510 for ; Fri, 15 Mar 2019 03:36:48 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72a.google.com with SMTP id b74so4708153qkg.9 for ; Thu, 14 Mar 2019 20:36:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WJi1YQf9BFWLihMcnDpxTp0+uftlDM54CmmU5RG4p90=; b=WHy9eSDXL8O6PYRQE89xy+l/wBI5UFs2MzrZ8Kb1gG1iRInX1Zf35mk7MDysEzF73N IOwhXqCYNmEFC2OXQSIfh+Fqab2GpzFi3V1kket8Hue4y5W4+FWPWJoYJBd8p9RJLSvi 5QVzLmSpxnBWVDUfb1WCxi4Vy2Gq2D5jX4w+tMGglmYkgwIC2aypMY1yNQOb17sKFaFG k+N6y22d7azJM4W6rH+WZEt4+fAo98cYbd6QE12ga/Dv+jw3M729fPWT1chd1hTMX8vD OvljwM52XA7lNIH1iOUgdIvkGlFzui1pLahAAf1sjLtjOMaalCEz0lB0Lsvhm5Rh7yiI BSXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WJi1YQf9BFWLihMcnDpxTp0+uftlDM54CmmU5RG4p90=; b=XxgOFGqaDZTcUhveOvpbYnXNX2zyMVV6/YORtOjL5B5XGUe6ueymO4M8wUVWjiZczv p19sw5mB/xs807gXtlMe7P/zO/r6WAykMpSQEXZwpU+6SPzcntlah13wkplQXEOvL206 G1OL11Q8xtrLF54KCMzk+R0ADiU/nhUatG9LpaV3OAVQcV+rdzCvXNJoAA5qVex3mhmS 2/1YH8Bz/uCrgdDRhO14EVelZgodDrZ0aCvO9OlQtAWrSlUxBw2ddz2sY07Fht8Ow5cD kQgDfb1tlD5xV/LcPylsSvbMQVdd5/Ak+sXzydRcyMSyhF8kZSGVVjQTsWz7fDFblNDp TOeQ== X-Gm-Message-State: APjAAAW4wT4DlDIFh53izDFMeztiL1jCn2NqjKkswlrsdTfr5wDFEY8g VMZn7p4ELGDp10YV0P6NPTtUX+UV6kQVZ1xBceTb1w== X-Google-Smtp-Source: APXvYqyBWuPFnb+SAqXepx+JONkl/RKt6XUwofOOv+O6I21WwvU+G+a58x/WqJY/VTuGp0tr7788cPz2j3PCZB1J5YQ= X-Received: by 2002:a37:6fc2:: with SMTP id k185mr1215388qkc.175.1552621007822; Thu, 14 Mar 2019 20:36:47 -0700 (PDT) MIME-Version: 1.0 References: <201903150239.x2F2dH9m028042@gndrsh.dnsmgr.net> In-Reply-To: From: Warner Losh Date: Thu, 14 Mar 2019 21:36:36 -0600 Message-ID: Subject: Re: svn commit: r345138 - head/share/man/man9 To: Ed Maste Cc: "Rodney W. Grimes" , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 3FB8F85510 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 03:36:48 -0000 On Thu, Mar 14, 2019 at 9:31 PM Ed Maste wrote: > On Thu, 14 Mar 2019 at 22:39, Rodney W. Grimes > wrote: > > > > 4. There is no easy way to show > > "changed byte at offset 0x432 from 0xef to 0xfe" > > But this is not that easy with uuencoded files, either - I'd just end > up uudecoding both files before running cmp -x. And for the case under > discussion here (firmware files) we treat them as opaque binary > objects; comparing them is generally not interesting anyway. > All binaries in the tree are versioned opaque objects. #4 isn't a use case we care about, nor is it something we can to today. > > Do we have a decent binary diff and binary patch tool? > > We have bsdiff and bspatch, but their output is not designed for human > consumption or editing. > IIRC, git also has a way to transition from one binary to another in an externalized fashion. Warner From owner-svn-src-all@freebsd.org Fri Mar 15 03:37:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D840153AAA4 for ; Fri, 15 Mar 2019 03:37:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D44438568F for ; Fri, 15 Mar 2019 03:37:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x830.google.com with SMTP id k14so2935210qtb.0 for ; Thu, 14 Mar 2019 20:37:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1vzTWy9eukXJzyu4DxL4DL55OCGmKV9hWWvL5PESS6c=; b=l7yXBCbgMLAHLQoOFdmjr8q9WUnH8ukukCivG1n+WYcjNDyltHJdLTqStdden1b88p al3xvRaIQ3A03CAlEUT5EeCIO6+dZv2eQmiLkEtoossIw+UHffQFPLpwhShrKjFGzrRa H1sl7IEi+6cpFl5jQIDcimq5WEGcIWA9XjcoKbZ4hLwe32DQwq6GVpikJhKvyPjLPJg7 bggcBBPO7WwdlX+CVb9fz0+qdCGwoq+zd3OPpEpH2INz/XdKFB2DPyttWZl2PGhL2s79 44WpdfTfQfoLAJ1mN1yqsYZ87A2QGiFiRlnAxa9+DdBoIPf/bbrRPaBSBUejF9EDWCSr vPgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1vzTWy9eukXJzyu4DxL4DL55OCGmKV9hWWvL5PESS6c=; b=A9d8wD0Zh29UdkF/MlUeAknSMLaq6GjILbChmdYT/lrCGcBi50V8X9w3DlkvQE+Ov6 Z1yDWsXpnpNK5nnt1QkRx8UCImIks/QPgL9kL7UZMVU6SD7cGcQjuUAt5lIeq1sG3KTF wgFySRckJNL4ljtaF6qVG77d1I+gmEw7VIvRECsqzQBBaVWteGxawHWL9ERPXfybo/2K D8zU634zApnHicjPTTlKdG7pon+QC41R8fqExcP0/+B4ErnzMd+2Y4tn8x+TgBzwgtcn VRDmB46hXFtohjvWs8NppsJegnMywd7NZ51VGEKTX49emMSkm5+SkFBuoMVEEe3ag05x wTzw== X-Gm-Message-State: APjAAAUEVmQ/PmLB5DF/AaWcNB/GkHdWeKxDK7O+USk2BTlQPYYxbkyY jhVcSWAqSh8RD0xVs3pZ46nfrA0W71x6kJbWRRFmgw== X-Google-Smtp-Source: APXvYqxIgzJG2PMOm2diN4hV820+I/At/RbJaX99PM9/93j5OP7bkoaGj0Jr7I1R+uuPQXtEDF4ASMD88XUbo+7nmQk= X-Received: by 2002:a0c:9ba7:: with SMTP id o39mr912380qve.153.1552621070186; Thu, 14 Mar 2019 20:37:50 -0700 (PDT) MIME-Version: 1.0 References: <201903150336.x2F3a1ZN028366@gndrsh.dnsmgr.net> In-Reply-To: <201903150336.x2F3a1ZN028366@gndrsh.dnsmgr.net> From: Warner Losh Date: Thu, 14 Mar 2019 21:37:39 -0600 Message-ID: Subject: Re: svn commit: r345138 - head/share/man/man9 To: "Rodney W. Grimes" Cc: Ed Maste , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: D44438568F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 03:37:51 -0000 On Thu, Mar 14, 2019 at 9:36 PM Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] > > On Thu, 14 Mar 2019 at 22:39, Rodney W. Grimes > > wrote: > > > > > > 4. There is no easy way to show > > > "changed byte at offset 0x432 from 0xef to 0xfe" > > How do we represent Copyright and License in such objects? > This is an issue that is totally left out of even .uu version. > By indirect means. Usually an auxiliary file that describes permissions, when we bother at all. Warner > > But this is not that easy with uuencoded files, either - I'd just end > > up uudecoding both files before running cmp -x. And for the case under > > discussion here (firmware files) we treat them as opaque binary > > objects; comparing them is generally not interesting anyway. > > > > > Do we have a decent binary diff and binary patch tool? > > > > We have bsdiff and bspatch, but their output is not designed for human > > consumption or editing. > > > > -- > Rod Grimes > rgrimes@freebsd.org > > From owner-svn-src-all@freebsd.org Fri Mar 15 04:15:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C653C153BA0C; Fri, 15 Mar 2019 04:15:42 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 386D3869D8; Fri, 15 Mar 2019 04:15:42 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf1-x430.google.com with SMTP id r15so2599527pfn.9; Thu, 14 Mar 2019 21:15:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=QC2M1LsddWuSlEDcaeaGV417dfjwIePKI3ChOkxPXZI=; b=VDeU8reiOD3GDaKsPQVjj/W9XXJPwPo5egmIihL+0T42fXJ1/tUZbkepHenfWRp7vD FtUWPeZcNwwNr3nmBQFbxadLb7flfsxQW9WTQHVRNrnP++/uNA0HctGKgATKgsovSXNI 8lsUYNkx5evnHhDJNzaupVY1ykNVQ0T4YUzVF8O8zF+Ww2113wMBij9RX1tIo2vX5blJ t+g6HSllsb12GHPWmoBxaulgA5qh4Q0YCONKG30mN5/9pIiqm3a9WsC07jZvT3VaVLSZ z4H5ezSwUcauLm1J7hHJ8v+xf10TdlxUF6LmAsxp06Isa7+KBc9yMuzU8I20rSktG1IE lC6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=QC2M1LsddWuSlEDcaeaGV417dfjwIePKI3ChOkxPXZI=; b=sxOtCzA3/7enOQbA682mr40L1BUGoL+YSrZBruGfwBYrUyM0hkM6O7lOSs4yQTHvfT uJfHQJ64oFOntAKgyF5v1xE2GYhPIZ9L57uiKDTZE+TyNABDmAHJmQ2UoJiYN5v/AUyG QWKD5QVCJgqoJzQUhJcvir9VXdX0tZK6eicY2UkMDCJxJhFHvZr3C6hv/tVx2sgrPgrN //yUuAuqguTX+lPFHhd+2Dp7EOhL5t394fDhpEdvd0NUz3DG8K23tzF72dWAUqeapRDT fKjLj2/VfciaJjmRk7EN72ITB5Km7damaqNraM7NHXAXDh9KCiVhYQGFLF6vWwPGNlHP YPFw== X-Gm-Message-State: APjAAAUufMSow0q8hyFDZhndvMJbmBVYNFLS0QiLcJkXiq7xUBMI/lHr De3dzn9cqrs9nQiEQdpbWgzE0yjn X-Google-Smtp-Source: APXvYqw39/fqFVE/UJxKOV1VTDqzvvCFzaNR7OPJ6QHcUUq4wgr0nwDSYDUkaAxS2pplhHbOUUdsGA== X-Received: by 2002:a62:2ec5:: with SMTP id u188mr1845933pfu.99.1552623340611; Thu, 14 Mar 2019 21:15:40 -0700 (PDT) Received: from ?IPv6:2607:fb90:f89:f948:e066:47f:1ed1:1144? ([2607:fb90:f89:f948:e066:47f:1ed1:1144]) by smtp.gmail.com with ESMTPSA id s79sm864081pfa.61.2019.03.14.21.15.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Mar 2019 21:15:39 -0700 (PDT) Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r345138 - head/share/man/man9 From: Enji Cooper X-Mailer: iPhone Mail (16D57) In-Reply-To: Date: Thu, 14 Mar 2019 21:15:37 -0700 Cc: Ed Maste , "Rodney W. Grimes" , src-committers , svn-src-all , svn-src-head Message-Id: <3F10EBD1-9FE7-4DA2-9D56-700825EB58FD@gmail.com> References: <201903150234.x2F2YiAv028021@gndrsh.dnsmgr.net> To: Warner Losh X-Rspamd-Queue-Id: 386D3869D8 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 04:15:43 -0000 > On Mar 14, 2019, at 20:26, Warner Losh wrote: >=20 >=20 >=20 >> On Thu, Mar 14, 2019 at 9:14 PM Ed Maste wrote: >> On Thu, 14 Mar 2019 at 22:46, Warner Losh wrote: >> > >> > Libarchive tests and a few bzip2 files are all that is left in contrib.= All can be converted without hassle from what I can see. >>=20 >> But these (libarchive at least) are uuencoded in the upstream repo, >> and we won't make a local change to undo that. Perhaps libarchive's >> upstream developers will decide that there's no need to uuencode the >> test files any longer, though >=20 > Fair enough, I didn't check upstream. I'd have thought that libarchive was= new enough, but I concur: if they are upstream that way, then it's fine. So= it looks like we're down to a few stragglers that are still uuencoded, but w= e don't need to do that any more. And there's hundreds of files in the tree t= hat are binaries already. Libarchive implements uuencode file type detection, FYI. -Enji= From owner-svn-src-all@freebsd.org Fri Mar 15 04:29:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09C53153C284; Fri, 15 Mar 2019 04:29:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6AAB88715A; Fri, 15 Mar 2019 04:29:05 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg1-x52c.google.com with SMTP id v1so796596pgi.5; Thu, 14 Mar 2019 21:29:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=LXXj3j7wf+qoC0WDYS+oosnQkg/Ij7JHzz0lRc1KLhU=; b=lykbwxnp04J37FxgT30UxQa6KKieaZ45aitqYawIiJ+OvxRCTCwQW4h+BuSxNiRe1A +PJBy18UT0VVazgMeF9MW4VViZgjb3c8X2H5C7jB/HahMJ9kwCYy6jDNSMpOQak4W+So 15ZKd6kFQrlP79EN9NOKwLZ7MZBcFelNpv2Ku/q9fKuv47OcRuzxRV73X0+Hqcy8rWJV pPnwTw+zvVhZo5y+c6hxj1TbYJlMDHxqQOvDLQQjkvSldMzL7NXbCPg0Y8RFloOnUvSi yh/HGsk1CnhAZca2c8t2/9bWaJs2iP+lR6BXuxlw7WKE8Zrk41QA6znw3DGKVnaa6xb2 w8dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=LXXj3j7wf+qoC0WDYS+oosnQkg/Ij7JHzz0lRc1KLhU=; b=ARyP4kOkdeXXbYsxvcYzEhUUpCC4AenmvgN8rB949fPSbbhoNmzNSP2oInaZpgHECa fUcC3Td4s1Y2J+/Gn8U9emSLN54jW2u3t/LcCefaOF53QhKcPVysYricPvtms+y4tP5i fo7ZiOKrnIeHZ9iK0d2m3CprV90xhePr/4cK/FQDY+UBXto0i5kzSbKJsrMDbYKLHUkw vjUL1N0gfOMbNiw7REU/1/IcauPQ4/mVZoszIdACUG7HKG3dCSN+ZNsUE4UoFBcKvYpo 7YY5d0VNmwtaWnYJ/OB3eqIKKDuU26Uzna+6+bIjz7XmFDkUvJJfZQJQQWRi10Tvpprq gyhw== X-Gm-Message-State: APjAAAW5di+cGMvEhyDT2/fG19gnyHfL0HtcquX8WEPp/baNSL4mdd3P oX2JXwwer+LzeY0UygOc7K9HahOK X-Google-Smtp-Source: APXvYqxiwjk2BJjLMQk3tK4gr3DnlaJdWcchvvkuzcea+V3T5Pu9TxniZC4bm5Y6sxrFE/gu612wzw== X-Received: by 2002:a17:902:6a83:: with SMTP id n3mr2004381plk.313.1552624144144; Thu, 14 Mar 2019 21:29:04 -0700 (PDT) Received: from ?IPv6:2607:fb90:f89:f948:e066:47f:1ed1:1144? ([2607:fb90:f89:f948:e066:47f:1ed1:1144]) by smtp.gmail.com with ESMTPSA id f87sm890349pff.38.2019.03.14.21.29.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Mar 2019 21:29:03 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r345138 - head/share/man/man9 From: Enji Cooper X-Mailer: iPhone Mail (16D57) In-Reply-To: Date: Thu, 14 Mar 2019 21:29:02 -0700 Cc: "Rodney W. Grimes" , src-committers , svn-src-all , svn-src-head Content-Transfer-Encoding: quoted-printable Message-Id: <75FBF3E0-A236-48FE-8AB9-3AFBB039CE59@gmail.com> References: <201903150210.x2F2ABwZ027877@gndrsh.dnsmgr.net> To: Ed Maste X-Rspamd-Queue-Id: 6AAB88715A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 04:29:06 -0000 Before all of the uuencoded files get decoded in the tree.. are we sure that= non-uuencoded binary files will be proper identified if the mime type is no= nexistent in svn? What about other VCSes like hg? I=E2=80=99m asking, because not all downstream vendors have the newest versi= ons of svn, once upon a time, may have mashed mime types, etc, which may hav= e interesting downstream effects if the binary type isn=E2=80=99t detected p= roperly. Thank you, -Enji From owner-svn-src-all@freebsd.org Fri Mar 15 05:55:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05307153ECC3; Fri, 15 Mar 2019 05:55:35 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6AF2289D7A; Fri, 15 Mar 2019 05:55:34 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f43.google.com with SMTP id u12so7254323iop.11; Thu, 14 Mar 2019 22:55:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=Hc7eafKegjIcWhbxEmu4Bq46F+n/blxgItwkwuO07UU=; b=mHnAQBEHCIPE+0SCALpVNsIwQGjfI4rriASFauDgsEqog9H7Su0ZVcLmMSgLg0Yqgc 0jwC7GzTC1DCOhjkw42aQhqRq0EP4Atfegl3wiJ+LU+ksRENXOYAPnEQ+Fmrtx5OcoOh cbP8zh5+vChDqnz6/Vaix8zANdiKWMNH/RtKmEDQgyifLA2B4b1YnNwnlf2FbPcpT8Ru XJc4RQz0iU0VC9xWbLMYVqDo79oUFVlvd7NWxUgIcdgmsCS4fW/1pjJ01l9gqrlSNaOk ggQQMEUvkXiHa+gfNq3Yv0Wc0J813/M6YWkvYydM4iYaJLYoTnQg+r1flUH+f4Q7/WBn b8HQ== X-Gm-Message-State: APjAAAWxb69TtpmKWmAFkiOeG205EM7G/s79gbO8D5HKFBOfmKHN5miI oZv1Tt2xqEmwEP/9HgVy7QeSvKud X-Google-Smtp-Source: APXvYqx5WisBqumKy8YuOZRu0s6DdnOlNt5OWljieISYF9iVNFzC0zDVf4LUKJF1gBEXGgpBkDbo1g== X-Received: by 2002:a6b:7505:: with SMTP id l5mr1072247ioh.244.1552627473414; Thu, 14 Mar 2019 22:24:33 -0700 (PDT) Received: from mail-io1-f54.google.com (mail-io1-f54.google.com. [209.85.166.54]) by smtp.gmail.com with ESMTPSA id w19sm554246ita.33.2019.03.14.22.24.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Mar 2019 22:24:32 -0700 (PDT) Received: by mail-io1-f54.google.com with SMTP id b9so561348iot.13; Thu, 14 Mar 2019 22:24:32 -0700 (PDT) X-Received: by 2002:a6b:c84e:: with SMTP id y75mr1141627iof.107.1552627472298; Thu, 14 Mar 2019 22:24:32 -0700 (PDT) MIME-Version: 1.0 References: <201903150211.x2F2BSai079898@repo.freebsd.org> In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Thu, 14 Mar 2019 22:24:21 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve To: Andrew Thompson Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 6AF2289D7A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 05:55:35 -0000 On Thu, Mar 14, 2019 at 8:06 PM Andrew Thompson wrote: > > On Fri, 15 Mar 2019 at 15:11, Chuck Tuffli wrote: >> bzero(&pciecap, sizeof(pciecap)); ... >> + pciecap.dev_capabilities = PCIEM_CAP_ROLE_ERR_RPT; > > If the message you say 'set the bit' but you are overwriting the whole variable, is this intended? Looks like it was zero before. So yeah, it sets the bit. From owner-svn-src-all@freebsd.org Fri Mar 15 07:16:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C78921540828; Fri, 15 Mar 2019 07:16:34 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 503FF8C08D; Fri, 15 Mar 2019 07:16:34 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (v-critter.freebsd.dk [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id 031E22025625; Fri, 15 Mar 2019 07:16:32 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id x2F7GWWx003319 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 15 Mar 2019 07:16:32 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id x2F7GWDM003318; Fri, 15 Mar 2019 07:16:32 GMT (envelope-from phk) To: rgrimes@freebsd.org, "Rodney W. Grimes" cc: Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r345138 - head/share/man/man9 In-reply-to: <201903150152.x2F1q34w027789@gndrsh.dnsmgr.net> From: "Poul-Henning Kamp" References: <201903150152.x2F1q34w027789@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3316.1552634192.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Fri, 15 Mar 2019 07:16:32 +0000 Message-ID: <3317.1552634192@critter.freebsd.dk> X-Rspamd-Queue-Id: 503FF8C08D X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 07:16:35 -0000 -------- In message <201903150152.x2F1q34w027789@gndrsh.dnsmgr.net>, "Rodney W. Gri= mes" = writes: >> The first versions of CTM used diff -e and ed(1) to transmit changes, >> and that choked up on binary files. We didn't have patch in the >> tree back then. >patch has always been in the tree. >https://github.com/sergev/4.4BSD-Lite2/tree/master/usr/src/usr.bin/patch Yes, in *that* tree, but it was not always in *our* tree, particularly not in the strange time between 1.1.5.1 and 2.0. Trust me: if it had been, I would not have used diff-e+ed(1) -- = Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe = Never attribute to malice what can adequately be explained by incompetence= . From owner-svn-src-all@freebsd.org Fri Mar 15 07:25:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 713091540BE6; Fri, 15 Mar 2019 07:25:44 +0000 (UTC) (envelope-from zec@fer.hr) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10085.outbound.protection.outlook.com [40.107.1.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A3C918C69B; Fri, 15 Mar 2019 07:25:42 +0000 (UTC) (envelope-from zec@fer.hr) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ferhr.onmicrosoft.com; s=selector1-fer-hr; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EZU1PFPUNUEcgU3qCYBpe0qerKPzuFomnaZhgK5pKyI=; b=nSgwhtIA7IAOAV5SMug5T+bXXWS0qFWQXje6D6PNrL7MNr+l7F4jzLxnWqb7yqR5smsW3QWXaKUHZap76B1dVo9LVOO6S1VmeM0a1TTbwxdF+V4+6FgtVgM1yqswZxXzyp7YsNfEK2nzOQVijg4zu3ipE5bwXRAYz+G/cpSEPRU= Received: from AM5PR0801MB1761.eurprd08.prod.outlook.com (10.169.247.15) by AM5PR0801MB2082.eurprd08.prod.outlook.com (10.168.158.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.13; Fri, 15 Mar 2019 07:25:40 +0000 Received: from AM5PR0801MB1761.eurprd08.prod.outlook.com ([fe80::1526:e94b:2e45:3dab]) by AM5PR0801MB1761.eurprd08.prod.outlook.com ([fe80::1526:e94b:2e45:3dab%5]) with mapi id 15.20.1709.011; Fri, 15 Mar 2019 07:25:40 +0000 From: Marko Zec To: "Bjoern A. Zeeb" CC: Kyle Evans , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r345151 - head/sys/net Thread-Topic: svn commit: r345151 - head/sys/net Thread-Index: AQHU2p77yMZjuu8l+UaZjth6ZGp7eaYLj74AgAC77AA= Date: Fri, 15 Mar 2019 07:25:40 +0000 Message-ID: <20190315082650.3c1bf341@x23> References: <201903141948.x2EJmhvY075110@repo.freebsd.org> <51089C2A-A135-445E-B733-02654C5F8B68@lists.zabbadoz.net> In-Reply-To: <51089C2A-A135-445E-B733-02654C5F8B68@lists.zabbadoz.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR08CA0107.eurprd08.prod.outlook.com (2603:10a6:800:d3::33) To AM5PR0801MB1761.eurprd08.prod.outlook.com (2603:10a6:203:3b::15) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; amd64-portbld-freebsd11.2) x-originating-ip: [161.53.63.215] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a08ce735-791e-4b25-44eb-08d6a9176d18 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:AM5PR0801MB2082; x-ms-traffictypediagnostic: AM5PR0801MB2082: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-forefront-prvs: 09778E995A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(7916004)(39850400004)(136003)(396003)(346002)(376002)(366004)(189003)(199004)(476003)(6436002)(68736007)(74482002)(6916009)(8676002)(229853002)(6306002)(106356001)(105586002)(6246003)(6512007)(4744005)(786003)(71190400001)(9686003)(6486002)(71200400001)(66066001)(33716001)(81166006)(81156014)(86362001)(53936002)(316002)(4326008)(3846002)(50226002)(14454004)(6506007)(5660300002)(8936002)(386003)(6116002)(53546011)(99286004)(478600001)(97736004)(25786009)(966005)(256004)(54906003)(486006)(186003)(305945005)(26005)(11346002)(7736002)(102836004)(76176011)(1076003)(2906002)(52116002)(446003)(39210200001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0801MB2082; H:AM5PR0801MB1761.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: fer.hr does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: r13eSnxSBZYCpdclGsIZyQnCAzmIkNA4yZJMTA8BAYdxavU9Jm8ps1TJpocX6zys2lmXqbO0tSw64JCsq6xM/uDumv6DWWk0HyQafBWzCneENHqelCYa4cXqVzxvZ9PDwSydYGjB6hDmVV4mVP/5GPMiPFKUZYgCwtj0BWfyjBTiteEOFm235uIl7IAELGGIinbhu/QHdggr0Wb0GSW2p2BNVgdx4e1EU3cNmYYfzHHQcIITMdyPa29nOk21+dd181sEXNGHdn4wlqViz8DQ5Y8gCDUH46n9zVg6/KG/7825hYSGsSZU2illVIc1bjQpdtFX0oaiw/O9FocFlOj0yPKGvShahTddbjyq9Ppka9pNUeKFOMkQGs3okwjNVdItQNw5c63ebvuDR/taPu4N+UnWUbyZ/TmO0uH49hSvD0g= Content-Type: text/plain; charset="us-ascii" Content-ID: <3F467B7467F01B459AF836FC685C127F@eurprd08.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: fer.hr X-MS-Exchange-CrossTenant-Network-Message-Id: a08ce735-791e-4b25-44eb-08d6a9176d18 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Mar 2019 07:25:40.3126 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: ca71eddc-cc7b-4e5b-95bd-55b658e696be X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB2082 X-Rspamd-Queue-Id: A3C918C69B X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 07:25:44 -0000 On Thu, 14 Mar 2019 20:14:14 +0000 "Bjoern A. Zeeb" wrote: > On 14 Mar 2019, at 19:48, Kyle Evans wrote: >=20 > > Author: kevans > > Date: Thu Mar 14 19:48:43 2019 > > New Revision: 345151 > > URL: https://svnweb.freebsd.org/changeset/base/345151 > > > > Log: > > ether_fakeaddr: Use 'b' 's' 'd' for the prefix ... > epair(4) is yet another one of the cloned interfaces which does magic=20 > for the ethernet addresses, not sure what else. ng_eiface(4) currently does not autogenerate a fake MAC address (defaults to all zeros), but it could be useful if it would, in a way consistent to the rest of the clonable fake ethernet ifcs... Marko From owner-svn-src-all@freebsd.org Fri Mar 15 07:34:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A43BB1540E8A; Fri, 15 Mar 2019 07:34:07 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 405BF8CB2F; Fri, 15 Mar 2019 07:34:07 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2FD856F83; Fri, 15 Mar 2019 07:34:07 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2F7Y7dT051045; Fri, 15 Mar 2019 07:34:07 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2F7Y6Ov051042; Fri, 15 Mar 2019 07:34:06 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903150734.x2F7Y6Ov051042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 15 Mar 2019 07:34:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345172 - stable/12/sys/dev/iwm X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: stable/12/sys/dev/iwm X-SVN-Commit-Revision: 345172 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 405BF8CB2F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 07:34:07 -0000 Author: avos Date: Fri Mar 15 07:34:06 2019 New Revision: 345172 URL: https://svnweb.freebsd.org/changeset/base/345172 Log: MFC r345002: iwm(4): use correct channel list source for Intel 3168 Intel 3168 uses another EEPROM section to store channel flags; port missing bits from iwlwifi to make it work. PR: 230750, 236235 Tested by: Bert JW Regeer Modified: stable/12/sys/dev/iwm/if_iwm.c stable/12/sys/dev/iwm/if_iwm_7000.c stable/12/sys/dev/iwm/if_iwm_config.h stable/12/sys/dev/iwm/if_iwmreg.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/iwm/if_iwm.c ============================================================================== --- stable/12/sys/dev/iwm/if_iwm.c Fri Mar 15 02:11:28 2019 (r345171) +++ stable/12/sys/dev/iwm/if_iwm.c Fri Mar 15 07:34:06 2019 (r345172) @@ -2237,7 +2237,8 @@ iwm_parse_nvm_data(struct iwm_softc *sc, } if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) { - memcpy(data->nvm_ch_flags, &nvm_sw[IWM_NVM_CHANNELS], + memcpy(data->nvm_ch_flags, sc->cfg->nvm_type == IWM_NVM_SDP ? + ®ulatory[0] : &nvm_sw[IWM_NVM_CHANNELS], IWM_NUM_CHANNELS * sizeof(uint16_t)); } else { memcpy(data->nvm_ch_flags, ®ulatory[IWM_NVM_CHANNELS_8000], @@ -2297,8 +2298,9 @@ iwm_parse_nvm_sections(struct iwm_softc *sc, struct iw sw = (const uint16_t *)sections[IWM_NVM_SECTION_TYPE_SW].data; calib = (const uint16_t *) sections[IWM_NVM_SECTION_TYPE_CALIBRATION].data; - regulatory = (const uint16_t *) - sections[IWM_NVM_SECTION_TYPE_REGULATORY].data; + regulatory = sc->cfg->nvm_type == IWM_NVM_SDP ? + (const uint16_t *)sections[IWM_NVM_SECTION_TYPE_REGULATORY_SDP].data : + (const uint16_t *)sections[IWM_NVM_SECTION_TYPE_REGULATORY].data; mac_override = (const uint16_t *) sections[IWM_NVM_SECTION_TYPE_MAC_OVERRIDE].data; phy_sku = (const uint16_t *)sections[IWM_NVM_SECTION_TYPE_PHY_SKU].data; Modified: stable/12/sys/dev/iwm/if_iwm_7000.c ============================================================================== --- stable/12/sys/dev/iwm/if_iwm_7000.c Fri Mar 15 02:11:28 2019 (r345171) +++ stable/12/sys/dev/iwm/if_iwm_7000.c Fri Mar 15 07:34:06 2019 (r345172) @@ -119,6 +119,7 @@ const struct iwm_cfg iwm3168_cfg = { .fw_name = IWM3168_FW, IWM_DEVICE_7000_COMMON, .host_interrupt_operation_mode = 0, + .nvm_type = IWM_NVM_SDP, }; const struct iwm_cfg iwm7265_cfg = { Modified: stable/12/sys/dev/iwm/if_iwm_config.h ============================================================================== --- stable/12/sys/dev/iwm/if_iwm_config.h Fri Mar 15 02:11:28 2019 (r345171) +++ stable/12/sys/dev/iwm/if_iwm_config.h Fri Mar 15 07:34:06 2019 (r345172) @@ -102,7 +102,20 @@ static inline uint8_t num_of_ant(uint8_t mask) #define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000 (32 * 512 * sizeof(uint16_t)) /* 32 KB */ #define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_9000 IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000 + /** + * enum iwl_nvm_type - nvm formats + * @IWM_NVM: the regular format + * @IWM_NVM_EXT: extended NVM format + * @IWM_NVM_SDP: NVM format used by 3168 series + */ +enum iwm_nvm_type { + IWM_NVM, + IWM_NVM_EXT, + IWM_NVM_SDP, +}; + +/** * struct iwm_cfg * @name: Official name of the device * @fw_name: Firmware filename. @@ -111,6 +124,7 @@ static inline uint8_t num_of_ant(uint8_t mask) * @nvm_hw_section_num: the ID of the HW NVM section * @apmg_wake_up_wa: should the MAC access REQ be asserted when a command * is in flight. This is due to a HW bug in 7260, 3160 and 7265. + * @nvm_type: see &enum iwl_nvm_type */ struct iwm_cfg { const char *name; @@ -120,6 +134,7 @@ struct iwm_cfg { int host_interrupt_operation_mode; uint8_t nvm_hw_section_num; int apmg_wake_up_wa; + enum iwm_nvm_type nvm_type; }; /* Modified: stable/12/sys/dev/iwm/if_iwmreg.h ============================================================================== --- stable/12/sys/dev/iwm/if_iwmreg.h Fri Mar 15 02:11:28 2019 (r345171) +++ stable/12/sys/dev/iwm/if_iwmreg.h Fri Mar 15 07:34:06 2019 (r345172) @@ -1992,6 +1992,7 @@ enum { IWM_NVM_SECTION_TYPE_REGULATORY = 3, IWM_NVM_SECTION_TYPE_CALIBRATION = 4, IWM_NVM_SECTION_TYPE_PRODUCTION = 5, + IWM_NVM_SECTION_TYPE_REGULATORY_SDP = 8, IWM_NVM_SECTION_TYPE_MAC_OVERRIDE = 11, IWM_NVM_SECTION_TYPE_PHY_SKU = 12, IWM_NVM_MAX_NUM_SECTIONS = 13, From owner-svn-src-all@freebsd.org Fri Mar 15 08:18:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44C4E154233C; Fri, 15 Mar 2019 08:18:03 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D5E328DC8A; Fri, 15 Mar 2019 08:18:02 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C2A41762D; Fri, 15 Mar 2019 08:18:02 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2F8I2AM071730; Fri, 15 Mar 2019 08:18:02 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2F8I28U071729; Fri, 15 Mar 2019 08:18:02 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903150818.x2F8I28U071729@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 15 Mar 2019 08:18: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: r345173 - in stable: 11/sbin/ifconfig 12/sbin/ifconfig X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 11/sbin/ifconfig 12/sbin/ifconfig X-SVN-Commit-Revision: 345173 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D5E328DC8A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 08:18:03 -0000 Author: avos Date: Fri Mar 15 08:18:02 2019 New Revision: 345173 URL: https://svnweb.freebsd.org/changeset/base/345173 Log: MFC r344748: Allow to build ifconfig(8) without wireless support The change removes SIOC[GS]IEEE80211 handling from ifconfig(8) if WITHOUT_WIRELESS_SUPPORT=yes is set in src.conf(5). Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D19289 Modified: stable/11/sbin/ifconfig/Makefile Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sbin/ifconfig/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/11/sbin/ifconfig/Makefile ============================================================================== --- stable/11/sbin/ifconfig/Makefile Fri Mar 15 07:34:06 2019 (r345172) +++ stable/11/sbin/ifconfig/Makefile Fri Mar 15 08:18:02 2019 (r345173) @@ -39,8 +39,10 @@ SRCS+= ifipsec.c # IPsec VTI SRCS+= sfp.c # SFP/SFP+ information LIBADD+= m +.if ${MK_WIRELESS_SUPPORT} != "no" SRCS+= ifieee80211.c # SIOC[GS]IEEE80211 support LIBADD+= 80211 +.endif SRCS+= carp.c # SIOC[GS]VH support SRCS+= ifgroup.c # ... From owner-svn-src-all@freebsd.org Fri Mar 15 08:18:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5ECAF154233D; Fri, 15 Mar 2019 08:18:03 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 037B68DC8B; Fri, 15 Mar 2019 08:18:03 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E5537762E; Fri, 15 Mar 2019 08:18:02 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2F8I2AJ071736; Fri, 15 Mar 2019 08:18:02 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2F8I2hO071735; Fri, 15 Mar 2019 08:18:02 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903150818.x2F8I2hO071735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 15 Mar 2019 08:18:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345173 - in stable: 11/sbin/ifconfig 12/sbin/ifconfig X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 11/sbin/ifconfig 12/sbin/ifconfig X-SVN-Commit-Revision: 345173 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 037B68DC8B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 08:18:03 -0000 Author: avos Date: Fri Mar 15 08:18:02 2019 New Revision: 345173 URL: https://svnweb.freebsd.org/changeset/base/345173 Log: MFC r344748: Allow to build ifconfig(8) without wireless support The change removes SIOC[GS]IEEE80211 handling from ifconfig(8) if WITHOUT_WIRELESS_SUPPORT=yes is set in src.conf(5). Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D19289 Modified: stable/12/sbin/ifconfig/Makefile Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sbin/ifconfig/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/12/sbin/ifconfig/Makefile ============================================================================== --- stable/12/sbin/ifconfig/Makefile Fri Mar 15 07:34:06 2019 (r345172) +++ stable/12/sbin/ifconfig/Makefile Fri Mar 15 08:18:02 2019 (r345173) @@ -39,8 +39,10 @@ SRCS+= ifipsec.c # IPsec VTI SRCS+= sfp.c # SFP/SFP+ information LIBADD+= m +.if ${MK_WIRELESS_SUPPORT} != "no" SRCS+= ifieee80211.c # SIOC[GS]IEEE80211 support LIBADD+= 80211 +.endif SRCS+= carp.c # SIOC[GS]VH support SRCS+= ifgroup.c # ... From owner-svn-src-all@freebsd.org Fri Mar 15 08:21:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4E0E15425DD; Fri, 15 Mar 2019 08:21:11 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 85DED8DFA5; Fri, 15 Mar 2019 08:21:11 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 785447771; Fri, 15 Mar 2019 08:21:11 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2F8LBwX073466; Fri, 15 Mar 2019 08:21:11 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2F8LBfL073465; Fri, 15 Mar 2019 08:21:11 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903150821.x2F8LBfL073465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 15 Mar 2019 08:21: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: r345174 - stable/10/sbin/ifconfig X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: stable/10/sbin/ifconfig X-SVN-Commit-Revision: 345174 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 85DED8DFA5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 08:21:12 -0000 Author: avos Date: Fri Mar 15 08:21:11 2019 New Revision: 345174 URL: https://svnweb.freebsd.org/changeset/base/345174 Log: MFC r344748: Allow to build ifconfig(8) without wireless support The change removes SIOC[GS]IEEE80211 handling from ifconfig(8) if WITHOUT_WIRELESS_SUPPORT=yes is set in src.conf(5). Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D19289 Modified: stable/10/sbin/ifconfig/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/Makefile ============================================================================== --- stable/10/sbin/ifconfig/Makefile Fri Mar 15 08:18:02 2019 (r345173) +++ stable/10/sbin/ifconfig/Makefile Fri Mar 15 08:21:11 2019 (r345174) @@ -39,9 +39,11 @@ SRCS+= sfp.c # SFP/SFP+ information DPADD+= ${LIBM} LDADD+= -lm +.if ${MK_WIRELESS_SUPPORT} != "no" SRCS+= ifieee80211.c regdomain.c # SIOC[GS]IEEE80211 support DPADD+= ${LIBBSDXML} ${LIBSBUF} LDADD+= -lbsdxml -lsbuf +.endif SRCS+= carp.c # SIOC[GS]VH support SRCS+= ifgroup.c # ... From owner-svn-src-all@freebsd.org Fri Mar 15 11:01:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A51B31545F8A; Fri, 15 Mar 2019 11:01:50 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 45E2B92A6F; Fri, 15 Mar 2019 11:01:50 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3158592CC; Fri, 15 Mar 2019 11:01:50 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FB1nO0060730; Fri, 15 Mar 2019 11:01:49 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FB1n2N060729; Fri, 15 Mar 2019 11:01:49 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201903151101.x2FB1n2N060729@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Fri, 15 Mar 2019 11:01:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345175 - stable/12/sys/netpfil/pf X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/12/sys/netpfil/pf X-SVN-Commit-Revision: 345175 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 45E2B92A6F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 11:01:50 -0000 Author: kp Date: Fri Mar 15 11:01:49 2019 New Revision: 345175 URL: https://svnweb.freebsd.org/changeset/base/345175 Log: MFC r344921: pf: Fix DIOCGETSRCNODES r343295 broke DIOCGETSRCNODES by failing to reset 'nr' after counting the number of source tracking nodes. This meant that we never copied the information to userspace, leading to '? -> ?' output from pfctl. PR: 236368 Modified: stable/12/sys/netpfil/pf/pf_ioctl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- stable/12/sys/netpfil/pf/pf_ioctl.c Fri Mar 15 08:21:11 2019 (r345174) +++ stable/12/sys/netpfil/pf/pf_ioctl.c Fri Mar 15 11:01:49 2019 (r345175) @@ -3754,6 +3754,8 @@ DIOCCHANGEADDR_error: break; } + nr = 0; + p = pstore = malloc(psn->psn_len, M_TEMP, M_WAITOK); for (i = 0, sh = V_pf_srchash; i <= pf_srchashmask; i++, sh++) { From owner-svn-src-all@freebsd.org Fri Mar 15 11:01:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 779741545FB0; Fri, 15 Mar 2019 11:01:53 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1977592A77; Fri, 15 Mar 2019 11:01:53 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B70692D1; Fri, 15 Mar 2019 11:01:53 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FB1qiC060792; Fri, 15 Mar 2019 11:01:52 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FB1qKs060791; Fri, 15 Mar 2019 11:01:52 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201903151101.x2FB1qKs060791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Fri, 15 Mar 2019 11:01: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: r345176 - stable/11/sys/netpfil/pf X-SVN-Group: stable-11 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/11/sys/netpfil/pf X-SVN-Commit-Revision: 345176 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1977592A77 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 11:01:53 -0000 Author: kp Date: Fri Mar 15 11:01:52 2019 New Revision: 345176 URL: https://svnweb.freebsd.org/changeset/base/345176 Log: MFC r344921: pf: Fix DIOCGETSRCNODES r343295 broke DIOCGETSRCNODES by failing to reset 'nr' after counting the number of source tracking nodes. This meant that we never copied the information to userspace, leading to '? -> ?' output from pfctl. PR: 236368 Modified: stable/11/sys/netpfil/pf/pf_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- stable/11/sys/netpfil/pf/pf_ioctl.c Fri Mar 15 11:01:49 2019 (r345175) +++ stable/11/sys/netpfil/pf/pf_ioctl.c Fri Mar 15 11:01:52 2019 (r345176) @@ -3326,6 +3326,8 @@ DIOCCHANGEADDR_error: break; } + nr = 0; + p = pstore = malloc(psn->psn_len, M_TEMP, M_WAITOK); for (i = 0, sh = V_pf_srchash; i <= pf_srchashmask; i++, sh++) { From owner-svn-src-all@freebsd.org Fri Mar 15 11:08:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F50815461FF; Fri, 15 Mar 2019 11:08:45 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 218459302B; Fri, 15 Mar 2019 11:08:45 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 116BE930B; Fri, 15 Mar 2019 11:08:45 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FB8j25061103; Fri, 15 Mar 2019 11:08:45 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FB8imX061102; Fri, 15 Mar 2019 11:08:44 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201903151108.x2FB8imX061102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Fri, 15 Mar 2019 11:08:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345177 - in head/sys: net netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: in head/sys: net netpfil/pf X-SVN-Commit-Revision: 345177 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 218459302B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 11:08:45 -0000 Author: kp Date: Fri Mar 15 11:08:44 2019 New Revision: 345177 URL: https://svnweb.freebsd.org/changeset/base/345177 Log: pf :Use counter(9) in pf tables. The counters of pf tables are updated outside the rule lock. That means state updates might overwrite each other. Furthermore allocation and freeing of counters happens outside the lock as well. Use counter(9) for the counters, and always allocate the counter table element, so that the race condition cannot happen any more. PR: 230619 Submitted by: Kajetan Staszkiewicz Reviewed by: glebius MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D19558 Modified: head/sys/net/pfvar.h head/sys/netpfil/pf/pf_table.c Modified: head/sys/net/pfvar.h ============================================================================== --- head/sys/net/pfvar.h Fri Mar 15 11:01:52 2019 (r345176) +++ head/sys/net/pfvar.h Fri Mar 15 11:08:44 2019 (r345177) @@ -1021,6 +1021,17 @@ struct pfr_tstats { int pfrts_cnt; int pfrts_refcnt[PFR_REFCNT_MAX]; }; + +struct pfr_ktstats { + struct pfr_table pfrts_t; + counter_u64_t pfrkts_packets[PFR_DIR_MAX][PFR_OP_TABLE_MAX]; + counter_u64_t pfrkts_bytes[PFR_DIR_MAX][PFR_OP_TABLE_MAX]; + counter_u64_t pfrkts_match; + counter_u64_t pfrkts_nomatch; + long pfrkts_tzero; + int pfrkts_cnt; + int pfrkts_refcnt[PFR_REFCNT_MAX]; +}; #define pfrts_name pfrts_t.pfrt_name #define pfrts_flags pfrts_t.pfrt_flags @@ -1034,8 +1045,9 @@ union sockaddr_union { #endif /* _SOCKADDR_UNION_DEFINED */ struct pfr_kcounters { - u_int64_t pfrkc_packets[PFR_DIR_MAX][PFR_OP_ADDR_MAX]; - u_int64_t pfrkc_bytes[PFR_DIR_MAX][PFR_OP_ADDR_MAX]; + counter_u64_t pfrkc_packets[PFR_DIR_MAX][PFR_OP_ADDR_MAX]; + counter_u64_t pfrkc_bytes[PFR_DIR_MAX][PFR_OP_ADDR_MAX]; + long pfrkc_tzero; }; SLIST_HEAD(pfr_kentryworkq, pfr_kentry); @@ -1043,8 +1055,7 @@ struct pfr_kentry { struct radix_node pfrke_node[2]; union sockaddr_union pfrke_sa; SLIST_ENTRY(pfr_kentry) pfrke_workq; - struct pfr_kcounters *pfrke_counters; - long pfrke_tzero; + struct pfr_kcounters pfrke_counters; u_int8_t pfrke_af; u_int8_t pfrke_net; u_int8_t pfrke_not; @@ -1054,7 +1065,7 @@ struct pfr_kentry { SLIST_HEAD(pfr_ktableworkq, pfr_ktable); RB_HEAD(pfr_ktablehead, pfr_ktable); struct pfr_ktable { - struct pfr_tstats pfrkt_ts; + struct pfr_ktstats pfrkt_kts; RB_ENTRY(pfr_ktable) pfrkt_tree; SLIST_ENTRY(pfr_ktable) pfrkt_workq; struct radix_node_head *pfrkt_ip4; @@ -1065,18 +1076,18 @@ struct pfr_ktable { long pfrkt_larg; int pfrkt_nflags; }; -#define pfrkt_t pfrkt_ts.pfrts_t +#define pfrkt_t pfrkt_kts.pfrts_t #define pfrkt_name pfrkt_t.pfrt_name #define pfrkt_anchor pfrkt_t.pfrt_anchor #define pfrkt_ruleset pfrkt_t.pfrt_ruleset #define pfrkt_flags pfrkt_t.pfrt_flags -#define pfrkt_cnt pfrkt_ts.pfrts_cnt -#define pfrkt_refcnt pfrkt_ts.pfrts_refcnt -#define pfrkt_packets pfrkt_ts.pfrts_packets -#define pfrkt_bytes pfrkt_ts.pfrts_bytes -#define pfrkt_match pfrkt_ts.pfrts_match -#define pfrkt_nomatch pfrkt_ts.pfrts_nomatch -#define pfrkt_tzero pfrkt_ts.pfrts_tzero +#define pfrkt_cnt pfrkt_kts.pfrkts_cnt +#define pfrkt_refcnt pfrkt_kts.pfrkts_refcnt +#define pfrkt_packets pfrkt_kts.pfrkts_packets +#define pfrkt_bytes pfrkt_kts.pfrkts_bytes +#define pfrkt_match pfrkt_kts.pfrkts_match +#define pfrkt_nomatch pfrkt_kts.pfrkts_nomatch +#define pfrkt_tzero pfrkt_kts.pfrkts_tzero /* keep synced with pfi_kif, used in RB_FIND */ struct pfi_kif_cmp { Modified: head/sys/netpfil/pf/pf_table.c ============================================================================== --- head/sys/netpfil/pf/pf_table.c Fri Mar 15 11:01:52 2019 (r345176) +++ head/sys/netpfil/pf/pf_table.c Fri Mar 15 11:08:44 2019 (r345177) @@ -113,6 +113,7 @@ struct pfr_walktree { struct pfi_dynaddr *pfrw1_dyn; } pfrw_1; int pfrw_free; + int pfrw_flags; }; #define pfrw_addr pfrw_1.pfrw1_addr #define pfrw_astats pfrw_1.pfrw1_astats @@ -126,15 +127,16 @@ struct pfr_walktree { static MALLOC_DEFINE(M_PFTABLE, "pf_table", "pf(4) tables structures"); VNET_DEFINE_STATIC(uma_zone_t, pfr_kentry_z); #define V_pfr_kentry_z VNET(pfr_kentry_z) -VNET_DEFINE_STATIC(uma_zone_t, pfr_kcounters_z); -#define V_pfr_kcounters_z VNET(pfr_kcounters_z) static struct pf_addr pfr_ffaddr = { .addr32 = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } }; +static void pfr_copyout_astats(struct pfr_astats *, + const struct pfr_kentry *, + const struct pfr_walktree *); static void pfr_copyout_addr(struct pfr_addr *, - struct pfr_kentry *ke); + const struct pfr_kentry *ke); static int pfr_validate_addr(struct pfr_addr *); static void pfr_enqueue_addrs(struct pfr_ktable *, struct pfr_kentryworkq *, int *, int); @@ -142,8 +144,12 @@ static void pfr_mark_addrs(struct pfr_ktable *); static struct pfr_kentry *pfr_lookup_addr(struct pfr_ktable *, struct pfr_addr *, int); +static bool pfr_create_kentry_counter(struct pfr_kcounters *, + int, int); static struct pfr_kentry *pfr_create_kentry(struct pfr_addr *); static void pfr_destroy_kentries(struct pfr_kentryworkq *); +static void pfr_destroy_kentry_counter(struct pfr_kcounters *, + int, int); static void pfr_destroy_kentry(struct pfr_kentry *); static void pfr_insert_kentries(struct pfr_ktable *, struct pfr_kentryworkq *, long); @@ -202,9 +208,6 @@ pfr_initialize(void) V_pfr_kentry_z = uma_zcreate("pf table entries", sizeof(struct pfr_kentry), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - V_pfr_kcounters_z = uma_zcreate("pf table counters", - sizeof(struct pfr_kcounters), NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, 0); V_pf_limits[PF_LIMIT_TABLE_ENTRIES].zone = V_pfr_kentry_z; V_pf_limits[PF_LIMIT_TABLE_ENTRIES].limit = PFR_KENTRY_HIWAT; } @@ -214,7 +217,6 @@ pfr_cleanup(void) { uma_zdestroy(V_pfr_kentry_z); - uma_zdestroy(V_pfr_kcounters_z); } int @@ -608,6 +610,13 @@ pfr_get_astats(struct pfr_table *tbl, struct pfr_astat w.pfrw_op = PFRW_GET_ASTATS; w.pfrw_astats = addr; w.pfrw_free = kt->pfrkt_cnt; + /* + * Flags below are for backward compatibility. It was possible to have + * a table without per-entry counters. Now they are always allocated, + * we just discard data when reading it if table is not configured to + * have counters. + */ + w.pfrw_flags = kt->pfrkt_flags; rv = kt->pfrkt_ip4->rnh_walktree(&kt->pfrkt_ip4->rh, pfr_walktree, &w); if (!rv) rv = kt->pfrkt_ip6->rnh_walktree(&kt->pfrkt_ip6->rh, @@ -774,10 +783,30 @@ pfr_lookup_addr(struct pfr_ktable *kt, struct pfr_addr return (ke); } +static bool +pfr_create_kentry_counter(struct pfr_kcounters *kc, int pfr_dir, int pfr_op) +{ + kc->pfrkc_packets[pfr_dir][pfr_op] = counter_u64_alloc(M_NOWAIT); + if (! kc->pfrkc_packets[pfr_dir][pfr_op]) + return (false); + + kc->pfrkc_bytes[pfr_dir][pfr_op] = counter_u64_alloc(M_NOWAIT); + if (! kc->pfrkc_bytes[pfr_dir][pfr_op]) { + /* Previous allocation will be freed through + * pfr_destroy_kentry() */ + return (false); + } + + kc->pfrkc_tzero = 0; + + return (true); +} + static struct pfr_kentry * pfr_create_kentry(struct pfr_addr *ad) { struct pfr_kentry *ke; + int pfr_dir, pfr_op; ke = uma_zalloc(V_pfr_kentry_z, M_NOWAIT | M_ZERO); if (ke == NULL) @@ -790,6 +819,14 @@ pfr_create_kentry(struct pfr_addr *ad) ke->pfrke_af = ad->pfra_af; ke->pfrke_net = ad->pfra_net; ke->pfrke_not = ad->pfra_not; + for (pfr_dir = 0; pfr_dir < PFR_DIR_MAX; pfr_dir ++) + for (pfr_op = 0; pfr_op < PFR_OP_ADDR_MAX; pfr_op ++) { + if (! pfr_create_kentry_counter(&ke->pfrke_counters, + pfr_dir, pfr_op)) { + pfr_destroy_kentry(ke); + return (NULL); + } + } return (ke); } @@ -805,10 +842,22 @@ pfr_destroy_kentries(struct pfr_kentryworkq *workq) } static void +pfr_destroy_kentry_counter(struct pfr_kcounters *kc, int pfr_dir, int pfr_op) +{ + counter_u64_free(kc->pfrkc_packets[pfr_dir][pfr_op]); + counter_u64_free(kc->pfrkc_bytes[pfr_dir][pfr_op]); +} + +static void pfr_destroy_kentry(struct pfr_kentry *ke) { - if (ke->pfrke_counters) - uma_zfree(V_pfr_kcounters_z, ke->pfrke_counters); + int pfr_dir, pfr_op; + + for (pfr_dir = 0; pfr_dir < PFR_DIR_MAX; pfr_dir ++) + for (pfr_op = 0; pfr_op < PFR_OP_ADDR_MAX; pfr_op ++) + pfr_destroy_kentry_counter(&ke->pfrke_counters, + pfr_dir, pfr_op); + uma_zfree(V_pfr_kentry_z, ke); } @@ -826,7 +875,7 @@ pfr_insert_kentries(struct pfr_ktable *kt, "(code=%d).\n", rv); break; } - p->pfrke_tzero = tzero; + p->pfrke_counters.pfrkc_tzero = tzero; n++; } kt->pfrkt_cnt += n; @@ -849,7 +898,7 @@ pfr_insert_kentry(struct pfr_ktable *kt, struct pfr_ad if (rv) return (rv); - p->pfrke_tzero = tzero; + p->pfrke_counters.pfrkc_tzero = tzero; kt->pfrkt_cnt++; return (0); @@ -884,15 +933,20 @@ static void pfr_clstats_kentries(struct pfr_kentryworkq *workq, long tzero, int negchange) { struct pfr_kentry *p; + int pfr_dir, pfr_op; SLIST_FOREACH(p, workq, pfrke_workq) { if (negchange) p->pfrke_not = !p->pfrke_not; - if (p->pfrke_counters) { - uma_zfree(V_pfr_kcounters_z, p->pfrke_counters); - p->pfrke_counters = NULL; + for (pfr_dir = 0; pfr_dir < PFR_DIR_MAX; pfr_dir ++) { + for (pfr_op = 0; pfr_op < PFR_OP_ADDR_MAX; pfr_op ++) { + counter_u64_zero(p->pfrke_counters. + pfrkc_packets[pfr_dir][pfr_op]); + counter_u64_zero(p->pfrke_counters. + pfrkc_bytes[pfr_dir][pfr_op]); + } } - p->pfrke_tzero = tzero; + p->pfrke_counters.pfrkc_tzero = tzero; } } @@ -981,7 +1035,7 @@ pfr_unroute_kentry(struct pfr_ktable *kt, struct pfr_k } static void -pfr_copyout_addr(struct pfr_addr *ad, struct pfr_kentry *ke) +pfr_copyout_addr(struct pfr_addr *ad, const struct pfr_kentry *ke) { bzero(ad, sizeof(*ad)); if (ke == NULL) @@ -995,6 +1049,33 @@ pfr_copyout_addr(struct pfr_addr *ad, struct pfr_kentr ad->pfra_ip6addr = ke->pfrke_sa.sin6.sin6_addr; } +static void +pfr_copyout_astats(struct pfr_astats *as, const struct pfr_kentry *ke, + const struct pfr_walktree *w) +{ + int dir, op; + const struct pfr_kcounters *kc = &ke->pfrke_counters; + + pfr_copyout_addr(&as->pfras_a, ke); + as->pfras_tzero = kc->pfrkc_tzero; + + if (! (w->pfrw_flags & PFR_TFLAG_COUNTERS)) { + bzero(as->pfras_packets, sizeof(as->pfras_packets)); + bzero(as->pfras_bytes, sizeof(as->pfras_bytes)); + as->pfras_a.pfra_fback = PFR_FB_NOCOUNT; + return; + } + + for (dir = 0; dir < PFR_DIR_MAX; dir ++) { + for (op = 0; op < PFR_OP_ADDR_MAX; op ++) { + as->pfras_packets[dir][op] = + counter_u64_fetch(kc->pfrkc_packets[dir][op]); + as->pfras_bytes[dir][op] = + counter_u64_fetch(kc->pfrkc_bytes[dir][op]); + } + } +} + static int pfr_walktree(struct radix_node *rn, void *arg) { @@ -1023,20 +1104,8 @@ pfr_walktree(struct radix_node *rn, void *arg) if (w->pfrw_free-- > 0) { struct pfr_astats as; - pfr_copyout_addr(&as.pfras_a, ke); + pfr_copyout_astats(&as, ke, w); - if (ke->pfrke_counters) { - bcopy(ke->pfrke_counters->pfrkc_packets, - as.pfras_packets, sizeof(as.pfras_packets)); - bcopy(ke->pfrke_counters->pfrkc_bytes, - as.pfras_bytes, sizeof(as.pfras_bytes)); - } else { - bzero(as.pfras_packets, sizeof(as.pfras_packets)); - bzero(as.pfras_bytes, sizeof(as.pfras_bytes)); - as.pfras_a.pfra_fback = PFR_FB_NOCOUNT; - } - as.pfras_tzero = ke->pfrke_tzero; - bcopy(&as, w->pfrw_astats, sizeof(as)); w->pfrw_astats++; } @@ -1260,6 +1329,7 @@ pfr_get_tstats(struct pfr_table *filter, struct pfr_ts struct pfr_ktableworkq workq; int n, nn; long tzero = time_second; + int pfr_dir, pfr_op; /* XXX PFR_FLAG_CLSTATS disabled */ ACCEPT_FLAGS(flags, PFR_FLAG_ALLRSETS); @@ -1278,7 +1348,25 @@ pfr_get_tstats(struct pfr_table *filter, struct pfr_ts continue; if (n-- <= 0) continue; - bcopy(&p->pfrkt_ts, tbl++, sizeof(*tbl)); + bcopy(&p->pfrkt_kts.pfrts_t, &tbl->pfrts_t, + sizeof(struct pfr_table)); + for (pfr_dir = 0; pfr_dir < PFR_DIR_MAX; pfr_dir ++) { + for (pfr_op = 0; pfr_op < PFR_OP_TABLE_MAX; pfr_op ++) { + tbl->pfrts_packets[pfr_dir][pfr_op] = + counter_u64_fetch( + p->pfrkt_packets[pfr_dir][pfr_op]); + tbl->pfrts_bytes[pfr_dir][pfr_op] = + counter_u64_fetch( + p->pfrkt_bytes[pfr_dir][pfr_op]); + } + } + tbl->pfrts_match = counter_u64_fetch(p->pfrkt_match); + tbl->pfrts_nomatch = counter_u64_fetch(p->pfrkt_nomatch); + tbl->pfrts_tzero = p->pfrkt_tzero; + tbl->pfrts_cnt = p->pfrkt_cnt; + for (pfr_op = 0; pfr_op < PFR_REFCNT_MAX; pfr_op++) + tbl->pfrts_refcnt[pfr_op] = p->pfrkt_refcnt[pfr_op]; + tbl++; SLIST_INSERT_HEAD(&workq, p, pfrkt_workq); } if (flags & PFR_FLAG_CLSTATS) @@ -1612,7 +1700,7 @@ pfr_commit_ktable(struct pfr_ktable *kt, long tzero) q->pfrke_mark = 1; SLIST_INSERT_HEAD(&garbageq, p, pfrke_workq); } else { - p->pfrke_tzero = tzero; + p->pfrke_counters.pfrkc_tzero = tzero; SLIST_INSERT_HEAD(&addq, p, pfrke_workq); } } @@ -1796,14 +1884,20 @@ static void pfr_clstats_ktable(struct pfr_ktable *kt, long tzero, int recurse) { struct pfr_kentryworkq addrq; + int pfr_dir, pfr_op; if (recurse) { pfr_enqueue_addrs(kt, &addrq, NULL, 0); pfr_clstats_kentries(&addrq, tzero, 0); } - bzero(kt->pfrkt_packets, sizeof(kt->pfrkt_packets)); - bzero(kt->pfrkt_bytes, sizeof(kt->pfrkt_bytes)); - kt->pfrkt_match = kt->pfrkt_nomatch = 0; + for (pfr_dir = 0; pfr_dir < PFR_DIR_MAX; pfr_dir ++) { + for (pfr_op = 0; pfr_op < PFR_OP_TABLE_MAX; pfr_op ++) { + counter_u64_zero(kt->pfrkt_packets[pfr_dir][pfr_op]); + counter_u64_zero(kt->pfrkt_bytes[pfr_dir][pfr_op]); + } + } + counter_u64_zero(kt->pfrkt_match); + counter_u64_zero(kt->pfrkt_nomatch); kt->pfrkt_tzero = tzero; } @@ -1812,6 +1906,7 @@ pfr_create_ktable(struct pfr_table *tbl, long tzero, i { struct pfr_ktable *kt; struct pf_ruleset *rs; + int pfr_dir, pfr_op; PF_RULES_WASSERT(); @@ -1830,6 +1925,34 @@ pfr_create_ktable(struct pfr_table *tbl, long tzero, i rs->tables++; } + for (pfr_dir = 0; pfr_dir < PFR_DIR_MAX; pfr_dir ++) { + for (pfr_op = 0; pfr_op < PFR_OP_TABLE_MAX; pfr_op ++) { + kt->pfrkt_packets[pfr_dir][pfr_op] = + counter_u64_alloc(M_NOWAIT); + if (! kt->pfrkt_packets[pfr_dir][pfr_op]) { + pfr_destroy_ktable(kt, 0); + return (NULL); + } + kt->pfrkt_bytes[pfr_dir][pfr_op] = + counter_u64_alloc(M_NOWAIT); + if (! kt->pfrkt_bytes[pfr_dir][pfr_op]) { + pfr_destroy_ktable(kt, 0); + return (NULL); + } + } + } + kt->pfrkt_match = counter_u64_alloc(M_NOWAIT); + if (! kt->pfrkt_match) { + pfr_destroy_ktable(kt, 0); + return (NULL); + } + + kt->pfrkt_nomatch = counter_u64_alloc(M_NOWAIT); + if (! kt->pfrkt_nomatch) { + pfr_destroy_ktable(kt, 0); + return (NULL); + } + if (!rn_inithead((void **)&kt->pfrkt_ip4, offsetof(struct sockaddr_in, sin_addr) * 8) || !rn_inithead((void **)&kt->pfrkt_ip6, @@ -1857,6 +1980,7 @@ static void pfr_destroy_ktable(struct pfr_ktable *kt, int flushaddr) { struct pfr_kentryworkq addrq; + int pfr_dir, pfr_op; if (flushaddr) { pfr_enqueue_addrs(kt, &addrq, NULL, 0); @@ -1873,6 +1997,15 @@ pfr_destroy_ktable(struct pfr_ktable *kt, int flushadd kt->pfrkt_rs->tables--; pf_remove_if_empty_ruleset(kt->pfrkt_rs); } + for (pfr_dir = 0; pfr_dir < PFR_DIR_MAX; pfr_dir ++) { + for (pfr_op = 0; pfr_op < PFR_OP_TABLE_MAX; pfr_op ++) { + counter_u64_free(kt->pfrkt_packets[pfr_dir][pfr_op]); + counter_u64_free(kt->pfrkt_bytes[pfr_dir][pfr_op]); + } + } + counter_u64_free(kt->pfrkt_match); + counter_u64_free(kt->pfrkt_nomatch); + free(kt, M_PFTABLE); } @@ -1941,9 +2074,9 @@ pfr_match_addr(struct pfr_ktable *kt, struct pf_addr * } match = (ke && !ke->pfrke_not); if (match) - kt->pfrkt_match++; + counter_u64_add(kt->pfrkt_match, 1); else - kt->pfrkt_nomatch++; + counter_u64_add(kt->pfrkt_nomatch, 1); return (match); } @@ -1998,17 +2131,14 @@ pfr_update_stats(struct pfr_ktable *kt, struct pf_addr ("pfr_update_stats: assertion failed.\n")); op_pass = PFR_OP_XPASS; } - kt->pfrkt_packets[dir_out][op_pass]++; - kt->pfrkt_bytes[dir_out][op_pass] += len; + counter_u64_add(kt->pfrkt_packets[dir_out][op_pass], 1); + counter_u64_add(kt->pfrkt_bytes[dir_out][op_pass], len); if (ke != NULL && op_pass != PFR_OP_XPASS && (kt->pfrkt_flags & PFR_TFLAG_COUNTERS)) { - if (ke->pfrke_counters == NULL) - ke->pfrke_counters = uma_zalloc(V_pfr_kcounters_z, - M_NOWAIT | M_ZERO); - if (ke->pfrke_counters != NULL) { - ke->pfrke_counters->pfrkc_packets[dir_out][op_pass]++; - ke->pfrke_counters->pfrkc_bytes[dir_out][op_pass] += len; - } + counter_u64_add(ke->pfrke_counters. + pfrkc_packets[dir_out][op_pass], 1); + counter_u64_add(ke->pfrke_counters. + pfrkc_bytes[dir_out][op_pass], len); } } @@ -2098,7 +2228,7 @@ pfr_pool_get(struct pfr_ktable *kt, int *pidx, struct _next_block: ke = pfr_kentry_byidx(kt, idx, af); if (ke == NULL) { - kt->pfrkt_nomatch++; + counter_u64_add(kt->pfrkt_nomatch, 1); return (1); } pfr_prepare_network(&umask, af, ke->pfrke_net); @@ -2123,7 +2253,7 @@ _next_block: /* this is a single IP address - no possible nested block */ PF_ACPY(counter, addr, af); *pidx = idx; - kt->pfrkt_match++; + counter_u64_add(kt->pfrkt_match, 1); return (0); } for (;;) { @@ -2143,7 +2273,7 @@ _next_block: /* lookup return the same block - perfect */ PF_ACPY(counter, addr, af); *pidx = idx; - kt->pfrkt_match++; + counter_u64_add(kt->pfrkt_match, 1); return (0); } From owner-svn-src-all@freebsd.org Fri Mar 15 11:21:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DC1615467E3; Fri, 15 Mar 2019 11:21:21 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C664693749; Fri, 15 Mar 2019 11:21:20 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B79DB9520; Fri, 15 Mar 2019 11:21:20 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FBLKoA069406; Fri, 15 Mar 2019 11:21:20 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FBLKFe069405; Fri, 15 Mar 2019 11:21:20 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201903151121.x2FBLKFe069405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Fri, 15 Mar 2019 11:21:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345178 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 345178 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C664693749 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 11:21:21 -0000 Author: kp Date: Fri Mar 15 11:21:20 2019 New Revision: 345178 URL: https://svnweb.freebsd.org/changeset/base/345178 Log: bridge: Fix panic if the STP root is removed If the spanning tree root interface is removed from the bridge we panic on the next 'ifconfig'. While the STP code is notified whenever a bridge member interface is removed from the bridge it does not clear the bs_root_port. This means bs_root_port can still point at an bridge_iflist which has been free()d. The next access to it will panic. Explicitly check if the interface we're removing in bstp_destroy() is the root, and if so re-assign the roles, which clears bs_root_port. Reviewed by: philip MFC after: 2 weeks Modified: head/sys/net/bridgestp.c Modified: head/sys/net/bridgestp.c ============================================================================== --- head/sys/net/bridgestp.c Fri Mar 15 11:08:44 2019 (r345177) +++ head/sys/net/bridgestp.c Fri Mar 15 11:21:20 2019 (r345178) @@ -2274,4 +2274,7 @@ bstp_destroy(struct bstp_port *bp) taskqueue_drain(taskqueue_swi, &bp->bp_statetask); taskqueue_drain(taskqueue_swi, &bp->bp_rtagetask); taskqueue_drain(taskqueue_swi, &bp->bp_mediatask); + + if (bp->bp_bs->bs_root_port == bp) + bstp_assign_roles(bp->bp_bs); } From owner-svn-src-all@freebsd.org Fri Mar 15 11:49:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E4C91546FC5; Fri, 15 Mar 2019 11:49:47 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA714943EA; Fri, 15 Mar 2019 11:49:46 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A72A59A1A; Fri, 15 Mar 2019 11:49:46 +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 x2FBnkak081700; Fri, 15 Mar 2019 11:49:46 GMT (envelope-from fsu@FreeBSD.org) Received: (from fsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FBnkV2081699; Fri, 15 Mar 2019 11:49:46 GMT (envelope-from fsu@FreeBSD.org) Message-Id: <201903151149.x2FBnkV2081699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fsu set sender to fsu@FreeBSD.org using -f From: Fedor Uporov Date: Fri, 15 Mar 2019 11:49:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345179 - head/sys/fs/ext2fs X-SVN-Group: head X-SVN-Commit-Author: fsu X-SVN-Commit-Paths: head/sys/fs/ext2fs X-SVN-Commit-Revision: 345179 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BA714943EA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 11:49:47 -0000 Author: fsu Date: Fri Mar 15 11:49:46 2019 New Revision: 345179 URL: https://svnweb.freebsd.org/changeset/base/345179 Log: Remove unneeded mount point unlock function calls. The ext2_nodealloccg() function unlocks the mount point in case of successful node allocation. The additional unlocks are not required and should be removed. PR: 236452 Reported by: pho MFC after: 3 days Modified: head/sys/fs/ext2fs/ext2_alloc.c Modified: head/sys/fs/ext2fs/ext2_alloc.c ============================================================================== --- head/sys/fs/ext2fs/ext2_alloc.c Fri Mar 15 11:21:20 2019 (r345178) +++ head/sys/fs/ext2fs/ext2_alloc.c Fri Mar 15 11:49:46 2019 (r345179) @@ -412,23 +412,21 @@ ext2_valloc(struct vnode *pvp, int mode, struct ucred td = curthread; error = vfs_hash_get(ump->um_mountp, ino, LK_EXCLUSIVE, td, vpp, NULL, NULL); if (error || *vpp != NULL) { - EXT2_UNLOCK(ump); return (error); } ip = malloc(sizeof(struct inode), M_EXT2NODE, M_WAITOK | M_ZERO); if (ip == NULL) { - EXT2_UNLOCK(ump); return (ENOMEM); } /* Allocate a new vnode/inode. */ if ((error = getnewvnode("ext2fs", ump->um_mountp, &ext2_vnodeops, &vp)) != 0) { free(ip, M_EXT2NODE); - EXT2_UNLOCK(ump); return (error); } + lockmgr(vp->v_vnlock, LK_EXCLUSIVE, NULL); vp->v_data = ip; ip->i_vnode = vp; ip->i_e2fs = fs = ump->um_e2fs; @@ -438,11 +436,9 @@ ext2_valloc(struct vnode *pvp, int mode, struct ucred ip->i_next_alloc_block = 0; ip->i_next_alloc_goal = 0; - lockmgr(vp->v_vnlock, LK_EXCLUSIVE, NULL); error = insmntque(vp, ump->um_mountp); if (error) { free(ip, M_EXT2NODE); - EXT2_UNLOCK(ump); return (error); } @@ -450,7 +446,6 @@ ext2_valloc(struct vnode *pvp, int mode, struct ucred if (error || *vpp != NULL) { *vpp = NULL; free(ip, M_EXT2NODE); - EXT2_UNLOCK(ump); return (error); } @@ -458,7 +453,6 @@ ext2_valloc(struct vnode *pvp, int mode, struct ucred vput(vp); *vpp = NULL; free(ip, M_EXT2NODE); - EXT2_UNLOCK(ump); return (error); } From owner-svn-src-all@freebsd.org Fri Mar 15 12:05:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1ACAA1547E18; Fri, 15 Mar 2019 12:05:50 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 5FC5194FB0; Fri, 15 Mar 2019 12:05:49 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 304A9105DF85; Fri, 15 Mar 2019 23:05:42 +1100 (AEDT) Date: Fri, 15 Mar 2019 23:05:40 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Poul-Henning Kamp cc: rgrimes@freebsd.org, "Rodney W. Grimes" , Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r345138 - head/share/man/man9 In-Reply-To: <3317.1552634192@critter.freebsd.dk> Message-ID: <20190315221737.N1248@besplex.bde.org> References: <201903150152.x2F1q34w027789@gndrsh.dnsmgr.net> <3317.1552634192@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=UJetJGXy c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=iKhvJSA4AAAA:8 a=7RpiaepYAAAA:20 a=yAgh5OCffEKsIKUBmEkA:9 a=CjuIK1q_8ugA:10 a=odh9cflL3HIXMm4fY7Wr:22 X-Rspamd-Queue-Id: 5FC5194FB0 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.938,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 12:05:50 -0000 On Fri, 15 Mar 2019, Poul-Henning Kamp wrote: > -------- > In message <201903150152.x2F1q34w027789@gndrsh.dnsmgr.net>, "Rodney W. Grimes" > writes: > >>> The first versions of CTM used diff -e and ed(1) to transmit changes, >>> and that choked up on binary files. We didn't have patch in the >>> tree back then. > >> patch has always been in the tree. >> https://github.com/sergev/4.4BSD-Lite2/tree/master/usr/src/usr.bin/patch > > Yes, in *that* tree, but it was not always in *our* tree, particularly > not in the strange time between 1.1.5.1 and 2.0. > > Trust me: if it had been, I would not have used diff-e+ed(1) patch has been in the tree since FreeBSD.1.1. It was gnu patch, so it had an unbroken history through the transition to 2.0. From a FreeBSD-5.2 repository: XX RCS file: /home/ncvs/src/gnu/usr.bin/patch/patch.c,v XX Working file: patch.c XX head: 1.21 XX branch: XX locks: strict XX access list: XX symbolic names: XX RELENG_4_10_0_RELEASE: 1.16.2.4 XX RELENG_4_10: 1.16.2.4.0.6 XX RELENG_4_10_BP: 1.16.2.4 XX RELENG_5_2_1_RELEASE: 1.21 XX RELENG_5_2_0_RELEASE: 1.21 XX RELENG_5_2: 1.21.0.6 XX RELENG_5_2_BP: 1.21 XX RELENG_4_9_0_RELEASE: 1.16.2.4 XX RELENG_4_9: 1.16.2.4.0.4 XX RELENG_4_9_BP: 1.16.2.4 XX RELENG_5_1_0_RELEASE: 1.21 XX RELENG_5_1: 1.21.0.4 XX RELENG_5_1_BP: 1.21 XX RELENG_4_8_0_RELEASE: 1.16.2.4 XX RELENG_4_8: 1.16.2.4.0.2 XX RELENG_4_8_BP: 1.16.2.4 XX RELENG_5_0_0_RELEASE: 1.21 XX RELENG_5_0: 1.21.0.2 XX RELENG_5_0_BP: 1.21 XX RELENG_4_7_0_RELEASE: 1.16.2.3 XX RELENG_4_7: 1.16.2.3.0.4 XX RELENG_4_7_BP: 1.16.2.3 XX RELENG_4_6_2_RELEASE: 1.16.2.3 XX RELENG_4_6_1_RELEASE: 1.16.2.3 XX RELENG_4_6_0_RELEASE: 1.16.2.3 XX RELENG_4_6: 1.16.2.3.0.2 XX RELENG_4_6_BP: 1.16.2.3 XX RELENG_4_5_0_RELEASE: 1.16.2.1 XX RELENG_4_5: 1.16.2.1.0.6 XX RELENG_4_5_BP: 1.16.2.1 XX RELENG_4_4_0_RELEASE: 1.16.2.1 XX RELENG_4_4: 1.16.2.1.0.4 XX RELENG_4_4_BP: 1.16.2.1 XX RELENG_4_3_0_RELEASE: 1.16.2.1 XX RELENG_4_3: 1.16.2.1.0.2 XX RELENG_4_3_BP: 1.16.2.1 XX RELENG_4_2_0_RELEASE: 1.16.2.1 XX RELENG_4_1_1_RELEASE: 1.16.2.1 XX PRE_SMPNG: 1.18 XX RELENG_4_1_0_RELEASE: 1.16 XX RELENG_3_5_0_RELEASE: 1.14.2.1 XX RELENG_4_0_0_RELEASE: 1.16 XX RELENG_4: 1.16.0.2 XX RELENG_4_BP: 1.16 XX RELENG_3_4_0_RELEASE: 1.14.2.1 XX RELENG_3_3_0_RELEASE: 1.14.2.1 XX RELENG_3_2_PAO: 1.14.0.4 XX RELENG_3_2_PAO_BP: 1.14 XX RELENG_3_2_0_RELEASE: 1.14 XX RELENG_3_1_0_RELEASE: 1.14 XX RELENG_3: 1.14.0.2 XX RELENG_3_BP: 1.14 XX RELENG_2_2_8_RELEASE: 1.6.6.3 XX RELENG_3_0_0_RELEASE: 1.14 XX RELENG_2_2_7_RELEASE: 1.6.6.3 XX RELENG_2_2_6_RELEASE: 1.6.6.3 XX RELENG_2_2_5_RELEASE: 1.6.6.1 XX RELENG_2_2_2_RELEASE: 1.6.6.1 XX RELENG_2_2_1_RELEASE: 1.6.6.1 XX RELENG_2_2_0_RELEASE: 1.6 XX RELENG_2_1_7_RELEASE: 1.6.4.1 XX RELENG_2_1_6_1_RELEASE: 1.6.4.1 XX RELENG_2_1_6_RELEASE: 1.6.4.1 XX RELENG_2_2: 1.6.0.6 XX RELENG_2_2_BP: 1.6 XX RELENG_2_1_5_RELEASE: 1.6.4.1 XX RELENG_2_1_0_RELEASE: 1.6 XX RELENG_2_1_0: 1.6.0.4 XX RELENG_2_1_0_BP: 1.6 XX RELENG_2_0_5_RELEASE: 1.6 XX RELENG_2_0_5: 1.6.0.2 XX RELENG_2_0_5_BP: 1.6 XX RELENG_2_0_5_ALPHA: 1.5 XX RELEASE_2_0: 1.4 XX BETA_2_0: 1.4 XX ALPHA_2_0: 1.4.0.2 XX MOVED_NEWCVS: 1.4 XX FINAL_1_1_5: 1.4 XX ALPHA_1_1_5: 1.4 XX FINAL_1_1: 1.3 XX GAMMA_1_1: 1.3 XX BETA_1_1: 1.3.0.2 XX BP_BETA_1_1: 1.3 XX FINAL_1_0: 1.1.1.1 XX EPSILON_1_0: 1.1.1.1 XX GAMMA_1_0: 1.1.1.1 XX BETA_1_0: 1.1.1.1 XX ALPHA_1_0: 1.1.1.1 XX V2_10: 1.1.1.1 XX keyword substitution: kv XX total revisions: 33; selected revisions: 33 XX description: XX ---------------------------- XX revision 1.21 XX date: 2002/10/13 01:18:33; author: kris; state: Exp; lines: +7 -6 XX Prevent stack-smashing buffer overflows in -D and -r options by using XX buffer-safe string functions. The rest of the code is still probably XX unsafe. XX XX MFC after: 1 week XX ... XX ---------------------------- XX revision 1.2 XX date: 1994/02/17 22:16:03; author: jkh; state: Exp; lines: +21 -7 XX From Poul-Henning Kamp - Implement a -C option to verify the integrity of XX a patch before actually applying it. XX ---------------------------- XX revision 1.1 XX date: 1993/06/19 14:21:51; author: paul; state: Exp; XX branches: 1.1.1; XX Initial revision XX ---------------------------- XX revision 1.1.1.1 XX date: 1993/06/19 14:21:52; author: paul; state: Exp; lines: +0 -0 XX b-maked patch-2.10 XX ---------------------------- I don't know how to find the old history using svn. svn log doesn't show removed files. It is hard to find where the files were unless you already know the history. svn log on stable/5/gnu/usr.bin/patch/patch.c only shows history on the branch. Bruce From owner-svn-src-all@freebsd.org Fri Mar 15 12:12:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E266215481E0; Fri, 15 Mar 2019 12:12:39 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83F0495520; Fri, 15 Mar 2019 12:12:39 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from [192.168.200.4] (c-71-56-186-158.hsd1.va.comcast.net [71.56.186.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: gallatin) by duke.cs.duke.edu (Postfix) with ESMTPSA id 048972700222; Fri, 15 Mar 2019 08:12:32 -0400 (EDT) DMARC-Filter: OpenDMARC Filter v1.3.1 duke.cs.duke.edu 048972700222 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail0816; t=1552651953; bh=n+ER/LidwPCai4wAZXPt5ec08coLjefIEJEhEuqkk+8=; h=Subject:To:From:Date:From; b=fgn27ctlIUZYfA9yEV3fT5IzhgYhQS2Px0pboVpyXl8vP/wN3HsV/QS8sle9hjaN3 M7Csm+BHgKZqty45ZAX4sGDPXG+hfrJagTpBONUHDRIhbz3vshVJkmLq/DxA4kPizI IMP9OYNq4QlocGqtMsX6tw+aBiFTUDRfd+8wah/6qNFtUwAyddFuCTQfu0Oxxkew1L ffGw0bYYD96vI876ajARvmjR4Iz+5V6SNpfnDA5fvf4fQGBq0l6mH8r+/B4abS3uxi wVJ7C4ml36RE4eaEh/oLd2A2YfYNmnmWzlSuUyRTaYfcFiidbHKrDf6lMwac9nJBBt tbxR9UFffr3AA== Subject: Re: svn commit: r345138 - head/share/man/man9 To: rgrimes@freebsd.org, Ed Maste Cc: src-committers , svn-src-all , svn-src-head References: <201903150336.x2F3a1ZN028366@gndrsh.dnsmgr.net> From: Andrew Gallatin Message-ID: Date: Fri, 15 Mar 2019 08:12:32 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.5.2 MIME-Version: 1.0 In-Reply-To: <201903150336.x2F3a1ZN028366@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 83F0495520 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.937,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 12:12:40 -0000 On 3/14/19 11:36 PM, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] >> On Thu, 14 Mar 2019 at 22:39, Rodney W. Grimes >> wrote: >>> >>> 4. There is no easy way to show >>> "changed byte at offset 0x432 from 0xef to 0xfe" > > How do we represent Copyright and License in such objects? > This is an issue that is totally left out of even .uu version. > This is an excellent point. What I used to do for mxge firmware when I worked at Myricom was to have a shell script that created a source file with the uuencoded bits as a static array. That way, it had copyright info in the file itself. Drew From owner-svn-src-all@freebsd.org Fri Mar 15 13:19:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B69F1549324; Fri, 15 Mar 2019 13:19:53 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EF0BA96EAB; Fri, 15 Mar 2019 13:19:52 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DBCB7A91A; Fri, 15 Mar 2019 13:19:52 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FDJqgV028408; Fri, 15 Mar 2019 13:19:52 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FDJqdc028407; Fri, 15 Mar 2019 13:19:52 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201903151319.x2FDJqdc028407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 15 Mar 2019 13:19:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345180 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 345180 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EF0BA96EAB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 13:19:53 -0000 Author: kevans Date: Fri Mar 15 13:19:52 2019 New Revision: 345180 URL: https://svnweb.freebsd.org/changeset/base/345180 Log: if_bridge(4): Fix module teardown bridge_rtnode_zone still has outstanding allocations at the time of destruction in the current model because all of the interface teardown happens in a VNET_SYSUNINIT, -after- the MOD_UNLOAD has already been processed. The SYSUNINIT triggers destruction of the interfaces, which then attempts to free the memory from the zone that's already been destroyed, and we hit a panic. Solve this by virtualizing the uma_zone we allocate the rtnodes from to fix the ordering. bridge_rtable_fini should also take care to flush any remaining routes that weren't taken care of when dynamic routes were flushed in bridge_stop. Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D19578 Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Fri Mar 15 11:49:46 2019 (r345179) +++ head/sys/net/if_bridge.c Fri Mar 15 13:19:52 2019 (r345180) @@ -235,7 +235,8 @@ static eventhandler_tag bridge_detach_cookie; int bridge_rtable_prune_period = BRIDGE_RTABLE_PRUNE_PERIOD; -uma_zone_t bridge_rtnode_zone; +VNET_DEFINE_STATIC(uma_zone_t, bridge_rtnode_zone); +#define V_bridge_rtnode_zone VNET(bridge_rtnode_zone) static int bridge_clone_create(struct if_clone *, int, caddr_t); static void bridge_clone_destroy(struct ifnet *); @@ -527,6 +528,9 @@ static void vnet_bridge_init(const void *unused __unused) { + V_bridge_rtnode_zone = uma_zcreate("bridge_rtnode", + sizeof(struct bridge_rtnode), NULL, NULL, NULL, NULL, + UMA_ALIGN_PTR, 0); BRIDGE_LIST_LOCK_INIT(); LIST_INIT(&V_bridge_list); V_bridge_cloner = if_clone_simple(bridge_name, @@ -542,6 +546,7 @@ vnet_bridge_uninit(const void *unused __unused) if_clone_detach(V_bridge_cloner); V_bridge_cloner = NULL; BRIDGE_LIST_LOCK_DESTROY(); + uma_zdestroy(V_bridge_rtnode_zone); } VNET_SYSUNINIT(vnet_bridge_uninit, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_bridge_uninit, NULL); @@ -552,9 +557,6 @@ bridge_modevent(module_t mod, int type, void *data) switch (type) { case MOD_LOAD: - bridge_rtnode_zone = uma_zcreate("bridge_rtnode", - sizeof(struct bridge_rtnode), NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, 0); bridge_dn_p = bridge_dummynet; bridge_detach_cookie = EVENTHANDLER_REGISTER( ifnet_departure_event, bridge_ifdetach, NULL, @@ -563,7 +565,6 @@ bridge_modevent(module_t mod, int type, void *data) case MOD_UNLOAD: EVENTHANDLER_DEREGISTER(ifnet_departure_event, bridge_detach_cookie); - uma_zdestroy(bridge_rtnode_zone); bridge_dn_p = NULL; break; default: @@ -730,6 +731,9 @@ bridge_clone_destroy(struct ifnet *ifp) bridge_delete_span(sc, bif); } + /* Tear down the routing table. */ + bridge_rtable_fini(sc); + BRIDGE_UNLOCK(sc); callout_drain(&sc->sc_brcallout); @@ -742,9 +746,6 @@ bridge_clone_destroy(struct ifnet *ifp) ether_ifdetach(ifp); if_free(ifp); - /* Tear down the routing table. */ - bridge_rtable_fini(sc); - BRIDGE_LOCK_DESTROY(sc); free(sc, M_DEVBUF); } @@ -2669,7 +2670,7 @@ bridge_rtupdate(struct bridge_softc *sc, const uint8_t * initialize the expiration time and Ethernet * address. */ - brt = uma_zalloc(bridge_rtnode_zone, M_NOWAIT | M_ZERO); + brt = uma_zalloc(V_bridge_rtnode_zone, M_NOWAIT | M_ZERO); if (brt == NULL) return (ENOMEM); @@ -2682,7 +2683,7 @@ bridge_rtupdate(struct bridge_softc *sc, const uint8_t brt->brt_vlan = vlan; if ((error = bridge_rtnode_insert(sc, brt)) != 0) { - uma_zfree(bridge_rtnode_zone, brt); + uma_zfree(V_bridge_rtnode_zone, brt); return (error); } brt->brt_dst = bif; @@ -2766,11 +2767,14 @@ bridge_timer(void *arg) BRIDGE_LOCK_ASSERT(sc); + /* Destruction of rtnodes requires a proper vnet context */ + CURVNET_SET(sc->sc_ifp->if_vnet); bridge_rtage(sc); if (sc->sc_ifp->if_drv_flags & IFF_DRV_RUNNING) callout_reset(&sc->sc_brcallout, bridge_rtable_prune_period * hz, bridge_timer, sc); + CURVNET_RESTORE(); } /* @@ -2886,6 +2890,7 @@ bridge_rtable_fini(struct bridge_softc *sc) KASSERT(sc->sc_brtcnt == 0, ("%s: %d bridge routes referenced", __func__, sc->sc_brtcnt)); + bridge_rtflush(sc, 1); free(sc->sc_rthash, M_DEVBUF); } @@ -3028,7 +3033,7 @@ bridge_rtnode_destroy(struct bridge_softc *sc, struct LIST_REMOVE(brt, brt_list); sc->sc_brtcnt--; brt->brt_dst->bif_addrcnt--; - uma_zfree(bridge_rtnode_zone, brt); + uma_zfree(V_bridge_rtnode_zone, brt); } /* From owner-svn-src-all@freebsd.org Fri Mar 15 13:33:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32FA2154988E; Fri, 15 Mar 2019 13:33:44 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id BC8AF978BB; Fri, 15 Mar 2019 13:33:43 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (v-critter.freebsd.dk [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id 457D6202562A; Fri, 15 Mar 2019 13:33:42 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id x2FDXfOc093865 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 15 Mar 2019 13:33:42 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id x2FDXdom093864; Fri, 15 Mar 2019 13:33:39 GMT (envelope-from phk) To: Andrew Gallatin cc: rgrimes@freebsd.org, Ed Maste , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r345138 - head/share/man/man9 In-reply-to: From: "Poul-Henning Kamp" References: <201903150336.x2F3a1ZN028366@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <93862.1552656819.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Fri, 15 Mar 2019 13:33:39 +0000 Message-ID: <93863.1552656819@critter.freebsd.dk> X-Rspamd-Queue-Id: BC8AF978BB X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.965,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 13:33:44 -0000 -------- In message , Andrew Gall= atin = writes: >On 3/14/19 11:36 PM, Rodney W. Grimes wrote: >> [ Charset UTF-8 unsupported, converting... ] >>> On Thu, 14 Mar 2019 at 22:39, Rodney W. Grimes >>> wrote: >>>> >>>> 4. There is no easy way to show >>>> "changed byte at offset 0x432 from 0xef to 0xfe" >> = >> How do we represent Copyright and License in such objects? >> This is an issue that is totally left out of even .uu version. I am pretty sure that some of the .uu files had copyrights in them at various points, but yes, good point. -- = Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe = Never attribute to malice what can adequately be explained by incompetence= . From owner-svn-src-all@freebsd.org Fri Mar 15 14:12:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38557154A144 for ; Fri, 15 Mar 2019 14:12:04 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEEBB69E64 for ; Fri, 15 Mar 2019 14:12:03 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1552658152; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=VM2Hrpb7IjQvcNl2cWMv7R/Bfz6aMFfJBa5mIqKgtiltT2En8etrFO4xv0lAY9KO9aVTGpyq7BMFs KcJMBhdVRAqXxt2CReXwxjKawxh5AkRSWLAgN5rWWmRFY9Vw6VZVoK7iMlfZyiwnjXyZ/5Xcjj7aqH 2R3iUiGB9JEXZVtDZR/FuXxWOya1ISHrRL+JSsD0JyBjBkbuDA5nGiIPYFhCJ9ybDIpLx6cBum5o7Z jDPxLbepyk6zxzTm205dS7uw2UEzKFpxH8SsDmaUYNZZxdhrG5mA0BArPLfHbK1hNIR8AZYnPzzt3Q /bh5hVm5XH4svRjvmsZDVAaFCZ55xKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=8x3q5AW+I/OljRBAtZ8Oq0lAoX8pRw82f0wL37+232Y=; b=T3AnmwGb1kM3NgRhQZcPju++TyFLB4zy3OD7cFROqSLxaBH0j2742Px8pxwlP+pFYhEFLN5kqLMet GsW14Dia4iio3L/bAAan1VjkDB4QIIM7AzHB0xDjr7itCsMxSrGD4fLvByzUwMRC/OTQR9PBmj6HTW YaZTxFcc0QfvfiBfAiiYm5BR0G/UU27+aFLb6YQk1hkYNCOgLWy2fY872t76qZBuUDJT7toLHapSvG cswepn4jizI+hfLMJJqsLRrlqZpUXgdstTAJNuAhkX8KzPfYOsgXoKStCwDf/ObpCgcCmgKswpno8B o4j8Ejb807PoL9ibxLvp2Sl6NGD+d1A== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=8x3q5AW+I/OljRBAtZ8Oq0lAoX8pRw82f0wL37+232Y=; b=tGzYy+CWqJJpSGsJ2RWvI91pv56JsJZWq8ccUBJ2zAlbpleJrAk1RKA+mkI3TybUXJSpZQtn+7pNu anf5AhQFEQuBiKLp9eqXQxN0UzskJnfhJwXPWgRWpZGT0T0Bg652hQhs9P231zDrCdInAwnU+HMPOy CLTjUNFiTdiJzHfZmISJXw8impVwDt4c5Qs1qpQJDwcqSQktDfnlkjrKSAIaR7nu8PElqCWHXiB5sU 263zpIWqm74lW+IypP5ywAVvVZJLAtlh6/8noK64TWmaq0XA85iuue3DHiujDSn6Dp0XLmO2h5IRKd QtbcjihO4oAAzQWZJoTlg38oZghaRvQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: 0a2dffe1-472a-11e9-befd-af03bedce89f X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 0a2dffe1-472a-11e9-befd-af03bedce89f; Fri, 15 Mar 2019 13:55:51 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x2FDtnaS054649; Fri, 15 Mar 2019 07:55:49 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <7e312cdad08139c567cd43207191c97303831e9d.camel@freebsd.org> Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve From: Ian Lepore To: rgrimes@freebsd.org, Chuck Tuffli Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 15 Mar 2019 07:55:49 -0600 In-Reply-To: <201903150231.x2F2VnR6027995@gndrsh.dnsmgr.net> References: <201903150231.x2F2VnR6027995@gndrsh.dnsmgr.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: AEEBB69E64 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.993,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 14:12:04 -0000 On Thu, 2019-03-14 at 19:31 -0700, Rodney W. Grimes wrote: > > Author: chuck > > Date: Fri Mar 15 02:11:28 2019 > > New Revision: 345171 > > URL: https://svnweb.freebsd.org/changeset/base/345171 > > > > Log: > > Fix bhyve PCIe capability emulation > > > > PCIe devices starting with version 1.1 must set the Role-Based > > Error > > Reporting bit. > > > > And while we're in the neighborhood, generalize the code > > assigning the > > device type. > > > > Reviewed by: imp, araujo, rgrimes > > Approved by: imp (mentor) > > MFC after: 1 week > > Differential Revision: https://reviews.freebsd.org/D19580 > > This code requires maintainer approval before a commit, > though this was well reviewed that doesnt exclude it > from the MAINTAINERS entry. > Where exactly does it say that in MAINTAINERS? As another victim of this sort of drive-by lynching after making a trivial bhyve change I pretty seriously object to a vague and meaningless entry in MAINTAINERS being used to pounce on anyone who dares to touch the precious bhyve code. There is no mention of bhyve in MAINTAINERS, for usr.sbin or elsewhere. There is an entry for vmm(4), which to me does not say anything about bhyve, yet somehow everybody is supposed to know what it means and what-all territory it covers? IMO, this sort of hyper-proprietary pouncing on everyone who dares change a single line of code is not productive. It is HIGHLY de- motivating. Large sweeping design changes are one thing, but pouncing on every tiny minor commit is just not helpful. -- Ian > Leave it for now, I am sure jhb or thyco are fine with it, > this is just a heads up FYI for future commits. > > Bhyve code has been and still is under a fairly tight > MAINTAINER status. > > > Modified: > > head/usr.sbin/bhyve/pci_emul.c > > > > Modified: head/usr.sbin/bhyve/pci_emul.c > > =================================================================== > > =========== > > --- head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:27 2019 (r3 > > 45170) > > +++ head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:28 2019 (r3 > > 45171) > > @@ -953,7 +953,10 @@ pci_emul_add_pciecap(struct pci_devinst *pi, > > int type) > > bzero(&pciecap, sizeof(pciecap)); > > > > pciecap.capid = PCIY_EXPRESS; > > - pciecap.pcie_capabilities = PCIECAP_VERSION | > > PCIEM_TYPE_ROOT_PORT; > > + pciecap.pcie_capabilities = PCIECAP_VERSION | type; > > + /* Devices starting with version 1.1 must set the RBER bit */ > > + if (PCIECAP_VERSION >= 1) > > + pciecap.dev_capabilities = PCIEM_CAP_ROLE_ERR_RPT; > > pciecap.link_capabilities = 0x411; /* gen1, x1 */ > > pciecap.link_status = 0x11; /* gen1, x1 */ > > > > > > > > From owner-svn-src-all@freebsd.org Fri Mar 15 14:16:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23DA8154A249; Fri, 15 Mar 2019 14:16:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA42C6A170; Fri, 15 Mar 2019 14:16:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B6A81B355; Fri, 15 Mar 2019 14:16:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FEGJVY059913; Fri, 15 Mar 2019 14:16:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FEGGsF059896; Fri, 15 Mar 2019 14:16:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903151416.x2FEGGsF059896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 15 Mar 2019 14:16:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345181 - in stable/12: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys X-SVN-Commit-Revision: 345181 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CA42C6A170 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 14:16:20 -0000 Author: kib Date: Fri Mar 15 14:16:16 2019 New Revision: 345181 URL: https://svnweb.freebsd.org/changeset/base/345181 Log: MFC r341689, r341711, r341712, r341809: Add getfhat(2), fhlink(2), fhlinkat(2), fhreadlink(2) file handle system calls. To easier potential MFC of the AT_BENEATH feature, some vestiges of it were left in the merged product but commented out. Due to a lot of conflicts, it was impossible to split the merge and regeneration of the syscall tables, because I needed to test the result. It is fine for stable branch to commit the whole change with the generated diff. Added: stable/12/lib/libc/sys/fhlink.2 - copied unchanged from r341689, head/lib/libc/sys/fhlink.2 stable/12/lib/libc/sys/fhreadlink.2 - copied unchanged from r341689, head/lib/libc/sys/fhreadlink.2 Modified: stable/12/lib/libc/sys/Makefile.inc stable/12/lib/libc/sys/Symbol.map stable/12/lib/libc/sys/getfh.2 stable/12/sys/compat/freebsd32/freebsd32_syscall.h stable/12/sys/compat/freebsd32/freebsd32_syscalls.c stable/12/sys/compat/freebsd32/freebsd32_sysent.c stable/12/sys/compat/freebsd32/freebsd32_systrace_args.c stable/12/sys/compat/freebsd32/syscalls.master stable/12/sys/kern/init_sysent.c stable/12/sys/kern/syscalls.c stable/12/sys/kern/syscalls.master stable/12/sys/kern/systrace_args.c stable/12/sys/kern/vfs_syscalls.c stable/12/sys/sys/mount.h stable/12/sys/sys/syscall.h stable/12/sys/sys/syscall.mk stable/12/sys/sys/sysproto.h Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/Makefile.inc ============================================================================== --- stable/12/lib/libc/sys/Makefile.inc Fri Mar 15 13:19:52 2019 (r345180) +++ stable/12/lib/libc/sys/Makefile.inc Fri Mar 15 14:16:16 2019 (r345181) @@ -184,7 +184,9 @@ MAN+= abort2.2 \ extattr_get_file.2 \ fcntl.2 \ ffclock.2 \ + fhlink.2 \ fhopen.2 \ + fhreadlink.2 \ flock.2 \ fork.2 \ fsync.2 \ @@ -395,7 +397,8 @@ MLINKS+=ffclock.2 ffclock_getcounter.2 \ MLINKS+=fhopen.2 fhstat.2 fhopen.2 fhstatfs.2 MLINKS+=fsync.2 fdatasync.2 MLINKS+=getdirentries.2 getdents.2 -MLINKS+=getfh.2 lgetfh.2 +MLINKS+=getfh.2 lgetfh.2 \ + getfh.2 getfhat.2 MLINKS+=getgid.2 getegid.2 MLINKS+=getitimer.2 setitimer.2 MLINKS+=getlogin.2 getlogin_r.3 Modified: stable/12/lib/libc/sys/Symbol.map ============================================================================== --- stable/12/lib/libc/sys/Symbol.map Fri Mar 15 13:19:52 2019 (r345180) +++ stable/12/lib/libc/sys/Symbol.map Fri Mar 15 14:16:16 2019 (r345181) @@ -401,6 +401,13 @@ FBSD_1.5 { cpuset_setdomain; }; +FBSD_1.6 { + fhlink; + fhlinkat; + fhreadlink; + getfhat; +}; + FBSDprivate_1.0 { ___acl_aclcheck_fd; __sys___acl_aclcheck_fd; Copied: stable/12/lib/libc/sys/fhlink.2 (from r341689, head/lib/libc/sys/fhlink.2) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/lib/libc/sys/fhlink.2 Fri Mar 15 14:16:16 2019 (r345181, copy of r341689, head/lib/libc/sys/fhlink.2) @@ -0,0 +1,268 @@ +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2018 Gandi +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd November 29, 2018 +.Dt FHLINK 2 +.Os +.Sh NAME +.Nm fhlink , +.Nm fhlinkat +.Nd make a hard file link +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In unistd.h +.Ft int +.Fn fhlink "fhandle_t *fhp" "const char *to" +.Ft int +.Fn fhlinkat "fhandle_t *fhp" "int tofd" "const char *to" +.Fc +.Sh DESCRIPTION +The +.Fn fhlink +system call +atomically creates the specified directory entry (hard link) +.Fa to +with the attributes of the underlying object pointed at by +.Fa fhp . +If the link is successful: the link count of the underlying object +is incremented; +.Fa fhp +and +.Fa to +share equal access and rights +to the +underlying object. +.Pp +If +.Fa fhp +is removed, the file +.Fa to +is not deleted and the link count of the +underlying object is +decremented. +.Pp +The object pointed at by the +.Fa fhp +argument +must exist for the hard link to +succeed and +both +.Fa fhp +and +.Fa to +must be in the same file system. +The +.Fa fhp +argument +may not be a directory. +.Pp +The +.Fn fhlinkat +system call is equivalent to +.Fa fhlink +except in the case where +.Fa to +is a relative paths. +In this case a relative path +.Fa to +is interpreted relative to +the directory associated with the file descriptor +.Fa tofd +instead of the current working directory. +.Pp +Values for +.Fa flag +are constructed by a bitwise-inclusive OR of flags from the following +list, defined in +.In fcntl.h : +.Bl -tag -width indent +.It Dv AT_SYMLINK_FOLLOW +If +.Fa fhp +names a symbolic link, a new link for the target of the symbolic link is +created. +.It Dv AT_BENEATH +Only allow to link to a file which is beneath of the topping directory. +See the description of the +.Dv O_BENEATH +flag in the +.Xr open 2 +manual page. +.El +.Pp +If +.Fn fhlinkat +is passed the special value +.Dv AT_FDCWD +in the +.Fa tofd +parameter, the current working directory is used for the +.Fa to +argument. +If +.Fa tofd +has value +.Dv AT_FDCWD , +the behavior is identical to a call to +.Fn link . +Unless +.Fa flag +contains the +.Dv AT_SYMLINK_FOLLOW +flag, if +.Fa fhp +names a symbolic link, a new link is created for the symbolic link +.Fa fhp +and not its target. +.Sh RETURN VALUES +.Rv -std link +.Sh ERRORS +The +.Fn fhlink +system call +will fail and no link will be created if: +.Bl -tag -width Er +.It Bq Er ENOTDIR +A component of +.Fa to +prefix is not a directory. +.It Bq Er ENAMETOOLONG +A component of +.Fa to +exceeded 255 characters, +or entire length of +.Fa to +name exceeded 1023 characters. +.It Bq Er ENOENT +A component of +.Fa to +prefix does not exist. +.It Bq Er EOPNOTSUPP +The file system containing the file pointed at by +.Fa fhp +does not support links. +.It Bq Er EMLINK +The link count of the file pointed at by +.Fa fhp +would exceed 32767. +.It Bq Er EACCES +A component of +.Fa to +prefix denies search permission. +.It Bq Er EACCES +The requested link requires writing in a directory with a mode +that denies write permission. +.It Bq Er ELOOP +Too many symbolic links were encountered in translating one of the pathnames. +.It Bq Er ENOENT +The file pointed at by +.Fa fhp +does not exist. +.It Bq Er EEXIST +The link named by +.Fa to +does exist. +.It Bq Er EPERM +The file pointed at by +.Fa fhp +is a directory. +.It Bq Er EPERM +The file pointed at by +.Fa fhp +has its immutable or append-only flag set, see the +.Xr chflags 2 +manual page for more information. +.It Bq Er EPERM +The parent directory of the file named by +.Fa to +has its immutable flag set. +.It Bq Er EXDEV +The link named by +.Fa to +and the file pointed at by +.Fa fhp +are on different file systems. +.It Bq Er ENOSPC +The directory in which the entry for the new link is being placed +cannot be extended because there is no space left on the file +system containing the directory. +.It Bq Er EDQUOT +The directory in which the entry for the new link +is being placed cannot be extended because the +user's quota of disk blocks on the file system +containing the directory has been exhausted. +.It Bq Er EIO +An I/O error occurred while reading from or writing to +the file system to make the directory entry. +.It Bq Er EROFS +The requested link requires writing in a directory on a read-only file +system. +.It Bq Er EFAULT +One of the pathnames specified +is outside the process's allocated address space. +.It Bq Er ESTALE +The file handle +.Fa fhp +is no longer valid +.El +.Pp +In addition to the errors returned by the +.Fn fhlink , +the +.Fn fhlinkat +system call may fail if: +.Bl -tag -width Er +.It Bq Er EBADF +The +.Fa fhp +or +.Fa to +argument does not specify an absolute path and the +.Fa tofd +argument, is not +.Dv AT_FDCWD +nor a valid file descriptor open for searching. +.It Bq Er EINVAL +The value of the +.Fa flag +argument is not valid. +.It Bq Er ENOTDIR +The +.Fa fhp +or +.Fa to +argument is not an absolute path and +.Fa tofd +is not +.Dv AT_FDCWD +nor a file descriptor associated with a directory. +.El +.Sh SEE ALSO +.Xr fhstat 2 , +.Xr fhreadlink 2 , +.Xr fhopen 2 , Copied: stable/12/lib/libc/sys/fhreadlink.2 (from r341689, head/lib/libc/sys/fhreadlink.2) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/lib/libc/sys/fhreadlink.2 Fri Mar 15 14:16:16 2019 (r345181, copy of r341689, head/lib/libc/sys/fhreadlink.2) @@ -0,0 +1,92 @@ +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2018 Gandi +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd November 29, 2018 +.Dt FHREADLINK 2 +.Os +.Sh NAME +.Nm fhreadlink +.Nd read value of a symbolic link +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/param.h +.In sys/mount.h +.Ft int +.Fn fhreadlink "fhandle_t *fhp" "char *buf" "size_t bufsize" +.Fc +.Sh DESCRIPTION +The +.Fn fhreadlink +system call +places the contents of the symbolic link +.Fa fhp +in the buffer +.Fa buf , +which has size +.Fa bufsiz . +The +.Fn fhreadlink +system call does not append a +.Dv NUL +character to +.Fa buf . +.Pp +.Sh RETURN VALUES +The call returns the count of characters placed in the buffer +if it succeeds, or a \-1 if an error occurs, placing the error +code in the global variable +.Va errno . +.Sh ERRORS +The +.Fn readlink +system call +will fail if: +.Bl -tag -width Er +.It Bq Er ENOENT +The named file does not exist. +.It Bq Er ELOOP +Too many symbolic links were encountered in translating the file handle +.Fa fhp . +.It Bq Er EINVAL +The named file is not a symbolic link. +.It Bq Er EIO +An I/O error occurred while reading from the file system. +.It Bq Er EFAULT +The +.Fa buf +argument +extends outside the process's allocated address space. +.It Bq Er ESTALE +The file handle +.Fa fhp +is no longer valid +.El +.El +.Sh SEE ALSO +.Xr fhstat 2 , +.Xr fhlink 2 , Modified: stable/12/lib/libc/sys/getfh.2 ============================================================================== --- stable/12/lib/libc/sys/getfh.2 Fri Mar 15 13:19:52 2019 (r345180) +++ stable/12/lib/libc/sys/getfh.2 Fri Mar 15 14:16:16 2019 (r345181) @@ -1,5 +1,6 @@ .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. +.\" Copyright (c) 2018 Gandi .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -28,12 +29,13 @@ .\" @(#)getfh.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd April 14, 2011 +.Dd December 11, 2018 .Dt GETFH 2 .Os .Sh NAME .Nm getfh , -.Nm lgetfh +.Nm lgetfh , +.Nm getfhat .Nd get file handle .Sh LIBRARY .Lb libc @@ -44,6 +46,8 @@ .Fn getfh "const char *path" "fhandle_t *fhp" .Ft int .Fn lgetfh "const char *path" "fhandle_t *fhp" +.Ft int +.Fn getfhat "int fd" "const char *path" "fhandle_t *fhp" "int flag" .Sh DESCRIPTION The .Fn getfh @@ -51,6 +55,7 @@ system call returns a file handle for the specified file or directory in the file handle pointed to by .Fa fhp . +.Pp The .Fn lgetfh system call is like @@ -62,6 +67,85 @@ returns information about the link, while .Fn getfh returns information about the file the link references. +.Pp +The +.Fn getfhat +system call is equivalent to +.Fn getfh +and +.Fn lgetfh +except when the +.Fa path +specifies a relative path, or the +.Dv AT_BENEATH +flag is provided. +For +.Fn getfhat +and relative +.Fa path , +the status is retrieved from a file relative to +the directory associated with the file descriptor +.Fa fd +instead of the current working directory. +For +.Dv AT_BENEATH +and absolute +.Fa path , +the status is retrieved from a file specified by the +.Fa path , +but additional permission checks are performed, see below. +.Pp +The values for the +.Fa flag +are constructed by a bitwise-inclusive OR of flags from this list, +defined in +.In fcntl.h : +.Bl -tag -width indent +.It Dv AT_SYMLINK_NOFOLLOW +If +.Fa path +names a symbolic link, the status of the symbolic link is returned. +.It Dv AT_BENEATH +Only stat files and directories below the topping directory. +See the description of the +.Dv O_BENEATH +flag in the +.Xr open 2 +manual page. +.El +.Pp +If +.Fn getfhat +is passed the special value +.Dv AT_FDCWD +in the +.Fa fd +parameter, the current working directory is used and the behavior is +identical to a call to +.Fn getfth +or +.Fn lgetfh +respectively, depending on whether or not the +.Dv AT_SYMLINK_NOFOLLOW +bit is set in +.Fa flag . +.Pp +When +.Fn getfhat +is called with an absolute +.Fa path +without the +.Dv AT_BENEATH +flag, it ignores the +.Fa fd +argument. +When +.Dv AT_BENEATH +is specified with an absolute +.Fa path , +a directory passed by the +.Fa fd +argument is used as the topping point for the resolution. These system calls are restricted to the superuser. .Sh RETURN VALUES .Rv -std @@ -99,11 +183,49 @@ The .Fa fhp argument points to an invalid address. +.It Bq Er EFAULT +The +.Fa path +argument +points to an invalid address. .It Bq Er EIO An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er ESTALE +The file handle +.Fa fhp +is no longer valid. .El +.Pp +In addition to the errors returned by +.Fn getfh , +and +.Fn lgetfh , +the +.Fn getfhat +system call may fail if: +.Bl -tag -width Er +.It Bq Er EBADF +The +.Fa path +argument does not specify an absolute path and the +.Fa fd +argument, is neither +.Dv AT_FDCWD +nor a valid file descriptor open for searching. +.It Bq Er EINVAL +The value of the +.Fa flag +argument is not valid. +.It Bq Er ENOTDIR +The +.Fa path +argument is not an absolute path and +.Fa fd +is neither +.Dv AT_FDCWD +nor a file descriptor associated with a directory. .Sh SEE ALSO .Xr fhopen 2 , .Xr open 2 , Modified: stable/12/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/12/sys/compat/freebsd32/freebsd32_syscall.h Fri Mar 15 13:19:52 2019 (r345180) +++ stable/12/sys/compat/freebsd32/freebsd32_syscall.h Fri Mar 15 14:16:16 2019 (r345181) @@ -490,4 +490,8 @@ #define FREEBSD32_SYS_freebsd32_cpuset_getdomain 561 #define FREEBSD32_SYS_freebsd32_cpuset_setdomain 562 #define FREEBSD32_SYS_getrandom 563 -#define FREEBSD32_SYS_MAXSYSCALL 564 +#define FREEBSD32_SYS_getfhat 564 +#define FREEBSD32_SYS_fhlink 565 +#define FREEBSD32_SYS_fhlinkat 566 +#define FREEBSD32_SYS_fhreadlink 567 +#define FREEBSD32_SYS_MAXSYSCALL 568 Modified: stable/12/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/12/sys/compat/freebsd32/freebsd32_syscalls.c Fri Mar 15 13:19:52 2019 (r345180) +++ stable/12/sys/compat/freebsd32/freebsd32_syscalls.c Fri Mar 15 14:16:16 2019 (r345181) @@ -600,4 +600,8 @@ const char *freebsd32_syscallnames[] = { "freebsd32_cpuset_getdomain", /* 561 = freebsd32_cpuset_getdomain */ "freebsd32_cpuset_setdomain", /* 562 = freebsd32_cpuset_setdomain */ "getrandom", /* 563 = getrandom */ + "getfhat", /* 564 = getfhat */ + "fhlink", /* 565 = fhlink */ + "fhlinkat", /* 566 = fhlinkat */ + "fhreadlink", /* 567 = fhreadlink */ }; Modified: stable/12/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/12/sys/compat/freebsd32/freebsd32_sysent.c Fri Mar 15 13:19:52 2019 (r345180) +++ stable/12/sys/compat/freebsd32/freebsd32_sysent.c Fri Mar 15 14:16:16 2019 (r345181) @@ -647,4 +647,8 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_cpuset_getdomain_args), (sy_call_t *)freebsd32_cpuset_getdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 561 = freebsd32_cpuset_getdomain */ { AS(freebsd32_cpuset_setdomain_args), (sy_call_t *)freebsd32_cpuset_setdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 562 = freebsd32_cpuset_setdomain */ { AS(getrandom_args), (sy_call_t *)sys_getrandom, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 563 = getrandom */ + { AS(getfhat_args), (sy_call_t *)sys_getfhat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 564 = getfhat */ + { AS(fhlink_args), (sy_call_t *)sys_fhlink, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 565 = fhlink */ + { AS(fhlinkat_args), (sy_call_t *)sys_fhlinkat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 566 = fhlinkat */ + { AS(fhreadlink_args), (sy_call_t *)sys_fhreadlink, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 567 = fhreadlink */ }; Modified: stable/12/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- stable/12/sys/compat/freebsd32/freebsd32_systrace_args.c Fri Mar 15 13:19:52 2019 (r345180) +++ stable/12/sys/compat/freebsd32/freebsd32_systrace_args.c Fri Mar 15 14:16:16 2019 (r345181) @@ -3274,6 +3274,42 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 3; break; } + /* getfhat */ + case 564: { + struct getfhat_args *p = params; + iarg[0] = p->fd; /* int */ + uarg[1] = (intptr_t) p->path; /* char * */ + uarg[2] = (intptr_t) p->fhp; /* struct fhandle * */ + iarg[3] = p->flags; /* int */ + *n_args = 4; + break; + } + /* fhlink */ + case 565: { + struct fhlink_args *p = params; + uarg[0] = (intptr_t) p->fhp; /* struct fhandle * */ + uarg[1] = (intptr_t) p->to; /* const char * */ + *n_args = 2; + break; + } + /* fhlinkat */ + case 566: { + struct fhlinkat_args *p = params; + uarg[0] = (intptr_t) p->fhp; /* struct fhandle * */ + iarg[1] = p->tofd; /* int */ + uarg[2] = (intptr_t) p->to; /* const char * */ + *n_args = 3; + break; + } + /* fhreadlink */ + case 567: { + struct fhreadlink_args *p = params; + uarg[0] = (intptr_t) p->fhp; /* struct fhandle * */ + uarg[1] = (intptr_t) p->buf; /* char * */ + uarg[2] = p->bufsize; /* size_t */ + *n_args = 3; + break; + } default: *n_args = 0; break; @@ -8805,6 +8841,70 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; + /* getfhat */ + case 564: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "userland char *"; + break; + case 2: + p = "userland struct fhandle *"; + break; + case 3: + p = "int"; + break; + default: + break; + }; + break; + /* fhlink */ + case 565: + switch(ndx) { + case 0: + p = "userland struct fhandle *"; + break; + case 1: + p = "userland const char *"; + break; + default: + break; + }; + break; + /* fhlinkat */ + case 566: + switch(ndx) { + case 0: + p = "userland struct fhandle *"; + break; + case 1: + p = "int"; + break; + case 2: + p = "userland const char *"; + break; + default: + break; + }; + break; + /* fhreadlink */ + case 567: + switch(ndx) { + case 0: + p = "userland struct fhandle *"; + break; + case 1: + p = "userland char *"; + break; + case 2: + p = "size_t"; + break; + default: + break; + }; + break; default: break; }; @@ -10651,6 +10751,26 @@ systrace_return_setargdesc(int sysnum, int ndx, char * break; /* getrandom */ case 563: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* getfhat */ + case 564: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* fhlink */ + case 565: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* fhlinkat */ + case 566: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* fhreadlink */ + case 567: if (ndx == 0 || ndx == 1) p = "int"; break; Modified: stable/12/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/12/sys/compat/freebsd32/syscalls.master Fri Mar 15 13:19:52 2019 (r345180) +++ stable/12/sys/compat/freebsd32/syscalls.master Fri Mar 15 14:16:16 2019 (r345181) @@ -1120,5 +1120,12 @@ int policy); } 563 AUE_NULL NOPROTO { int getrandom(void *buf, size_t buflen, \ unsigned int flags); } +564 AUE_NULL NOPROTO { int getfhat( int fd, char *path, \ + struct fhandle *fhp, int flags); } +565 AUE_NULL NOPROTO { int fhlink( struct fhandle *fhp, const char *to ); } +566 AUE_NULL NOPROTO { int fhlinkat( struct fhandle *fhp, int tofd, \ + const char *to); } +567 AUE_NULL NOPROTO { int fhreadlink( struct fhandle *fhp, char *buf, \ + size_t bufsize); } ; vim: syntax=off Modified: stable/12/sys/kern/init_sysent.c ============================================================================== --- stable/12/sys/kern/init_sysent.c Fri Mar 15 13:19:52 2019 (r345180) +++ stable/12/sys/kern/init_sysent.c Fri Mar 15 14:16:16 2019 (r345181) @@ -613,4 +613,8 @@ struct sysent sysent[] = { { AS(cpuset_getdomain_args), (sy_call_t *)sys_cpuset_getdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 561 = cpuset_getdomain */ { AS(cpuset_setdomain_args), (sy_call_t *)sys_cpuset_setdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 562 = cpuset_setdomain */ { AS(getrandom_args), (sy_call_t *)sys_getrandom, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 563 = getrandom */ + { AS(getfhat_args), (sy_call_t *)sys_getfhat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 564 = getfhat */ + { AS(fhlink_args), (sy_call_t *)sys_fhlink, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 565 = fhlink */ + { AS(fhlinkat_args), (sy_call_t *)sys_fhlinkat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 566 = fhlinkat */ + { AS(fhreadlink_args), (sy_call_t *)sys_fhreadlink, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 567 = fhreadlink */ }; Modified: stable/12/sys/kern/syscalls.c ============================================================================== --- stable/12/sys/kern/syscalls.c Fri Mar 15 13:19:52 2019 (r345180) +++ stable/12/sys/kern/syscalls.c Fri Mar 15 14:16:16 2019 (r345181) @@ -570,4 +570,8 @@ const char *syscallnames[] = { "cpuset_getdomain", /* 561 = cpuset_getdomain */ "cpuset_setdomain", /* 562 = cpuset_setdomain */ "getrandom", /* 563 = getrandom */ + "getfhat", /* 564 = getfhat */ + "fhlink", /* 565 = fhlink */ + "fhlinkat", /* 566 = fhlinkat */ + "fhreadlink", /* 567 = fhreadlink */ }; Modified: stable/12/sys/kern/syscalls.master ============================================================================== --- stable/12/sys/kern/syscalls.master Fri Mar 15 13:19:52 2019 (r345180) +++ stable/12/sys/kern/syscalls.master Fri Mar 15 14:16:16 2019 (r345181) @@ -1340,6 +1340,34 @@ 563 AUE_NULL STD { int getrandom( \ _Out_writes_bytes_(buflen) void *buf, \ size_t buflen, unsigned int flags); } +564 AUE_NULL STD { \ + int getfhat( \ + int fd, \ + _In_z_ char *path, \ + _Out_ struct fhandle *fhp, \ + int flags \ + ); \ + } +565 AUE_NULL STD { \ + int fhlink( \ + _In_ struct fhandle *fhp, \ + _In_z_ const char *to \ + ); \ + } +566 AUE_NULL STD { \ + int fhlinkat( \ + _In_ struct fhandle *fhp, \ + int tofd, \ + _In_z_ const char *to, \ + ); \ + } +567 AUE_NULL STD { \ + int fhreadlink( \ + _In_ struct fhandle *fhp, \ + _Out_writes_(bufsize) char *buf, \ + size_t bufsize \ + ); \ + } ; Please copy any additions and changes to the following compatability tables: ; sys/compat/freebsd32/syscalls.master Modified: stable/12/sys/kern/systrace_args.c ============================================================================== --- stable/12/sys/kern/systrace_args.c Fri Mar 15 13:19:52 2019 (r345180) +++ stable/12/sys/kern/systrace_args.c Fri Mar 15 14:16:16 2019 (r345181) @@ -3266,6 +3266,42 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 3; break; } + /* getfhat */ + case 564: { + struct getfhat_args *p = params; + iarg[0] = p->fd; /* int */ + uarg[1] = (intptr_t) p->path; /* char * */ + uarg[2] = (intptr_t) p->fhp; /* struct fhandle * */ + iarg[3] = p->flags; /* int */ + *n_args = 4; + break; + } + /* fhlink */ + case 565: { + struct fhlink_args *p = params; + uarg[0] = (intptr_t) p->fhp; /* struct fhandle * */ + uarg[1] = (intptr_t) p->to; /* const char * */ + *n_args = 2; + break; + } + /* fhlinkat */ + case 566: { + struct fhlinkat_args *p = params; + uarg[0] = (intptr_t) p->fhp; /* struct fhandle * */ + iarg[1] = p->tofd; /* int */ + uarg[2] = (intptr_t) p->to; /* const char * */ + *n_args = 3; + break; + } + /* fhreadlink */ + case 567: { + struct fhreadlink_args *p = params; + uarg[0] = (intptr_t) p->fhp; /* struct fhandle * */ + uarg[1] = (intptr_t) p->buf; /* char * */ + uarg[2] = p->bufsize; /* size_t */ + *n_args = 3; + break; + } default: *n_args = 0; break; @@ -8710,6 +8746,70 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; + /* getfhat */ + case 564: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "userland char *"; + break; + case 2: + p = "userland struct fhandle *"; + break; + case 3: + p = "int"; + break; + default: + break; + }; + break; + /* fhlink */ + case 565: + switch(ndx) { + case 0: + p = "userland struct fhandle *"; + break; + case 1: + p = "userland const char *"; + break; + default: + break; + }; + break; + /* fhlinkat */ + case 566: + switch(ndx) { + case 0: + p = "userland struct fhandle *"; + break; + case 1: + p = "int"; + break; + case 2: + p = "userland const char *"; + break; + default: + break; + }; + break; + /* fhreadlink */ + case 567: + switch(ndx) { + case 0: + p = "userland struct fhandle *"; + break; + case 1: + p = "userland char *"; + break; + case 2: + p = "size_t"; + break; + default: + break; + }; + break; default: break; }; @@ -10583,6 +10683,26 @@ systrace_return_setargdesc(int sysnum, int ndx, char * break; /* getrandom */ case 563: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* getfhat */ + case 564: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* fhlink */ + case 565: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* fhlinkat */ + case 566: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* fhreadlink */ + case 567: if (ndx == 0 || ndx == 1) p = "int"; break; Modified: stable/12/sys/kern/vfs_syscalls.c ============================================================================== --- stable/12/sys/kern/vfs_syscalls.c Fri Mar 15 13:19:52 2019 (r345180) +++ stable/12/sys/kern/vfs_syscalls.c Fri Mar 15 14:16:16 2019 (r345181) @@ -105,6 +105,14 @@ static int setutimes(struct thread *td, struct vnode * const struct timespec *, int, int); static int vn_access(struct vnode *vp, int user_flags, struct ucred *cred, struct thread *td); +static int kern_fhlinkat(struct thread *td, int fd, const char *path, + enum uio_seg pathseg, fhandle_t *fhp); +static int kern_getfhat(struct thread *td, int flags, int fd, + const char *path, enum uio_seg pathseg, fhandle_t *fhp); +static int kern_readlink_vp(struct vnode *vp, char *buf, enum uio_seg bufseg, + size_t count, struct thread *td); +static int kern_linkat_vp(struct thread *td, struct vnode *vp, int fd, + const char *path, enum uio_seg segflag); /* * Sync each mounted filesystem. @@ -1491,28 +1499,37 @@ can_hardlink(struct vnode *vp, struct ucred *cred) int kern_linkat(struct thread *td, int fd1, int fd2, char *path1, char *path2, - enum uio_seg segflg, int follow) + enum uio_seg segflag, int follow) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Mar 15 14:18:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CCB8154A2E1; Fri, 15 Mar 2019 14:18:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F14F66A335; Fri, 15 Mar 2019 14:18:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E4490B357; Fri, 15 Mar 2019 14:18:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FEIJQg060045; Fri, 15 Mar 2019 14:18:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FEIJGS060044; Fri, 15 Mar 2019 14:18:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903151418.x2FEIJGS060044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 15 Mar 2019 14:18:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345182 - stable/12/sys/dev/hwpmc X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/dev/hwpmc X-SVN-Commit-Revision: 345182 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F14F66A335 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 14:18:20 -0000 Author: kib Date: Fri Mar 15 14:18:19 2019 New Revision: 345182 URL: https://svnweb.freebsd.org/changeset/base/345182 Log: MFC r345074: Remove useless version check. Modified: stable/12/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/12/sys/dev/hwpmc/hwpmc_core.c Fri Mar 15 14:16:16 2019 (r345181) +++ stable/12/sys/dev/hwpmc/hwpmc_core.c Fri Mar 15 14:18:19 2019 (r345182) @@ -40,11 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include -#if (__FreeBSD_version >= 1100000) #include -#else -#include -#endif #include #include #include From owner-svn-src-all@freebsd.org Fri Mar 15 14:19:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CDA7154A359; Fri, 15 Mar 2019 14:19:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1082F6A530; Fri, 15 Mar 2019 14:19:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02291B358; Fri, 15 Mar 2019 14:19:46 +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 x2FEJjCT060152; Fri, 15 Mar 2019 14:19:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FEJjRg060150; Fri, 15 Mar 2019 14:19:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903151419.x2FEJjRg060150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 15 Mar 2019 14:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345183 - in stable/12/sys/x86: include x86 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys/x86: include x86 X-SVN-Commit-Revision: 345183 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1082F6A530 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 14:19:46 -0000 Author: kib Date: Fri Mar 15 14:19:45 2019 New Revision: 345183 URL: https://svnweb.freebsd.org/changeset/base/345183 Log: MFC r345075: Add register number, CPUID bits, and print identification for TSX force abort errata. Modified: stable/12/sys/x86/include/specialreg.h stable/12/sys/x86/x86/identcpu.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/x86/include/specialreg.h ============================================================================== --- stable/12/sys/x86/include/specialreg.h Fri Mar 15 14:18:19 2019 (r345182) +++ stable/12/sys/x86/include/specialreg.h Fri Mar 15 14:19:45 2019 (r345183) @@ -431,6 +431,7 @@ /* * CPUID instruction 7 Structured Extended Features, leaf 0 edx info */ +#define CPUID_STDEXT3_TSXFA 0x00002000 #define CPUID_STDEXT3_IBPB 0x04000000 #define CPUID_STDEXT3_STIBP 0x08000000 #define CPUID_STDEXT3_L1D_FLUSH 0x10000000 @@ -489,6 +490,7 @@ #define MSR_MTRRcap 0x0fe #define MSR_IA32_ARCH_CAP 0x10a #define MSR_IA32_FLUSH_CMD 0x10b +#define MSR_TSX_FORCE_ABORT 0x10f #define MSR_BBL_CR_ADDR 0x116 #define MSR_BBL_CR_DECC 0x118 #define MSR_BBL_CR_CTL 0x119 Modified: stable/12/sys/x86/x86/identcpu.c ============================================================================== --- stable/12/sys/x86/x86/identcpu.c Fri Mar 15 14:18:19 2019 (r345182) +++ stable/12/sys/x86/x86/identcpu.c Fri Mar 15 14:19:45 2019 (r345183) @@ -992,6 +992,7 @@ printcpuinfo(void) printf("\n Structured Extended Features3=0x%b", cpu_stdext_feature3, "\020" + "\016TSXFA" "\033IBPB" "\034STIBP" "\035L1DFL" From owner-svn-src-all@freebsd.org Fri Mar 15 14:42:24 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52C65154AC07; Fri, 15 Mar 2019 14:42:24 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EDB8D6B172; Fri, 15 Mar 2019 14:42:23 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E28F1B84F; Fri, 15 Mar 2019 14:42:23 +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 x2FEgNLW075207; Fri, 15 Mar 2019 14:42:23 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FEgNpo075206; Fri, 15 Mar 2019 14:42:23 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201903151442.x2FEgNpo075206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Fri, 15 Mar 2019 14:42:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345184 - head/usr.sbin/trim X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/usr.sbin/trim X-SVN-Commit-Revision: 345184 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EDB8D6B172 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 14:42:24 -0000 Author: eugen Date: Fri Mar 15 14:42:23 2019 New Revision: 345184 URL: https://svnweb.freebsd.org/changeset/base/345184 Log: trim(8): emit more user-friendly error message in verbose mode. If underlying driver provides no TRIM/UNMAP support and operation fails due to this reason, state it clearly in verbose mode (default) instead of writing standard message that may be too cryptic for a user: trim: ioctl(DIOCGDELETE) failed: nda0: Operation not supported Now it would write: trim: nda0: TRIM/UNMAP not supported by driver But still use previous format including errno value for quiet mode. Small candelete() function borrowed from diskinfo(8) code. This function was committed by Alan Somers , so give him some credit. Reported by: chuck Modified: head/usr.sbin/trim/trim.c Modified: head/usr.sbin/trim/trim.c ============================================================================== --- head/usr.sbin/trim/trim.c Fri Mar 15 14:19:45 2019 (r345183) +++ head/usr.sbin/trim/trim.c Fri Mar 15 14:42:23 2019 (r345184) @@ -2,7 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2019 Eugene Grosbein . - * All rights reserved. + * Contains code written by Alan Somers . * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -47,6 +47,7 @@ #include __FBSDID("$FreeBSD$"); +static bool candelete(int fd); static off_t getsize(const char *path); static int opendev(const char *path, int flags); static int trim(const char *path, off_t offset, off_t length, bool dryrun, bool verbose); @@ -135,6 +136,19 @@ main(int argc, char **argv) return (error ? EXIT_FAILURE : EXIT_SUCCESS); } +static bool +candelete(int fd) +{ + struct diocgattr_arg arg; + + strlcpy(arg.name, "GEOM::candelete", sizeof(arg.name)); + arg.len = sizeof(arg.value.i); + if (ioctl(fd, DIOCGATTR, &arg) == 0) + return (arg.value.i != 0); + else + return (false); +} + static int opendev(const char *path, int flags) { @@ -211,9 +225,12 @@ trim(const char *path, off_t offset, off_t length, boo arg[1] = length; error = ioctl(fd, DIOCGDELETE, arg); - if (error < 0) - warn("ioctl(DIOCGDELETE) failed: %s", path); - + if (error < 0) { + if (errno == EOPNOTSUPP && verbose && !candelete(fd)) + warnx("%s: TRIM/UNMAP not supported by driver", path); + else + warn("ioctl(DIOCGDELETE) failed: %s", path); + } close(fd); return (error); } From owner-svn-src-all@freebsd.org Fri Mar 15 14:57:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DF36154B1A8; Fri, 15 Mar 2019 14:57:48 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B70F36BA2E; Fri, 15 Mar 2019 14:57:47 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-lf1-x12f.google.com with SMTP id g7so7093319lfh.10; Fri, 15 Mar 2019 07:57:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=4LWf5uzi2UfHQsi6FBd69F6P6/u70BGO+6yEE497aGM=; b=XoEEs++Upkd19EYcwECY6uNkbBdl1Mtfabc99MniuPiDtb2QiXqS6lCIS4wVAw4IZi jkvASdKczzWv99UqQyo9/bi1S67o1sz7dTiHf8GhcVQsOK6AKTlJtaBC4/kP1BrwSPSQ ggK4RfpkSFFE/leF+ybtZFonUSvTjhLHlqWvRrBmMpmHULBuYU0OLxgI7Tsn77c8dbeh burp3wVUUEUMs+cGvIVulMqSJCHu9Z4mehuWhpDzBgUcWC6cnum7ONSgjLd8ForHAg4Y KKPkBjBZN+iizQ3aq/cePewQ13x0muwoc7MpfUMGMFSiialObIYYqTTYCbcfF96GPhuA K+bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=4LWf5uzi2UfHQsi6FBd69F6P6/u70BGO+6yEE497aGM=; b=Fu4tv5wr7j4ZcZCpITKg/yP8CBOlt3GuskcYoWlLrdXJodnX3Myy5CjUUB510wVasY OKHDShiOApwO5H51kOng3s7BiQubGBUbqwo3IG9tFb8kIpmEEEFlS/LvtiAQbJtiJJlm HP7cis2Ui1ansVuw3iRbpPT72ZjA6n/6MFSlJKklJguVhK+38CsjZiJih3FqST7w65Vz W0MJUBEDSVASeMgUWIUd85LINO8S3EimFjtUh/r+L+fzStpGx0xnSPtf3WEX/035OGfB Qpn9HuNv4X980ut717/Y8dx5ITDZiC96oflT/SJzW6EBfB66UyD6XAGt840eAp2+6CuT bofg== X-Gm-Message-State: APjAAAW76dPb0fzPzaevuO3hF5Lwo97N4fJRq9SXzVjCJIeL3okxg1wL tsLXhExKtpRKuAakpgOqzxzxK3TsedspQ+PXqDRee+Gw X-Google-Smtp-Source: APXvYqwOgBDK+RAdgpaWcW2COBfoJ3ruQIBTy/7OZ2E2QPqKzlT2Vb5r1iUQHCVSp6E4C0M2OBQGfbU2+Mk904toYqI= X-Received: by 2002:ac2:4109:: with SMTP id b9mr2363200lfi.109.1552661865715; Fri, 15 Mar 2019 07:57:45 -0700 (PDT) MIME-Version: 1.0 References: <201903150231.x2F2VnR6027995@gndrsh.dnsmgr.net> <7e312cdad08139c567cd43207191c97303831e9d.camel@freebsd.org> In-Reply-To: <7e312cdad08139c567cd43207191c97303831e9d.camel@freebsd.org> Reply-To: araujo@freebsd.org From: Marcelo Araujo Date: Fri, 15 Mar 2019 22:57:29 +0800 Message-ID: Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve To: Ian Lepore Cc: "Rodney W. Grimes" , Chuck Tuffli , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: B70F36BA2E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.95)[-0.947,0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 14:57:48 -0000 Em sex, 15 de mar de 2019 =C3=A0s 22:12, Ian Lepore escre= veu: > On Thu, 2019-03-14 at 19:31 -0700, Rodney W. Grimes wrote: > > > Author: chuck > > > Date: Fri Mar 15 02:11:28 2019 > > > New Revision: 345171 > > > URL: https://svnweb.freebsd.org/changeset/base/345171 > > > > > > Log: > > > Fix bhyve PCIe capability emulation > > > > > > PCIe devices starting with version 1.1 must set the Role-Based > > > Error > > > Reporting bit. > > > > > > And while we're in the neighborhood, generalize the code > > > assigning the > > > device type. > > > > > > Reviewed by: imp, araujo, rgrimes > > > Approved by: imp (mentor) > > > MFC after: 1 week > > > Differential Revision: https://reviews.freebsd.org/D19580 > > > > This code requires maintainer approval before a commit, > > though this was well reviewed that doesnt exclude it > > from the MAINTAINERS entry. > > > > Where exactly does it say that in MAINTAINERS? As another victim of > this sort of drive-by lynching after making a trivial bhyve change I > pretty seriously object to a vague and meaningless entry in MAINTAINERS > being used to pounce on anyone who dares to touch the precious bhyve > code. > There is a new entry on MAINTAINERS: https://svnweb.freebsd.org/base?view=3Drevision&revision=3D344631 > > There is no mention of bhyve in MAINTAINERS, for usr.sbin or elsewhere. > There is an entry for vmm(4), which to me does not say anything about > bhyve, yet somehow everybody is supposed to know what it means and > what-all territory it covers? > > IMO, this sort of hyper-proprietary pouncing on everyone who dares > change a single line of code is not productive. It is HIGHLY de- > motivating. Large sweeping design changes are one thing, but pouncing > on every tiny minor commit is just not helpful. > +1 I got so frustrated with it recently that I have decided to don't contribute with bhyve anymore, perhaps even with FreeBSD. I still have some people under mentorship that I intend to finish and then probably I will phase out. > > -- Ian > > > Leave it for now, I am sure jhb or thyco are fine with it, > > this is just a heads up FYI for future commits. > > > > Bhyve code has been and still is under a fairly tight > > MAINTAINER status. > > > > > Modified: > > > head/usr.sbin/bhyve/pci_emul.c > > > > > > Modified: head/usr.sbin/bhyve/pci_emul.c > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > --- head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:27 2019 (= r3 > > > 45170) > > > +++ head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:28 2019 (= r3 > > > 45171) > > > @@ -953,7 +953,10 @@ pci_emul_add_pciecap(struct pci_devinst *pi, > > > int type) > > > bzero(&pciecap, sizeof(pciecap)); > > > > > > pciecap.capid =3D PCIY_EXPRESS; > > > - pciecap.pcie_capabilities =3D PCIECAP_VERSION | > > > PCIEM_TYPE_ROOT_PORT; > > > + pciecap.pcie_capabilities =3D PCIECAP_VERSION | type; > > > + /* Devices starting with version 1.1 must set the RBER bit */ > > > + if (PCIECAP_VERSION >=3D 1) > > > + pciecap.dev_capabilities =3D PCIEM_CAP_ROLE_ERR_RPT; > > > pciecap.link_capabilities =3D 0x411; /* gen1, x1 */ > > > pciecap.link_status =3D 0x11; /* gen1, x1 */ > > > > > > > > > > > > > > > > --=20 --=20 Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_) From owner-svn-src-all@freebsd.org Fri Mar 15 15:10:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05413154B637 for ; Fri, 15 Mar 2019 15:10:52 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A37F6C13B for ; Fri, 15 Mar 2019 15:10:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x833.google.com with SMTP id v20so10421064qtv.12 for ; Fri, 15 Mar 2019 08:10:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=t7Zh0KGEksOvJFlUEZX10svqGHjAmqWX9zzZT4B2ScM=; b=ySB54chPYQTGlZkjFYk+g7F+IbQZRuoEXMgpLoRWW6TVgF8hsHPBatrIfPwWQTJnmE cGmv7dt6+ouCxKdyMx44keaI5fgQ6mlbTxBOa9NwRKmpkxhR6N5QjZQ4PsCod+SvTTk1 oGeewg8cO5MbPxbG6pqQ7mWaJpExMwk+3ddhxOiQqvSbL72lGKpkp9uGNhwccqz4xrOL cKBwBXSKsEq1X/JjXYu4iFmDNDuQKogXeyAbLkUeDYXO1oRF6ZTECsOFRigm3wZyW1fB PpCS0IccNgdR8Nf/ZlPcnNXFG7XwMN8jQBTOs7iZxPYPWh4mhCDg5/KNxYmAx0Sp1HnI nSqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=t7Zh0KGEksOvJFlUEZX10svqGHjAmqWX9zzZT4B2ScM=; b=bu1dFPx6/w9NRoQdqHd7uhHniqRueYcC8UhpWlkn/7jvEfm+bDfQxqXRlxDPrjApxm SiAmjixMz97QBeIqkNV/1p+Wcwnq675rV2d5qg25J4OMCI6QFE6FhduEZxc+OA1ctxqE PehRHyEfuV92RQ4gITlaMEIYzHrEYpfDRb+b8j70eS1AAJnprQl65jdsYqGvFX+ByNkp PQNZ8BDJGnfz9HfUaHxiYjAWdRC19RVTj3amBptCNCDBTMagkYrpugwukGDU21B8TdEc FcdKGHnkbTsF8w+Xi8589UAAblX7VczP5uHms66JEuW//9dQfOEHntdZI48Do9zBNSay jeoQ== X-Gm-Message-State: APjAAAVvpLRR3BbBzIUMEDKhKwM7r1zANogqm4EG9YIngyULqbWBdN3p r7xxXRWZl3mhlyCAZUAvfF1sBqRUgODVsPI91pykeg== X-Google-Smtp-Source: APXvYqx1YtcsZD8bnpRhBn/QUospvp7V5Vg6C4BdOeoO66UjJsoDMZspj4A5CQ8E4UOeIKdrmhVyMzV6P99qpPCkLD4= X-Received: by 2002:ac8:5286:: with SMTP id s6mr3302941qtn.118.1552662650788; Fri, 15 Mar 2019 08:10:50 -0700 (PDT) MIME-Version: 1.0 References: <201903150211.x2F2BSai079898@repo.freebsd.org> <201903150231.x2F2VnR6027995@gndrsh.dnsmgr.net> In-Reply-To: <201903150231.x2F2VnR6027995@gndrsh.dnsmgr.net> From: Warner Losh Date: Fri, 15 Mar 2019 09:10:39 -0600 Message-ID: Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve To: "Rodney W. Grimes" Cc: Chuck Tuffli , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 9A37F6C13B X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.984,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 15:10:52 -0000 On Thu, Mar 14, 2019 at 8:32 PM Rodney W. Grimes wrote: > > Author: chuck > > Date: Fri Mar 15 02:11:28 2019 > > New Revision: 345171 > > URL: https://svnweb.freebsd.org/changeset/base/345171 > > > > Log: > > Fix bhyve PCIe capability emulation > > > > PCIe devices starting with version 1.1 must set the Role-Based Error > > Reporting bit. > > > > And while we're in the neighborhood, generalize the code assigning the > > device type. > > > > Reviewed by: imp, araujo, rgrimes > > Approved by: imp (mentor) > > MFC after: 1 week > > Differential Revision: https://reviews.freebsd.org/D19580 > > This code requires maintainer approval before a commit, > though this was well reviewed that doesnt exclude it > from the MAINTAINERS entry. > > Leave it for now, I am sure jhb or thyco are fine with it, > this is just a heads up FYI for future commits. > > Bhyve code has been and still is under a fairly tight > MAINTAINER status. > There is no such thing as a hard lock in FreeBSD. This sounds like you are advocating for that, but that's not the case. Stop this stupid nitpicking for single line commits. We don't have that culture any more and it's really pissing a lot of people off. The MAINTAINERS file even says this: Please note that the content of this file is strictly advisory. And the entry for bhyve doesn't say things are mandatory, just requested. Jumping on people's case like this, for a review you yourself were on and approved but made no mention of seeking further review / approval, is demotivating and toxic. Please stop. Warner > head/usr.sbin/bhyve/pci_emul.c > > > > Modified: head/usr.sbin/bhyve/pci_emul.c > > > ============================================================================== > > --- head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:27 2019 > (r345170) > > +++ head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:28 2019 > (r345171) > > @@ -953,7 +953,10 @@ pci_emul_add_pciecap(struct pci_devinst *pi, int > type) > > bzero(&pciecap, sizeof(pciecap)); > > > > pciecap.capid = PCIY_EXPRESS; > > - pciecap.pcie_capabilities = PCIECAP_VERSION | PCIEM_TYPE_ROOT_PORT; > > + pciecap.pcie_capabilities = PCIECAP_VERSION | type; > > + /* Devices starting with version 1.1 must set the RBER bit */ > > + if (PCIECAP_VERSION >= 1) > > + pciecap.dev_capabilities = PCIEM_CAP_ROLE_ERR_RPT; > > pciecap.link_capabilities = 0x411; /* gen1, x1 */ > > pciecap.link_status = 0x11; /* gen1, x1 */ > > > > > > > > -- > Rod Grimes > rgrimes@freebsd.org > > From owner-svn-src-all@freebsd.org Fri Mar 15 15:11:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB251154B67C for ; Fri, 15 Mar 2019 15:11:38 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E9006C428 for ; Fri, 15 Mar 2019 15:11:38 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id F0E621CE4F for ; Fri, 15 Mar 2019 15:11:37 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lj1-f171.google.com with SMTP id x13so8243425ljj.5 for ; Fri, 15 Mar 2019 08:11:37 -0700 (PDT) X-Gm-Message-State: APjAAAWLPqyI9/07HmPXGxmuAID/zykl3w7cSKzXQOvpEndKXnnBpZP8 nJEbEnfhgZAJFlhDrbKsRiXTBXXE3WDY9pSRXNc= X-Received: by 2002:a2e:8456:: with SMTP id u22mt1833096ljh.108.1552662696499; Fri, 15 Mar 2019 08:11:36 -0700 (PDT) MIME-Version: 1.0 References: <201903151319.x2FDJqdc028407@repo.freebsd.org> In-Reply-To: <201903151319.x2FDJqdc028407@repo.freebsd.org> From: Kyle Evans Date: Fri, 15 Mar 2019 10:11:22 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r345180 - head/sys/net Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 5E9006C428 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.989,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 15:11:38 -0000 On Fri, Mar 15, 2019 at 8:20 AM Kyle Evans wrote: > > Author: kevans > Date: Fri Mar 15 13:19:52 2019 > New Revision: 345180 > URL: https://svnweb.freebsd.org/changeset/base/345180 > > Log: > if_bridge(4): Fix module teardown > > bridge_rtnode_zone still has outstanding allocations at the time of > destruction in the current model because all of the interface teardown > happens in a VNET_SYSUNINIT, -after- the MOD_UNLOAD has already been > processed. The SYSUNINIT triggers destruction of the interfaces, which then > attempts to free the memory from the zone that's already been destroyed, and > we hit a panic. > > Solve this by virtualizing the uma_zone we allocate the rtnodes from to fix > the ordering. bridge_rtable_fini should also take care to flush any > remaining routes that weren't taken care of when dynamic routes were flushed > in bridge_stop. > > Reviewed by: kp > Differential Revision: https://reviews.freebsd.org/D19578 > > Modified: > head/sys/net/if_bridge.c > > [... snip ...] > @@ -2886,6 +2890,7 @@ bridge_rtable_fini(struct bridge_softc *sc) > > KASSERT(sc->sc_brtcnt == 0, > ("%s: %d bridge routes referenced", __func__, sc->sc_brtcnt)); > + bridge_rtflush(sc, 1); > free(sc->sc_rthash, M_DEVBUF); > } > Now that I read through all of this again, this is wrong. Routes are destroyed as the member interfaces are removed up in bridge_clone_destroy, and that this needs to have been done already is KASSERT'd on the line right above. I will remove this, because that flush will accomplish nothing. From owner-svn-src-all@freebsd.org Fri Mar 15 15:16:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4360A154B7B5; Fri, 15 Mar 2019 15:16:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DBF446C6F4; Fri, 15 Mar 2019 15:16:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B5009BF12; Fri, 15 Mar 2019 15:16:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FFGWWA090936; Fri, 15 Mar 2019 15:16:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FFGVW2090931; Fri, 15 Mar 2019 15:16:31 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201903151516.x2FFGVW2090931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 15 Mar 2019 15:16:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r345186 - in stable/11/sys: conf dev/fxp modules/fxp X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/11/sys: conf dev/fxp modules/fxp X-SVN-Commit-Revision: 345186 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DBF446C6F4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 15:16:33 -0000 Author: markj Date: Fri Mar 15 15:16:31 2019 New Revision: 345186 URL: https://svnweb.freebsd.org/changeset/base/345186 Log: MFC r342214: Remove a use of a negative array index from fxp(4). Modified: stable/11/sys/conf/files stable/11/sys/conf/kern.mk stable/11/sys/dev/fxp/if_fxp.c stable/11/sys/dev/fxp/if_fxpreg.h stable/11/sys/modules/fxp/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Fri Mar 15 14:49:27 2019 (r345185) +++ stable/11/sys/conf/files Fri Mar 15 15:16:31 2019 (r345186) @@ -1733,8 +1733,7 @@ dev/firewire/sbp.c optional sbp dev/firewire/sbp_targ.c optional sbp_targ dev/flash/at45d.c optional at45d dev/flash/mx25l.c optional mx25l -dev/fxp/if_fxp.c optional fxp \ - compile-with "${NORMAL_C} ${NO_WARRAY_BOUNDS}" +dev/fxp/if_fxp.c optional fxp dev/fxp/inphy.c optional fxp dev/gem/if_gem.c optional gem dev/gem/if_gem_pci.c optional gem pci Modified: stable/11/sys/conf/kern.mk ============================================================================== --- stable/11/sys/conf/kern.mk Fri Mar 15 14:49:27 2019 (r345185) +++ stable/11/sys/conf/kern.mk Fri Mar 15 15:16:31 2019 (r345186) @@ -24,7 +24,6 @@ NO_WSELF_ASSIGN= -Wno-self-assign NO_WUNNEEDED_INTERNAL_DECL= -Wno-unneeded-internal-declaration NO_WSOMETIMES_UNINITIALIZED= -Wno-error-sometimes-uninitialized NO_WCAST_QUAL= -Wno-cast-qual -NO_WARRAY_BOUNDS= -Wno-error-array-bounds # Several other warnings which might be useful in some cases, but not severe # enough to error out the whole kernel build. Display them anyway, so there is # some incentive to fix them eventually. Modified: stable/11/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/11/sys/dev/fxp/if_fxp.c Fri Mar 15 14:49:27 2019 (r345185) +++ stable/11/sys/dev/fxp/if_fxp.c Fri Mar 15 15:16:31 2019 (r345186) @@ -1623,7 +1623,7 @@ fxp_encap(struct fxp_softc *sc, struct mbuf **m_head) cbp->tbd_number = nseg; /* Configure TSO. */ if (m->m_pkthdr.csum_flags & CSUM_TSO) { - cbp->tbd[-1].tb_size = htole32(m->m_pkthdr.tso_segsz << 16); + cbp->tbdtso.tb_size = htole32(m->m_pkthdr.tso_segsz << 16); cbp->tbd[1].tb_size |= htole32(tcp_payload << 16); cbp->ipcb_ip_schedule |= FXP_IPCB_LARGESEND_ENABLE | FXP_IPCB_IP_CHECKSUM_ENABLE | Modified: stable/11/sys/dev/fxp/if_fxpreg.h ============================================================================== --- stable/11/sys/dev/fxp/if_fxpreg.h Fri Mar 15 14:49:27 2019 (r345185) +++ stable/11/sys/dev/fxp/if_fxpreg.h Fri Mar 15 15:16:31 2019 (r345186) @@ -279,10 +279,15 @@ struct fxp_cb_tx { uint16_t cb_status; uint16_t cb_command; uint32_t link_addr; - uint32_t tbd_array_addr; - uint16_t byte_count; - uint8_t tx_threshold; - uint8_t tbd_number; + union { + struct { + uint32_t tbd_array_addr; + uint16_t byte_count; + uint8_t tx_threshold; + uint8_t tbd_number; + }; + struct fxp_tbd tbdtso; + }; /* * The following structure isn't actually part of the TxCB, Modified: stable/11/sys/modules/fxp/Makefile ============================================================================== --- stable/11/sys/modules/fxp/Makefile Fri Mar 15 14:49:27 2019 (r345185) +++ stable/11/sys/modules/fxp/Makefile Fri Mar 15 15:16:31 2019 (r345186) @@ -6,5 +6,3 @@ KMOD= if_fxp SRCS= device_if.h bus_if.h if_fxp.c inphy.c miibus_if.h miidevs.h pci_if.h .include - -CWARNFLAGS+= ${NO_WARRAY_BOUNDS} From owner-svn-src-all@freebsd.org Fri Mar 15 15:52:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 711051509973; Fri, 15 Mar 2019 15:52:37 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F9366DD7B; Fri, 15 Mar 2019 15:52:37 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8FE5BC5AF; Fri, 15 Mar 2019 15:52:36 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FFqaxT012082; Fri, 15 Mar 2019 15:52:36 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FFqaKx012081; Fri, 15 Mar 2019 15:52:36 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201903151552.x2FFqaKx012081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Fri, 15 Mar 2019 15:52:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345187 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 345187 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0F9366DD7B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 15:52:37 -0000 Author: kp Date: Fri Mar 15 15:52:36 2019 New Revision: 345187 URL: https://svnweb.freebsd.org/changeset/base/345187 Log: bridge: Fix STP-related panic After r345180 we need to have the appropriate vnet context set to delete an rtnode in bridge_rtnode_destroy(). That's usually the case, but not when it's called by the STP code (through bstp_notify_rtage()). We have to set the vnet context in bridge_rtable_expire() just as we do in the other STP callback bridge_state_change(). Reviewed by: kevans Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Fri Mar 15 15:16:31 2019 (r345186) +++ head/sys/net/if_bridge.c Fri Mar 15 15:52:36 2019 (r345187) @@ -3047,6 +3047,7 @@ bridge_rtable_expire(struct ifnet *ifp, int age) struct bridge_softc *sc = ifp->if_bridge; struct bridge_rtnode *brt; + CURVNET_SET(ifp->if_vnet); BRIDGE_LOCK(sc); /* @@ -3065,6 +3066,7 @@ bridge_rtable_expire(struct ifnet *ifp, int age) } } BRIDGE_UNLOCK(sc); + CURVNET_RESTORE(); } /* From owner-svn-src-all@freebsd.org Fri Mar 15 15:56:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D084D1509B24; Fri, 15 Mar 2019 15:56:16 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 55F156E057; Fri, 15 Mar 2019 15:56:15 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2FFuAvf030780; Fri, 15 Mar 2019 08:56:10 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2FFuAA4030779; Fri, 15 Mar 2019 08:56:10 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903151556.x2FFuAA4030779@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve In-Reply-To: To: Warner Losh Date: Fri, 15 Mar 2019 08:56:10 -0700 (PDT) CC: "Rodney W. Grimes" , Chuck Tuffli , src-committers , svn-src-all , svn-src-head 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-Rspamd-Queue-Id: 55F156E057 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.933,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 15:56:17 -0000 > On Thu, Mar 14, 2019 at 8:32 PM Rodney W. Grimes > wrote: > > > > Author: chuck > > > Date: Fri Mar 15 02:11:28 2019 > > > New Revision: 345171 > > > URL: https://svnweb.freebsd.org/changeset/base/345171 > > > > > > Log: > > > Fix bhyve PCIe capability emulation > > > > > > PCIe devices starting with version 1.1 must set the Role-Based Error > > > Reporting bit. > > > > > > And while we're in the neighborhood, generalize the code assigning the > > > device type. > > > > > > Reviewed by: imp, araujo, rgrimes > > > Approved by: imp (mentor) > > > MFC after: 1 week > > > Differential Revision: https://reviews.freebsd.org/D19580 > > > > This code requires maintainer approval before a commit, > > though this was well reviewed that doesnt exclude it > > from the MAINTAINERS entry. > > > > Leave it for now, I am sure jhb or thyco are fine with it, > > this is just a heads up FYI for future commits. > > > > Bhyve code has been and still is under a fairly tight > > MAINTAINER status. > > > > There is no such thing as a hard lock in FreeBSD. This sounds like you are > advocating for that, but that's not the case. > > Stop this stupid nitpicking for single line commits. We don't have that > culture any more and it's really pissing a lot of people off. > > The MAINTAINERS file even says this: > > Please note that the content of this file is strictly advisory. > > And the entry for bhyve doesn't say things are mandatory, just requested. > > Jumping on people's case like this, for a review you yourself were on and > approved but made no mention of seeking further review / approval, is > demotivating and toxic. Please stop. I explicitly DID add jhb to the review. I also explicitly did not mark the bhyve# box that is added by the hearald rules. I did not jump on him, I informed him of the entry, and told him to leave it. You how ever have infact jumped on me, repeatedly, if you want to talk about discouraging tones of behavior I suggest you look at yourself as well. > Warner > > > head/usr.sbin/bhyve/pci_emul.c > > > > > > Modified: head/usr.sbin/bhyve/pci_emul.c > > > > > ============================================================================== > > > --- head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:27 2019 > > (r345170) > > > +++ head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:28 2019 > > (r345171) > > > @@ -953,7 +953,10 @@ pci_emul_add_pciecap(struct pci_devinst *pi, int > > type) > > > bzero(&pciecap, sizeof(pciecap)); > > > > > > pciecap.capid = PCIY_EXPRESS; > > > - pciecap.pcie_capabilities = PCIECAP_VERSION | PCIEM_TYPE_ROOT_PORT; > > > + pciecap.pcie_capabilities = PCIECAP_VERSION | type; > > > + /* Devices starting with version 1.1 must set the RBER bit */ > > > + if (PCIECAP_VERSION >= 1) > > > + pciecap.dev_capabilities = PCIEM_CAP_ROLE_ERR_RPT; > > > pciecap.link_capabilities = 0x411; /* gen1, x1 */ > > > pciecap.link_status = 0x11; /* gen1, x1 */ > > > > > > > > > > > > > -- > > Rod Grimes > > rgrimes@freebsd.org > > > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 15 16:03:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE7F31509F94; Fri, 15 Mar 2019 16:03:54 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 15CC96E625; Fri, 15 Mar 2019 16:03:53 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2FG3pSD030820; Fri, 15 Mar 2019 09:03:51 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2FG3pIp030819; Fri, 15 Mar 2019 09:03:51 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903151603.x2FG3pIp030819@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve In-Reply-To: To: araujo@freebsd.org Date: Fri, 15 Mar 2019 09:03:51 -0700 (PDT) CC: Ian Lepore , "Rodney W. Grimes" , Chuck Tuffli , src-committers , svn-src-all , svn-src-head 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-Rspamd-Queue-Id: 15CC96E625 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.928,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 16:03:54 -0000 > Em sex, 15 de mar de 2019 ?s 22:12, Ian Lepore escreveu: > > > On Thu, 2019-03-14 at 19:31 -0700, Rodney W. Grimes wrote: > > > > Author: chuck > > > > Date: Fri Mar 15 02:11:28 2019 > > > > New Revision: 345171 > > > > URL: https://svnweb.freebsd.org/changeset/base/345171 > > > > > > > > Log: > > > > Fix bhyve PCIe capability emulation > > > > > > > > PCIe devices starting with version 1.1 must set the Role-Based > > > > Error > > > > Reporting bit. > > > > > > > > And while we're in the neighborhood, generalize the code > > > > assigning the > > > > device type. > > > > > > > > Reviewed by: imp, araujo, rgrimes > > > > Approved by: imp (mentor) > > > > MFC after: 1 week > > > > Differential Revision: https://reviews.freebsd.org/D19580 > > > > > > This code requires maintainer approval before a commit, > > > though this was well reviewed that doesnt exclude it > > > from the MAINTAINERS entry. > > > > > > > Where exactly does it say that in MAINTAINERS? As another victim of > > this sort of drive-by lynching after making a trivial bhyve change I > > pretty seriously object to a vague and meaningless entry in MAINTAINERS > > being used to pounce on anyone who dares to touch the precious bhyve > > code. > > > > There is a new entry on MAINTAINERS: > https://svnweb.freebsd.org/base?view=revision&revision=344631 > > > > > > There is no mention of bhyve in MAINTAINERS, for usr.sbin or elsewhere. > > There is an entry for vmm(4), which to me does not say anything about > > bhyve, yet somehow everybody is supposed to know what it means and > > what-all territory it covers? > > > > IMO, this sort of hyper-proprietary pouncing on everyone who dares > > change a single line of code is not productive. It is HIGHLY de- > > motivating. Large sweeping design changes are one thing, but pouncing > > on every tiny minor commit is just not helpful. > > > > +1 > > I got so frustrated with it recently that I have decided to don't > contribute with bhyve anymore, perhaps even with FreeBSD. > I still have some people under mentorship that I intend to finish and then > probably I will phase out. Your failure to get reviews, and infact even abandon one that had negative advice as to the validity of your suggested change and committing it anyway is more likely the cause here. You also committed code with no review at all that had to be reverted after the bugs it caused were found by an external down stream consumers of the bhyve code. You had code reverted by core due to a external attribution request, which had you been attending the bi monthly bhyve calls you would of known was an issue. I would suggest these are the reasons your feeling angry, and that I infact tried to reach out to jhb to discuss some of these earlier but that reach out was never returned. I under stand your frustration, you are just wanting to do with best thing you can for the project and bhyve, can we try to find a better resolution to this situation than your exit? > > -- Ian > > > > > Leave it for now, I am sure jhb or thyco are fine with it, > > > this is just a heads up FYI for future commits. > > > > > > Bhyve code has been and still is under a fairly tight > > > MAINTAINER status. > > > > > > > Modified: > > > > head/usr.sbin/bhyve/pci_emul.c > > > > > > > > Modified: head/usr.sbin/bhyve/pci_emul.c > > > > =================================================================== > > > > =========== > > > > --- head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:27 2019 (r3 > > > > 45170) > > > > +++ head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:28 2019 (r3 > > > > 45171) > > > > @@ -953,7 +953,10 @@ pci_emul_add_pciecap(struct pci_devinst *pi, > > > > int type) > > > > bzero(&pciecap, sizeof(pciecap)); > > > > > > > > pciecap.capid = PCIY_EXPRESS; > > > > - pciecap.pcie_capabilities = PCIECAP_VERSION | > > > > PCIEM_TYPE_ROOT_PORT; > > > > + pciecap.pcie_capabilities = PCIECAP_VERSION | type; > > > > + /* Devices starting with version 1.1 must set the RBER bit */ > > > > + if (PCIECAP_VERSION >= 1) > > > > + pciecap.dev_capabilities = PCIEM_CAP_ROLE_ERR_RPT; > > > > pciecap.link_capabilities = 0x411; /* gen1, x1 */ > > > > pciecap.link_status = 0x11; /* gen1, x1 */ > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > -- > Marcelo Araujo (__)araujo@FreeBSD.org > \\\'',)http://www.FreeBSD.org \/ \ ^ > Power To Server. .\. /_) -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 15 16:18:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A005215255BD; Fri, 15 Mar 2019 16:18:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 44EE46EE55; Fri, 15 Mar 2019 16:18:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from [192.168.0.2] (unknown [181.52.72.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: pfg) by smtp.freebsd.org (Postfix) with ESMTPSA id 142D71D4D1; Fri, 15 Mar 2019 16:18:13 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve To: rgrimes@freebsd.org, araujo@freebsd.org Cc: Ian Lepore , Chuck Tuffli , src-committers , svn-src-all , svn-src-head References: <201903151603.x2FG3pIp030819@gndrsh.dnsmgr.net> From: Pedro Giffuni Organization: FreeBSD Message-ID: <6f9466bd-a282-e329-dd7c-13aef8deadaf@FreeBSD.org> Date: Fri, 15 Mar 2019 11:18:12 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: <201903151603.x2FG3pIp030819@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 44EE46EE55 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.94)[-0.944,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 16:18:15 -0000 On 15/03/2019 11:03, Rodney W. Grimes wrote: >> Em sex, 15 de mar de 2019 ?s 22:12, Ian Lepore escreveu: >> >>> On Thu, 2019-03-14 at 19:31 -0700, Rodney W. Grimes wrote: >>>>> Author: chuck >>>>> Date: Fri Mar 15 02:11:28 2019 >>>>> New Revision: 345171 >>>>> URL: https://svnweb.freebsd.org/changeset/base/345171 >>>>> >>>>> Log: >>>>> Fix bhyve PCIe capability emulation >>>>> >>>>> PCIe devices starting with version 1.1 must set the Role-Based >>>>> Error >>>>> Reporting bit. >>>>> >>>>> And while we're in the neighborhood, generalize the code >>>>> assigning the >>>>> device type. >>>>> >>>>> Reviewed by: imp, araujo, rgrimes >>>>> Approved by: imp (mentor) >>>>> MFC after: 1 week >>>>> Differential Revision: https://reviews.freebsd.org/D19580 >>>> This code requires maintainer approval before a commit, >>>> though this was well reviewed that doesnt exclude it >>>> from the MAINTAINERS entry. >>>> >>> Where exactly does it say that in MAINTAINERS? As another victim of >>> this sort of drive-by lynching after making a trivial bhyve change I >>> pretty seriously object to a vague and meaningless entry in MAINTAINERS >>> being used to pounce on anyone who dares to touch the precious bhyve >>> code. >>> >> There is a new entry on MAINTAINERS: >> https://svnweb.freebsd.org/base?view=revision&revision=344631 >> >> >>> There is no mention of bhyve in MAINTAINERS, for usr.sbin or elsewhere. >>> There is an entry for vmm(4), which to me does not say anything about >>> bhyve, yet somehow everybody is supposed to know what it means and >>> what-all territory it covers? >>> >>> IMO, this sort of hyper-proprietary pouncing on everyone who dares >>> change a single line of code is not productive. It is HIGHLY de- >>> motivating. Large sweeping design changes are one thing, but pouncing >>> on every tiny minor commit is just not helpful. >>> >> +1 >> >> I got so frustrated with it recently that I have decided to don't >> contribute with bhyve anymore, perhaps even with FreeBSD. >> I still have some people under mentorship that I intend to finish and then >> probably I will phase out. > Your failure to get reviews, and infact even abandon one that had > negative advice as to the validity of your suggested change and > committing it anyway is more likely the cause here. I will have to add  to the choir here: getting reviews is not mandatory and I hope they will never be. Reviewed code is likely to have less errors but sometimes we just need to get things done. Look, for example, the case of the automounting daemon amd(8), which we have been planning to remove for some years: your unfortunate intervention stopped it from getting removed from the system for how many months(?) stopping progress there altogether. Pedro. > You also committed code with no review at all that had to be reverted > after the bugs it caused were found by an external down stream consumers > of the bhyve code. > > You had code reverted by core due to a external attribution request, > which had you been attending the bi monthly bhyve calls you would of > known was an issue. > > I would suggest these are the reasons your feeling angry, and that > I infact tried to reach out to jhb to discuss some of these earlier > but that reach out was never returned. I under stand your frustration, > you are just wanting to do with best thing you can for the project > and bhyve, can we try to find a better resolution to this situation > than your exit? > >>> -- Ian >>> >>>> Leave it for now, I am sure jhb or thyco are fine with it, >>>> this is just a heads up FYI for future commits. >>>> >>>> Bhyve code has been and still is under a fairly tight >>>> MAINTAINER status. >>>> >>>>> Modified: >>>>> head/usr.sbin/bhyve/pci_emul.c >>>>> >>>>> Modified: head/usr.sbin/bhyve/pci_emul.c >>>>> =================================================================== >>>>> =========== >>>>> --- head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:27 2019 (r3 >>>>> 45170) >>>>> +++ head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:28 2019 (r3 >>>>> 45171) >>>>> @@ -953,7 +953,10 @@ pci_emul_add_pciecap(struct pci_devinst *pi, >>>>> int type) >>>>> bzero(&pciecap, sizeof(pciecap)); >>>>> >>>>> pciecap.capid = PCIY_EXPRESS; >>>>> - pciecap.pcie_capabilities = PCIECAP_VERSION | >>>>> PCIEM_TYPE_ROOT_PORT; >>>>> + pciecap.pcie_capabilities = PCIECAP_VERSION | type; >>>>> + /* Devices starting with version 1.1 must set the RBER bit */ >>>>> + if (PCIECAP_VERSION >= 1) >>>>> + pciecap.dev_capabilities = PCIEM_CAP_ROLE_ERR_RPT; >>>>> pciecap.link_capabilities = 0x411; /* gen1, x1 */ >>>>> pciecap.link_status = 0x11; /* gen1, x1 */ >>>>> >>>>> >>>>> >>>> >>> >>> >> -- >> >> -- >> Marcelo Araujo (__)araujo@FreeBSD.org >> \\\'',)http://www.FreeBSD.org \/ \ ^ >> Power To Server. .\. /_) From owner-svn-src-all@freebsd.org Fri Mar 15 16:22:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8B2B15256E6; Fri, 15 Mar 2019 16:22:17 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 316066F2D4; Fri, 15 Mar 2019 16:22:17 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-lj1-x22e.google.com with SMTP id t13so8475286lji.2; Fri, 15 Mar 2019 09:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=XcBp6JSc8/2lU4nydGaGcJMgBUSBtKKLN0b1y0ndYIA=; b=jCZE3mBV6V90HAGpVdRwe8GOsHCe+MLgXpgra1psovbqMcC0BV0wAwvLI1IujdHW5P sjj7ZPtbIyPhg964tj0fICRvl1+jIc/j32kST0mihoLFqqcdh1byd/nhfmdypu2P4a8Y lVjwr8hWfS0zPKsVK/Aqvl0iY0dLCei4+8JzjpvBQNLPBRvfvmDuljm4gZwv7QwbV/yu PYHgK05ZKvzKdpytYb4GY+UFhQFErxxTtFHTHLr3Mv1k80C4DIbyIfC9WUx8Lgl8Z2yy nI8wflhyny7i9FGX4Fo5y9mvl/0oM9Th099LpznDjguFoD3H8nZW7g9+gkWx68FCsXCL 0zWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=XcBp6JSc8/2lU4nydGaGcJMgBUSBtKKLN0b1y0ndYIA=; b=RCvUDdLG3617D4/f8U+GUcTJCnMctuvuZtluygtmqvjwKOWbfG9xqLjLB1i0eHngDu 28NJJ4SOchrgsYStKCKCvlVweHNIlW58C82w7EZEqRHpJQmxWTjMOEPctGVgodKsVBCX S6A6xpxyB/GGspYY0cxXD4e/on+EmA2dJzlF/ZGIJULQTARKe7MavtUvFMMiZqr69/+/ J4w4gUSyXYXYAMw/29fWitMKkfDcHsEbB6E2qG6IjpzyXh+CYZOAQY05rX6dJ2ZTgXfR lxHRl4hDttRaMbTa+zsYcxOdV0MxqGvxkjUHm4g5hydIiVKgZNkmDM2RSzQ6hG3RuFac nrbw== X-Gm-Message-State: APjAAAXee+syMnrqRn3x1YCjIjSlQjE6nRDxg0yCRCR990+LjBxA4uxq Szz9M9+yhh/ow/I3iYln335YQwXTxXzogUU7faeslUne X-Google-Smtp-Source: APXvYqxFpvukWHP81xLNpUpzZvUST4R5E0kA66cTJpNZujCtNPJ58+1iv2+TH0yOuU9XNlFXYRclpr08MOOyEBSU1oM= X-Received: by 2002:a2e:2c0d:: with SMTP id s13mr2843670ljs.96.1552666935322; Fri, 15 Mar 2019 09:22:15 -0700 (PDT) MIME-Version: 1.0 References: <201903151603.x2FG3pIp030819@gndrsh.dnsmgr.net> In-Reply-To: <201903151603.x2FG3pIp030819@gndrsh.dnsmgr.net> Reply-To: araujo@freebsd.org From: Marcelo Araujo Date: Sat, 16 Mar 2019 00:22:01 +0800 Message-ID: Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve To: "Rodney W. Grimes" Cc: Marcelo Araujo , Ian Lepore , Chuck Tuffli , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 316066F2D4 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.88 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.88)[-0.879,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 16:22:18 -0000 Em s=C3=A1b, 16 de mar de 2019 =C3=A0s 00:03, Rodney W. Grimes < freebsd@gndrsh.dnsmgr.net> escreveu: > > Em sex, 15 de mar de 2019 ?s 22:12, Ian Lepore > escreveu: > > > > > On Thu, 2019-03-14 at 19:31 -0700, Rodney W. Grimes wrote: > > > > > Author: chuck > > > > > Date: Fri Mar 15 02:11:28 2019 > > > > > New Revision: 345171 > > > > > URL: https://svnweb.freebsd.org/changeset/base/345171 > > > > > > > > > > Log: > > > > > Fix bhyve PCIe capability emulation > > > > > > > > > > PCIe devices starting with version 1.1 must set the Role-Based > > > > > Error > > > > > Reporting bit. > > > > > > > > > > And while we're in the neighborhood, generalize the code > > > > > assigning the > > > > > device type. > > > > > > > > > > Reviewed by: imp, araujo, rgrimes > > > > > Approved by: imp (mentor) > > > > > MFC after: 1 week > > > > > Differential Revision: https://reviews.freebsd.org/D19580 > > > > > > > > This code requires maintainer approval before a commit, > > > > though this was well reviewed that doesnt exclude it > > > > from the MAINTAINERS entry. > > > > > > > > > > Where exactly does it say that in MAINTAINERS? As another victim of > > > this sort of drive-by lynching after making a trivial bhyve change I > > > pretty seriously object to a vague and meaningless entry in MAINTAINE= RS > > > being used to pounce on anyone who dares to touch the precious bhyve > > > code. > > > > > > > There is a new entry on MAINTAINERS: > > https://svnweb.freebsd.org/base?view=3Drevision&revision=3D344631 > > > > > > > > > > There is no mention of bhyve in MAINTAINERS, for usr.sbin or elsewher= e. > > > There is an entry for vmm(4), which to me does not say anything about > > > bhyve, yet somehow everybody is supposed to know what it means and > > > what-all territory it covers? > > > > > > IMO, this sort of hyper-proprietary pouncing on everyone who dares > > > change a single line of code is not productive. It is HIGHLY de- > > > motivating. Large sweeping design changes are one thing, but pouncin= g > > > on every tiny minor commit is just not helpful. > > > > > > > +1 > > > > I got so frustrated with it recently that I have decided to don't > > contribute with bhyve anymore, perhaps even with FreeBSD. > > I still have some people under mentorship that I intend to finish and > then > > probably I will phase out. > > Your failure to get reviews, and infact even abandon one that had > negative advice as to the validity of your suggested change and > committing it anyway is more likely the cause here. > > You also committed code with no review at all that had to be reverted > after the bugs it caused were found by an external down stream consumers > of the bhyve code. > > You had code reverted by core due to a external attribution request, > which had you been attending the bi monthly bhyve calls you would of > known was an issue. > > I would suggest these are the reasons your feeling angry, and that > I infact tried to reach out to jhb to discuss some of these earlier > but that reach out was never returned. I under stand your frustration, > you are just wanting to do with best thing you can for the project > and bhyve, can we try to find a better resolution to this situation > than your exit? > > > > > -- Ian > > > > > > > Leave it for now, I am sure jhb or thyco are fine with it, > > > > this is just a heads up FYI for future commits. > > > > > > > > Bhyve code has been and still is under a fairly tight > > > > MAINTAINER status. > > > > > > > > > Modified: > > > > > head/usr.sbin/bhyve/pci_emul.c > > > > > > > > > > Modified: head/usr.sbin/bhyve/pci_emul.c > > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > > > --- head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:27 2019 > (r3 > > > > > 45170) > > > > > +++ head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:28 2019 > (r3 > > > > > 45171) > > > > > @@ -953,7 +953,10 @@ pci_emul_add_pciecap(struct pci_devinst *pi, > > > > > int type) > > > > > bzero(&pciecap, sizeof(pciecap)); > > > > > > > > > > pciecap.capid =3D PCIY_EXPRESS; > > > > > - pciecap.pcie_capabilities =3D PCIECAP_VERSION | > > > > > PCIEM_TYPE_ROOT_PORT; > > > > > + pciecap.pcie_capabilities =3D PCIECAP_VERSION | type; > > > > > + /* Devices starting with version 1.1 must set the RBER bit */ > > > > > + if (PCIECAP_VERSION >=3D 1) > > > > > + pciecap.dev_capabilities =3D PCIEM_CAP_ROLE_ERR_RPT; > > > > > pciecap.link_capabilities =3D 0x411; /* gen1, x1 */ > > > > > pciecap.link_status =3D 0x11; /* gen1, x1 */ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > -- > > Marcelo Araujo (__)araujo@FreeBSD.org > > \\\'',)http://www.FreeBSD.org \/ \ ^ > > Power To Server. .\. /_) > > -- > Rod Grimes > rgrimes@freebsd.org > Sorry Rod, I don't want to be rude, but even though I'm not a native English speaker, it hurts my eyes seeing the misspellings in your emails. And I have spent enough time in public and private trying to talk with you, I don't have this time anymore. So, I truly believe you should get the maintainership of bhyve as it seems you are the most capable person to do so. Wait, your previous mentor... well, I won't repeat his words! Good lucky with bhyve, as a suggestion, one feature that at least myself need is the capability to parse a configuration file and boot a guest vm. That would be amazing! Another feature that I want and I think the most important is: let people get involved and evolve bhyve code. Best, --=20 --=20 Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_) From owner-svn-src-all@freebsd.org Fri Mar 15 16:27:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C04871525B26; Fri, 15 Mar 2019 16:27:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6249B6F682; Fri, 15 Mar 2019 16:27:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 9FACE1D5F8; Fri, 15 Mar 2019 16:27:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve To: cem@freebsd.org, Andrew Thompson Cc: src-committers , svn-src-all , svn-src-head References: <201903150211.x2F2BSai079898@repo.freebsd.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <5adee283-2cac-14d2-ec06-bce43bf3bcde@FreeBSD.org> Date: Fri, 15 Mar 2019 09:27:49 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6249B6F682 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 16:27:52 -0000 On 3/14/19 10:24 PM, Conrad Meyer wrote: > On Thu, Mar 14, 2019 at 8:06 PM Andrew Thompson wrote: >> >> On Fri, 15 Mar 2019 at 15:11, Chuck Tuffli wrote: >>> bzero(&pciecap, sizeof(pciecap)); > ... >>> + pciecap.dev_capabilities = PCIEM_CAP_ROLE_ERR_RPT; >> >> If the message you say 'set the bit' but you are overwriting the whole variable, is this intended? > > Looks like it was zero before. So yeah, it sets the bit. It would probably be cleaner for future changes to make it a |=, but that's a tiny nit. style(9) wants a blank line before the comment as well. I hadn't approved it yet only because I hadn't gone and dug through my PCIe books / specs to see what this bit is and confirm it is required. OTOH, it's not clear to me that bhyve PCI-e devices don't want to just be 1.0a devices as a lowest common denominator to be as accommodating to as wide variety of OS's as possible. One thing I didn't see in a review was a reason for why to make this change? Does some OS reject devices without this bit set or is it just based on reading the spec? bhyve doesn't assert any PCI-e errors for virtual devices, so this bit is pretty meaningless. -- John Baldwin From owner-svn-src-all@freebsd.org Fri Mar 15 16:34:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 794C91525E40; Fri, 15 Mar 2019 16:34:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0ED306FB7C; Fri, 15 Mar 2019 16:34:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 5E0C01D708; Fri, 15 Mar 2019 16:34:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve From: John Baldwin To: cem@freebsd.org, Andrew Thompson Cc: src-committers , svn-src-all , svn-src-head References: <201903150211.x2F2BSai079898@repo.freebsd.org> <5adee283-2cac-14d2-ec06-bce43bf3bcde@FreeBSD.org> Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Fri, 15 Mar 2019 09:34:00 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: <5adee283-2cac-14d2-ec06-bce43bf3bcde@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 0ED306FB7C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.974,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 16:34:02 -0000 On 3/15/19 9:27 AM, John Baldwin wrote: > On 3/14/19 10:24 PM, Conrad Meyer wrote: >> On Thu, Mar 14, 2019 at 8:06 PM Andrew Thompson wrote: >>> >>> On Fri, 15 Mar 2019 at 15:11, Chuck Tuffli wrote: >>>> bzero(&pciecap, sizeof(pciecap)); >> ... >>>> + pciecap.dev_capabilities = PCIEM_CAP_ROLE_ERR_RPT; >>> >>> If the message you say 'set the bit' but you are overwriting the whole variable, is this intended? >> >> Looks like it was zero before. So yeah, it sets the bit. > > It would probably be cleaner for future changes to make it a |=, but that's a > tiny nit. style(9) wants a blank line before the comment as well. > > I hadn't approved it yet only because I hadn't gone and dug through my PCIe > books / specs to see what this bit is and confirm it is required. > > OTOH, it's not clear to me that bhyve PCI-e devices don't want to just be 1.0a > devices as a lowest common denominator to be as accommodating to as wide variety > of OS's as possible. > > One thing I didn't see in a review was a reason for why to make this change? > Does some OS reject devices without this bit set or is it just based on reading > the spec? bhyve doesn't assert any PCI-e errors for virtual devices, so > this bit is pretty meaningless. On the topic of a hard lock, the intention of "Review requested" is not to enforce a hard lock, but to request a heads up so that work can be coordinated. I think committing this was ok given other people ok'd the change, though I think I still I want some answers as to the "why" this is needed to think about if we actually want the change or not. -- John Baldwin From owner-svn-src-all@freebsd.org Fri Mar 15 16:39:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0330A1526000; Fri, 15 Mar 2019 16:39:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C4736FE10; Fri, 15 Mar 2019 16:39:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8ED7DCCF4; Fri, 15 Mar 2019 16:39:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FGd5Ad033003; Fri, 15 Mar 2019 16:39:05 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FGd57a033002; Fri, 15 Mar 2019 16:39:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903151639.x2FGd57a033002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 15 Mar 2019 16:39:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345189 - head/sys/x86/include X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/x86/include X-SVN-Commit-Revision: 345189 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9C4736FE10 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 16:39:06 -0000 Author: kib Date: Fri Mar 15 16:39:05 2019 New Revision: 345189 URL: https://svnweb.freebsd.org/changeset/base/345189 Log: Add symbolic name for TSC_AUX MSR address. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/x86/include/specialreg.h Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Fri Mar 15 16:16:50 2019 (r345188) +++ head/sys/x86/include/specialreg.h Fri Mar 15 16:39:05 2019 (r345189) @@ -1044,6 +1044,7 @@ #define MSR_FSBASE 0xc0000100 /* base address of the %fs "segment" */ #define MSR_GSBASE 0xc0000101 /* base address of the %gs "segment" */ #define MSR_KGSBASE 0xc0000102 /* base address of the kernel %gs */ +#define MSR_TSC_AUX 0xc0000103 #define MSR_PERFEVSEL0 0xc0010000 #define MSR_PERFEVSEL1 0xc0010001 #define MSR_PERFEVSEL2 0xc0010002 From owner-svn-src-all@freebsd.org Fri Mar 15 16:41:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AD0E15260BD; Fri, 15 Mar 2019 16:41:04 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 052526FFEF; Fri, 15 Mar 2019 16:41:03 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2FGf1Aq031001; Fri, 15 Mar 2019 09:41:01 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2FGf19e031000; Fri, 15 Mar 2019 09:41:01 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903151641.x2FGf19e031000@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve In-Reply-To: To: araujo@freebsd.org Date: Fri, 15 Mar 2019 09:41:01 -0700 (PDT) CC: "Rodney W. Grimes" , Ian Lepore , Chuck Tuffli , src-committers , svn-src-all , svn-src-head 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-Rspamd-Queue-Id: 052526FFEF X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 16:41:04 -0000 > Em s?b, 16 de mar de 2019 ?s 00:03, Rodney W. Grimes < > freebsd@gndrsh.dnsmgr.net> escreveu: > > > > Em sex, 15 de mar de 2019 ?s 22:12, Ian Lepore > > escreveu: > > > > > > > On Thu, 2019-03-14 at 19:31 -0700, Rodney W. Grimes wrote: > > > > > > Author: chuck > > > > > > Date: Fri Mar 15 02:11:28 2019 > > > > > > New Revision: 345171 > > > > > > URL: https://svnweb.freebsd.org/changeset/base/345171 > > > > > > > > > > > > Log: > > > > > > Fix bhyve PCIe capability emulation > > > > > > > > > > > > PCIe devices starting with version 1.1 must set the Role-Based > > > > > > Error > > > > > > Reporting bit. > > > > > > > > > > > > And while we're in the neighborhood, generalize the code > > > > > > assigning the > > > > > > device type. > > > > > > > > > > > > Reviewed by: imp, araujo, rgrimes > > > > > > Approved by: imp (mentor) > > > > > > MFC after: 1 week > > > > > > Differential Revision: https://reviews.freebsd.org/D19580 > > > > > > > > > > This code requires maintainer approval before a commit, > > > > > though this was well reviewed that doesnt exclude it > > > > > from the MAINTAINERS entry. > > > > > > > > > > > > > Where exactly does it say that in MAINTAINERS? As another victim of > > > > this sort of drive-by lynching after making a trivial bhyve change I > > > > pretty seriously object to a vague and meaningless entry in MAINTAINERS > > > > being used to pounce on anyone who dares to touch the precious bhyve > > > > code. > > > > > > > > > > There is a new entry on MAINTAINERS: > > > https://svnweb.freebsd.org/base?view=revision&revision=344631 > > > > > > > > > > > > > > There is no mention of bhyve in MAINTAINERS, for usr.sbin or elsewhere. > > > > There is an entry for vmm(4), which to me does not say anything about > > > > bhyve, yet somehow everybody is supposed to know what it means and > > > > what-all territory it covers? > > > > > > > > IMO, this sort of hyper-proprietary pouncing on everyone who dares > > > > change a single line of code is not productive. It is HIGHLY de- > > > > motivating. Large sweeping design changes are one thing, but pouncing > > > > on every tiny minor commit is just not helpful. > > > > > > > > > > +1 > > > > > > I got so frustrated with it recently that I have decided to don't > > > contribute with bhyve anymore, perhaps even with FreeBSD. > > > I still have some people under mentorship that I intend to finish and > > then > > > probably I will phase out. > > > > Your failure to get reviews, and infact even abandon one that had > > negative advice as to the validity of your suggested change and > > committing it anyway is more likely the cause here. > > > > You also committed code with no review at all that had to be reverted > > after the bugs it caused were found by an external down stream consumers > > of the bhyve code. > > > > You had code reverted by core due to a external attribution request, > > which had you been attending the bi monthly bhyve calls you would of > > known was an issue. > > > > I would suggest these are the reasons your feeling angry, and that > > I infact tried to reach out to jhb to discuss some of these earlier > > but that reach out was never returned. I under stand your frustration, > > you are just wanting to do with best thing you can for the project > > and bhyve, can we try to find a better resolution to this situation > > than your exit? > > > > > > > > > > > > -- Ian > > > > > > > > > Leave it for now, I am sure jhb or thyco are fine with it, > > > > > this is just a heads up FYI for future commits. > > > > > > > > > > Bhyve code has been and still is under a fairly tight > > > > > MAINTAINER status. > > > > > > > > > > > Modified: > > > > > > head/usr.sbin/bhyve/pci_emul.c > > > > > > > > > > > > Modified: head/usr.sbin/bhyve/pci_emul.c > > > > > > =================================================================== > > > > > > =========== > > > > > > --- head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:27 2019 > > (r3 > > > > > > 45170) > > > > > > +++ head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:28 2019 > > (r3 > > > > > > 45171) > > > > > > @@ -953,7 +953,10 @@ pci_emul_add_pciecap(struct pci_devinst *pi, > > > > > > int type) > > > > > > bzero(&pciecap, sizeof(pciecap)); > > > > > > > > > > > > pciecap.capid = PCIY_EXPRESS; > > > > > > - pciecap.pcie_capabilities = PCIECAP_VERSION | > > > > > > PCIEM_TYPE_ROOT_PORT; > > > > > > + pciecap.pcie_capabilities = PCIECAP_VERSION | type; > > > > > > + /* Devices starting with version 1.1 must set the RBER bit */ > > > > > > + if (PCIECAP_VERSION >= 1) > > > > > > + pciecap.dev_capabilities = PCIEM_CAP_ROLE_ERR_RPT; > > > > > > pciecap.link_capabilities = 0x411; /* gen1, x1 */ > > > > > > pciecap.link_status = 0x11; /* gen1, x1 */ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > -- > > > Marcelo Araujo (__)araujo@FreeBSD.org > > > \\\'',)http://www.FreeBSD.org \/ \ ^ > > > Power To Server. .\. /_) > > > > -- > > Rod Grimes > > rgrimes@freebsd.org > > > > Sorry Rod, I don't want to be rude, but even though I'm not a native > English speaker, it hurts my eyes seeing the misspellings in your emails. I need to bring back ispell, your right, I am a horrid speller, and your also right, that does make it very hard for a non native speaker to read my email some times. > And I have spent enough time in public and private trying to talk with you, > I don't have this time anymore. So, I truly believe you should get the > maintainership of bhyve as it seems you are the most capable person to do > so. Wait, your previous mentor... well, I won't repeat his words! I do not want or desire in any way to be the maintainer of bhyve, infact when Peter Grehan suggested I make myself maintaner over the vmrun.sh script after I cleaned it up, I replied, no thanks. > Good lucky with bhyve, as a suggestion, one feature that at least myself > need is the capability to parse a configuration file and boot a guest vm. > That would be amazing! I believe there are 2 or 3 port implementations of this, and the developement group, as you are well aware, has spoken about this very issue several times. Much of that was being driven by you, with input from the group. > Another feature that I want and I think the most important is: let people > get involved and evolve bhyve code. Who is stopping anyone from becoming involved? The only stopping I see occuring with respect to you directly, is buggy code getting in the tree. I am sorry that you can not seem to understand the feedback in reviews is nothing personal in anyway, and that people are addressing bugs in the code and giving ressons that it should be changed. You take issue with that feedback and it seems to take an effort to convince you that your code is wrong and needs changed. And that is not only my feedback that you have ignored, that appears to be the case with most feedback. I am/was actively working with Patrick Mooney of Joyent to bring back there changes to FreeBSD, and to make sure changes I was working on can transparently port to Illumos. There is now mutual co-operation between the 2 projects, jhb and myself have both been asked to took at Joyent changes in review and give feedback there, and Patrick is activley participating in the FreeBSD phabricator reviews. I have enumerated all phab reviews I could find and enumerated those in the meeting so that we can discuss them and poll the respective parties to try and get that code moved forward, in that process I have gotten atleast one more person involved in my work on removing the constant VM_MAXCPUS and attributed him with a very early version of the patch. > Marcelo Araujo (__)araujo@FreeBSD.org -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 15 16:43:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 820041526389; Fri, 15 Mar 2019 16:43:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 24F5F70476; Fri, 15 Mar 2019 16:43:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 18857CE9D; Fri, 15 Mar 2019 16:43:29 +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 x2FGhS4U037957; Fri, 15 Mar 2019 16:43:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FGhSKT037956; Fri, 15 Mar 2019 16:43:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903151643.x2FGhSKT037956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 15 Mar 2019 16:43:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345190 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 X-SVN-Commit-Revision: 345190 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 24F5F70476 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 16:43:29 -0000 Author: kib Date: Fri Mar 15 16:43:28 2019 New Revision: 345190 URL: https://svnweb.freebsd.org/changeset/base/345190 Log: Provide deterministic (and somewhat useful) value for RDPID result, and for %ecx after RDTSCP. Initialize TSC_AUX MSR with CPUID. It allows for userspace to cheaply identify CPU it was executed on some time ago, which is sometimes useful. Note: The values returned might be changed in future. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/initcpu.c head/sys/i386/i386/initcpu.c Modified: head/sys/amd64/amd64/initcpu.c ============================================================================== --- head/sys/amd64/amd64/initcpu.c Fri Mar 15 16:39:05 2019 (r345189) +++ head/sys/amd64/amd64/initcpu.c Fri Mar 15 16:43:28 2019 (r345190) @@ -265,6 +265,10 @@ initializecpu(void) init_via(); break; } + + if ((amd_feature & AMDID_RDTSCP) != 0 || + (cpu_stdext_feature2 & CPUID_STDEXT2_RDPID) != 0) + wrmsr(MSR_TSC_AUX, PCPU_GET(cpuid)); } void Modified: head/sys/i386/i386/initcpu.c ============================================================================== --- head/sys/i386/i386/initcpu.c Fri Mar 15 16:39:05 2019 (r345189) +++ head/sys/i386/i386/initcpu.c Fri Mar 15 16:43:28 2019 (r345190) @@ -749,6 +749,9 @@ initializecpu(void) msr = rdmsr(MSR_EFER) | EFER_NXE; wrmsr(MSR_EFER, msr); } + if ((amd_feature & AMDID_RDTSCP) != 0 || + (cpu_stdext_feature2 & CPUID_STDEXT2_RDPID) != 0) + wrmsr(MSR_TSC_AUX, PCPU_GET(cpuid)); } void From owner-svn-src-all@freebsd.org Fri Mar 15 17:01:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 333711526A96; Fri, 15 Mar 2019 17:01:38 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 A396270F0F; Fri, 15 Mar 2019 17:01:37 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2FH1WrH031130; Fri, 15 Mar 2019 10:01:32 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2FH1WWG031129; Fri, 15 Mar 2019 10:01:32 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903151701.x2FH1WWG031129@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345138 - head/share/man/man9 In-Reply-To: <3317.1552634192@critter.freebsd.dk> To: Poul-Henning Kamp Date: Fri, 15 Mar 2019 10:01:32 -0700 (PDT) CC: rgrimes@freebsd.org, "Rodney W. Grimes" , Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: A396270F0F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 17:01:38 -0000 > -------- > In message <201903150152.x2F1q34w027789@gndrsh.dnsmgr.net>, "Rodney W. Grimes" > writes: > > >> The first versions of CTM used diff -e and ed(1) to transmit changes, > >> and that choked up on binary files. We didn't have patch in the > >> tree back then. > > >patch has always been in the tree. > >https://github.com/sergev/4.4BSD-Lite2/tree/master/usr/src/usr.bin/patch > > Yes, in *that* tree, but it was not always in *our* tree, particularly > not in the strange time between 1.1.5.1 and 2.0. I would have to go find the 4.4BSD-Lite2_import.sh script, but I would of either imported the one from 4.4, or I would of imported the gnu one into gnu/. > Trust me: if it had been, I would not have used diff-e+ed(1) It would of been pretty impossible to live without patch at that time so I doubt very much that the respository had it missing for more than a day or three, there was the time period from the import of 4.4 to the completion of the 2.0 ncvs repository, though that was only days, the there was the lag while we waited for Greenman/Dyson to fix the missing bits and to get make world running again, but after that we would of had the same patch we had in 1.x as that is external code and uneffected by the lawsuit. > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 15 17:04:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15E9A1526F8C; Fri, 15 Mar 2019 17:04:34 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 8A38E71488; Fri, 15 Mar 2019 17:04:33 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2FH4V0U031150; Fri, 15 Mar 2019 10:04:31 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2FH4URq031149; Fri, 15 Mar 2019 10:04:30 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903151704.x2FH4URq031149@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345151 - head/sys/net In-Reply-To: <51089C2A-A135-445E-B733-02654C5F8B68@lists.zabbadoz.net> To: "Bjoern A. Zeeb" Date: Fri, 15 Mar 2019 10:04:30 -0700 (PDT) CC: Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 8A38E71488 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.93)[-0.926,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 17:04:34 -0000 > On 14 Mar 2019, at 19:48, Kyle Evans wrote: > > > Author: kevans > > Date: Thu Mar 14 19:48:43 2019 > > New Revision: 345151 > > URL: https://svnweb.freebsd.org/changeset/base/345151 > > > > Log: > > ether_fakeaddr: Use 'b' 's' 'd' for the prefix > > > > This has the advantage of being obvious to sniff out the designated > > prefix > > by eye and it has all the right bits set. Comment stolen from ffec. > > > > I've removed bryanv@'s pending question of using the FreeBSD OUI > > range -- > > no one has followed up on this with a definitive action, and there's > > no > > particular reason to shoot for it and the administrative overhead > > that comes > > with deciding exactly how to use it. > > Yay. iflib_gen_mac() has already thought kind-of similar and just took > the entire(?) FreeBSD space for doing the same. That code should be > merged as well. > > Bhyve is using a good chunk from the FreeBSD allocation; see > sys/net/ieee_oui.h also for allocation guidelines (if I don?t > misremember). > > The fact that it might need figuring out should not prevent us from > doing it right .. the third time .. maybe .. this time? > > epair(4) is yet another one of the cloned interfaces which does magic > for the ethernet addresses, not sure what else. Yes yes yes please! Can we get the OUI assigning code collapsed to one place, though it well need to come in dependent on a complex set of options, or perhaps just INET and/or INET6 should drag it in. Thanks to anyone that does this work! > /bz -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 15 17:07:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A6BD15271A3 for ; Fri, 15 Mar 2019 17:07:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A800717A9 for ; Fri, 15 Mar 2019 17:07:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72c.google.com with SMTP id k130so5944449qke.3 for ; Fri, 15 Mar 2019 10:07:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=N8scpET9Kw5o4pdF8nVjMr6w0TX6wL42UMwhjDdQ/bQ=; b=2ENTcAaWkWqRKhxJYWXBIWBq3ew8lY/5PNPWknu3XXx9R9frb2ZIGSF6FwJYwKw1qb ntPtPBdrQK+4+0pAKbzm5D7UxclqjoUOpu7VwlWwM5mW3eDfqBM8l3iLMlWS0B9GHm1m k6/5A5A2JdvLo11jfpgsnTmIS3tMEKQcwZgWePo0Fk4ON4tRsH6Z0d8S6taJrByOiGNV +n8yokAjrWqriuJsKQxGazgsIUJ4Cqjka5lG6SL9zZa6aQl2Kt4NtAylphPHjsVW5FOf icYtAZaB7x7tBjNvhlS02kknDHQLrHS8AgvizkpbySpR7m/5KqFE+ClF4VgClweeABg6 antg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=N8scpET9Kw5o4pdF8nVjMr6w0TX6wL42UMwhjDdQ/bQ=; b=X3pmOA33pLns7FKtnpcf/mowSvlIqcBgB231TMXmLLMY2g2+OE3ssq80aZxrprh8Kx B5L5+RHQxo9ejoBbLR44LwGAet9UJUbM1BpnGW1JhOXvb626Z+PcatKvwedRIS6iuL/r /ZUUeHggiHTDO4zzE4Mk/7K1ieNleX0Bz9hAdCmAsjl21JHGXcdpk/6eIT1ZnMBllhKQ BrvTTy3uAG9ZiMF1exX1Q8+z5HgnLXmGuJ5nK7H0kRXdR/h7R7iW8vC4ywMpm4Gnpz5B yVBGfm6os9/F9l+1ayJQMkC9cgUgOZXorzoGMAJ0nYh880t7Ghfg+yMT6aNoBQT4TVW1 4efA== X-Gm-Message-State: APjAAAVgNcf4RZHfN7qKbjJ3vGUSatWGGRHfubVMVBWBMXyQVRBHSq+e mpNq5bmCG/Ss94Ljb2vGsTZGgJiO2EU+4Iq3BwWlHw== X-Google-Smtp-Source: APXvYqwMXDVXN8MQre1nni6T9PW9L6Kc6t7BXaGkRQcru4Y+SSfXThX2Z188LmDjELwIGGCRJ9dun3AFrr+k40cJD3A= X-Received: by 2002:a37:6fc2:: with SMTP id k185mr3693142qkc.175.1552669657382; Fri, 15 Mar 2019 10:07:37 -0700 (PDT) MIME-Version: 1.0 References: <201903151556.x2FFuAA4030779@gndrsh.dnsmgr.net> In-Reply-To: <201903151556.x2FFuAA4030779@gndrsh.dnsmgr.net> From: Warner Losh Date: Fri, 15 Mar 2019 11:07:26 -0600 Message-ID: Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve To: "Rodney W. Grimes" Cc: Chuck Tuffli , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 3A800717A9 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.980,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 17:07:38 -0000 On Fri, Mar 15, 2019 at 9:56 AM Rodney W. Grimes wrote: > > On Thu, Mar 14, 2019 at 8:32 PM Rodney W. Grimes < > freebsd@gndrsh.dnsmgr.net> > > wrote: > > > > > > Author: chuck > > > > Date: Fri Mar 15 02:11:28 2019 > > > > New Revision: 345171 > > > > URL: https://svnweb.freebsd.org/changeset/base/345171 > > > > > > > > Log: > > > > Fix bhyve PCIe capability emulation > > > > > > > > PCIe devices starting with version 1.1 must set the Role-Based > Error > > > > Reporting bit. > > > > > > > > And while we're in the neighborhood, generalize the code assigning > the > > > > device type. > > > > > > > > Reviewed by: imp, araujo, rgrimes > > > > Approved by: imp (mentor) > > > > MFC after: 1 week > > > > Differential Revision: https://reviews.freebsd.org/D19580 > > > > > > This code requires maintainer approval before a commit, > > > though this was well reviewed that doesnt exclude it > > > from the MAINTAINERS entry. > > > > > > Leave it for now, I am sure jhb or thyco are fine with it, > > > this is just a heads up FYI for future commits. > > > > > > Bhyve code has been and still is under a fairly tight > > > MAINTAINER status. > > > > > > > There is no such thing as a hard lock in FreeBSD. This sounds like you > are > > advocating for that, but that's not the case. > > > > Stop this stupid nitpicking for single line commits. We don't have that > > culture any more and it's really pissing a lot of people off. > > > > The MAINTAINERS file even says this: > > > > Please note that the content of this file is strictly advisory. > > > > And the entry for bhyve doesn't say things are mandatory, just requested. > > > > Jumping on people's case like this, for a review you yourself were on and > > approved but made no mention of seeking further review / approval, is > > demotivating and toxic. Please stop. > > I explicitly DID add jhb to the review. > I also explicitly did not mark the bhyve# box that is added by > the hearald rules. > > I did not jump on him, I informed him of the entry, and told him to leave > it. > You how ever have infact jumped on me, repeatedly, if you want to talk > about > discouraging tones of behavior I suggest you look at yourself as well. > Weird that so many other people in the thread read it the same way that I did, and not only this time. That suggests that you're not aware that your behavior is annoying others, which I contend is a problem that needs looking into. As always, I'm open to constructive, actionable feedback about my actions. Warner > > Warner > > > > > head/usr.sbin/bhyve/pci_emul.c > > > > > > > > Modified: head/usr.sbin/bhyve/pci_emul.c > > > > > > > > ============================================================================== > > > > --- head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:27 2019 > > > (r345170) > > > > +++ head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:28 2019 > > > (r345171) > > > > @@ -953,7 +953,10 @@ pci_emul_add_pciecap(struct pci_devinst *pi, int > > > type) > > > > bzero(&pciecap, sizeof(pciecap)); > > > > > > > > pciecap.capid = PCIY_EXPRESS; > > > > - pciecap.pcie_capabilities = PCIECAP_VERSION | > PCIEM_TYPE_ROOT_PORT; > > > > + pciecap.pcie_capabilities = PCIECAP_VERSION | type; > > > > + /* Devices starting with version 1.1 must set the RBER bit */ > > > > + if (PCIECAP_VERSION >= 1) > > > > + pciecap.dev_capabilities = PCIEM_CAP_ROLE_ERR_RPT; > > > > pciecap.link_capabilities = 0x411; /* gen1, x1 */ > > > > pciecap.link_status = 0x11; /* gen1, x1 */ > > > > > > > > > > > > > > > > > > -- > > > Rod Grimes > > > rgrimes@freebsd.org > > > > > > > > -- > Rod Grimes > rgrimes@freebsd.org > From owner-svn-src-all@freebsd.org Fri Mar 15 17:11:30 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25C1215272F7; Fri, 15 Mar 2019 17:11:30 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDCF371B10; Fri, 15 Mar 2019 17:11:29 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 6F00D1DA50; Fri, 15 Mar 2019 17:11:29 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf1-f51.google.com with SMTP id h6so7390240lfc.2; Fri, 15 Mar 2019 10:11:29 -0700 (PDT) X-Gm-Message-State: APjAAAV8zYXRcrpz/+3UcG9RLdxZwBs0GbFEE7LWyIA2FXn9YZDR8msM ycU9giz8j/8guLZ9+qqOZ1KuQOTEWlsQsvmHEC0= X-Google-Smtp-Source: APXvYqw1RNbdjt5XoeeUlkNQJgnHw2XfcRvT7q2vbP8SrUAzhM4FBr9xKOYApTBe0WLMZKXLlHQJMeaEOhzgmiz/W7I= X-Received: by 2002:ac2:424e:: with SMTP id m14mr541859lfl.4.1552669887873; Fri, 15 Mar 2019 10:11:27 -0700 (PDT) MIME-Version: 1.0 References: <51089C2A-A135-445E-B733-02654C5F8B68@lists.zabbadoz.net> <201903151704.x2FH4URq031149@gndrsh.dnsmgr.net> In-Reply-To: <201903151704.x2FH4URq031149@gndrsh.dnsmgr.net> From: Kyle Evans Date: Fri, 15 Mar 2019 12:11:14 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r345151 - head/sys/net To: "Rodney W. Grimes" Cc: "Bjoern A. Zeeb" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: BDCF371B10 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 17:11:30 -0000 On Fri, Mar 15, 2019 at 12:04 PM Rodney W. Grimes wrote: > > > On 14 Mar 2019, at 19:48, Kyle Evans wrote: > > > > > Author: kevans > > > Date: Thu Mar 14 19:48:43 2019 > > > New Revision: 345151 > > > URL: https://svnweb.freebsd.org/changeset/base/345151 > > > > > > Log: > > > ether_fakeaddr: Use 'b' 's' 'd' for the prefix > > > > > > This has the advantage of being obvious to sniff out the designated > > > prefix > > > by eye and it has all the right bits set. Comment stolen from ffec. > > > > > > I've removed bryanv@'s pending question of using the FreeBSD OUI > > > range -- > > > no one has followed up on this with a definitive action, and there's > > > no > > > particular reason to shoot for it and the administrative overhead > > > that comes > > > with deciding exactly how to use it. > > > > Yay. iflib_gen_mac() has already thought kind-of similar and just took > > the entire(?) FreeBSD space for doing the same. That code should be > > merged as well. > > > > Bhyve is using a good chunk from the FreeBSD allocation; see > > sys/net/ieee_oui.h also for allocation guidelines (if I don?t > > misremember). > > > > The fact that it might need figuring out should not prevent us from > > doing it right .. the third time .. maybe .. this time? > > > > epair(4) is yet another one of the cloned interfaces which does magic > > for the ethernet addresses, not sure what else. > > Yes yes yes please! Can we get the OUI assigning code collapsed to > one place, though it well need to come in dependent on a complex set > of options, or perhaps just INET and/or INET6 should drag it in. > For you and anyone else that wants to participate, I opened up https://reviews.freebsd.org/D19587 for this effort last night-ish to hash out the details. Thanks, Kyle Evans From owner-svn-src-all@freebsd.org Fri Mar 15 17:13:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 603881527515; Fri, 15 Mar 2019 17:13:06 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F1EA071D69; Fri, 15 Mar 2019 17:13:05 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E4B91D3DC; Fri, 15 Mar 2019 17:13:05 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FHD5Jp054039; Fri, 15 Mar 2019 17:13:05 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FHD5sk054038; Fri, 15 Mar 2019 17:13:05 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201903151713.x2FHD5sk054038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 15 Mar 2019 17:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345192 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 345192 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F1EA071D69 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 17:13:06 -0000 Author: kevans Date: Fri Mar 15 17:13:05 2019 New Revision: 345192 URL: https://svnweb.freebsd.org/changeset/base/345192 Log: if_bridge(4): Drop pointless rtflush At this point, all routes should've already been dropped by removing all members from the bridge. This condition is in-fact KASSERT'd in the line immediately above where this nop flush was added. Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Fri Mar 15 17:04:33 2019 (r345191) +++ head/sys/net/if_bridge.c Fri Mar 15 17:13:05 2019 (r345192) @@ -2449,6 +2449,22 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) } \ m->m_pkthdr.rcvif = iface; \ BRIDGE_UNLOCK(sc); \ + /* \ + * These mbufs will not have another chance to get sent \ + * to bpf elsewhere in the stack as being received \ + * by this interface, because they are coming in over \ + * the bridge. They likely have been accounted for \ + * when received by the interface that they came from, \ + * but this is not enough for other consumers, \ + * e.g. dhclient, to be satisfied. \ + * \ + * rcvif needs to be set on the mbuf here, lest we risk \ + * losing the mbuf as a "duplicate" because it's \ + * considered outgoing by bpf. \ + */ \ + if ((iface)->if_type != IFT_BRIDGE && \ + (iface)->if_bpf != NULL && (iface) != (ifp)) \ + ETHER_BPF_MTAP(iface, m); \ return (m); \ } \ \ @@ -2890,7 +2906,6 @@ bridge_rtable_fini(struct bridge_softc *sc) KASSERT(sc->sc_brtcnt == 0, ("%s: %d bridge routes referenced", __func__, sc->sc_brtcnt)); - bridge_rtflush(sc, 1); free(sc->sc_rthash, M_DEVBUF); } From owner-svn-src-all@freebsd.org Fri Mar 15 17:14:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 097B515275B3; Fri, 15 Mar 2019 17:14:25 +0000 (UTC) (envelope-from SRS0=j4N9=RS=vega.codepro.be=kp@codepro.be) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B97D71ED5; Fri, 15 Mar 2019 17:14:24 +0000 (UTC) (envelope-from SRS0=j4N9=RS=vega.codepro.be=kp@codepro.be) Received: from vega.codepro.be (unknown [172.16.1.3]) by venus.codepro.be (Postfix) with ESMTP id 28FA633679; Fri, 15 Mar 2019 18:14:22 +0100 (CET) Received: by vega.codepro.be (Postfix, from userid 1001) id 25D242248C; Fri, 15 Mar 2019 18:14:22 +0100 (CET) Date: Fri, 15 Mar 2019 18:14:22 +0100 From: Kristof Provost To: Kyle Evans Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r345192 - head/sys/net Message-ID: <20190315171421.GD7163@vega.codepro.be> References: <201903151713.x2FHD5sk054038@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201903151713.x2FHD5sk054038@repo.freebsd.org> X-Checked-By-NSA: Probably User-Agent: Mutt/1.11.2 (2019-01-07) X-Rspamd-Queue-Id: 9B97D71ED5 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.978,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 17:14:25 -0000 On 2019-03-15 17:13:05 (+0000), Kyle Evans wrote: > Author: kevans > Date: Fri Mar 15 17:13:05 2019 > New Revision: 345192 > URL: https://svnweb.freebsd.org/changeset/base/345192 > > Log: > if_bridge(4): Drop pointless rtflush > > At this point, all routes should've already been dropped by removing all > members from the bridge. This condition is in-fact KASSERT'd in the line > immediately above where this nop flush was added. > > Modified: > head/sys/net/if_bridge.c > > Modified: head/sys/net/if_bridge.c > ============================================================================== > --- head/sys/net/if_bridge.c Fri Mar 15 17:04:33 2019 (r345191) > +++ head/sys/net/if_bridge.c Fri Mar 15 17:13:05 2019 (r345192) > @@ -2449,6 +2449,22 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) > } \ > m->m_pkthdr.rcvif = iface; \ > BRIDGE_UNLOCK(sc); \ > + /* \ > + * These mbufs will not have another chance to get sent \ > + * to bpf elsewhere in the stack as being received \ > + * by this interface, because they are coming in over \ > + * the bridge. They likely have been accounted for \ > + * when received by the interface that they came from, \ > + * but this is not enough for other consumers, \ > + * e.g. dhclient, to be satisfied. \ > + * \ > + * rcvif needs to be set on the mbuf here, lest we risk \ > + * losing the mbuf as a "duplicate" because it's \ > + * considered outgoing by bpf. \ > + */ \ > + if ((iface)->if_type != IFT_BRIDGE && \ > + (iface)->if_bpf != NULL && (iface) != (ifp)) \ > + ETHER_BPF_MTAP(iface, m); \ I think you didn't intend to commit this yet. Regards, Kristof From owner-svn-src-all@freebsd.org Fri Mar 15 17:16:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 422B71527745; Fri, 15 Mar 2019 17:16:47 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D9E43720B1; Fri, 15 Mar 2019 17:16:46 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 734801DB60; Fri, 15 Mar 2019 17:16:46 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lj1-f178.google.com with SMTP id y9so8339931ljk.6; Fri, 15 Mar 2019 10:16:46 -0700 (PDT) X-Gm-Message-State: APjAAAUuCvsEEZdzBsJ7zeNdwvkwno1OtNBz9d7IJ5JyS8TVjYX1tpGz yJxtpyUk74BaJJ2xUGXOkYFsjoQHpVc6pCDc5zU= X-Google-Smtp-Source: APXvYqxtuQUVM/2H+0b+xJYBzmQ9Jt9vHdpZXwj4+p7+BqJhFIoEONHf2iPwUl8LVP74vbYYUmPCmCZmsBriE6gia/c= X-Received: by 2002:a2e:9bd5:: with SMTP id w21mr2836492ljj.66.1552670204998; Fri, 15 Mar 2019 10:16:44 -0700 (PDT) MIME-Version: 1.0 References: <201903151713.x2FHD5sk054038@repo.freebsd.org> <20190315171421.GD7163@vega.codepro.be> In-Reply-To: <20190315171421.GD7163@vega.codepro.be> From: Kyle Evans Date: Fri, 15 Mar 2019 12:16:32 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r345192 - head/sys/net To: Kristof Provost Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: D9E43720B1 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.984,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 17:16:47 -0000 On Fri, Mar 15, 2019 at 12:14 PM Kristof Provost wrote: > > On 2019-03-15 17:13:05 (+0000), Kyle Evans wrote: > > Author: kevans > > Date: Fri Mar 15 17:13:05 2019 > > New Revision: 345192 > > URL: https://svnweb.freebsd.org/changeset/base/345192 > > > > Log: > > if_bridge(4): Drop pointless rtflush > > > > At this point, all routes should've already been dropped by removing all > > members from the bridge. This condition is in-fact KASSERT'd in the line > > immediately above where this nop flush was added. > > > > Modified: > > head/sys/net/if_bridge.c > > > > Modified: head/sys/net/if_bridge.c > > ============================================================================== > > --- head/sys/net/if_bridge.c Fri Mar 15 17:04:33 2019 (r345191) > > +++ head/sys/net/if_bridge.c Fri Mar 15 17:13:05 2019 (r345192) > > @@ -2449,6 +2449,22 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) > > } \ > > m->m_pkthdr.rcvif = iface; \ > > BRIDGE_UNLOCK(sc); \ > > + /* \ > > + * These mbufs will not have another chance to get sent \ > > + * to bpf elsewhere in the stack as being received \ > > + * by this interface, because they are coming in over \ > > + * the bridge. They likely have been accounted for \ > > + * when received by the interface that they came from, \ > > + * but this is not enough for other consumers, \ > > + * e.g. dhclient, to be satisfied. \ > > + * \ > > + * rcvif needs to be set on the mbuf here, lest we risk \ > > + * losing the mbuf as a "duplicate" because it's \ > > + * considered outgoing by bpf. \ > > + */ \ > > + if ((iface)->if_type != IFT_BRIDGE && \ > > + (iface)->if_bpf != NULL && (iface) != (ifp)) \ > > + ETHER_BPF_MTAP(iface, m); \ > > I think you didn't intend to commit this yet. > *sigh* wrong tree. =( From owner-svn-src-all@freebsd.org Fri Mar 15 17:18:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 342201527889; Fri, 15 Mar 2019 17:18:20 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CB34072264; Fri, 15 Mar 2019 17:18:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD421D3E5; Fri, 15 Mar 2019 17:18:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FHIJxJ054303; Fri, 15 Mar 2019 17:18:19 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FHIJng054302; Fri, 15 Mar 2019 17:18:19 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201903151718.x2FHIJng054302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 15 Mar 2019 17:18:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345193 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 345193 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CB34072264 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 17:18:20 -0000 Author: kevans Date: Fri Mar 15 17:18:19 2019 New Revision: 345193 URL: https://svnweb.freebsd.org/changeset/base/345193 Log: Revert r345192: Too many trees in play for bridge(4) bits An accidental appendage was committed that has not undergone review yet. Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Fri Mar 15 17:13:05 2019 (r345192) +++ head/sys/net/if_bridge.c Fri Mar 15 17:18:19 2019 (r345193) @@ -2449,22 +2449,6 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) } \ m->m_pkthdr.rcvif = iface; \ BRIDGE_UNLOCK(sc); \ - /* \ - * These mbufs will not have another chance to get sent \ - * to bpf elsewhere in the stack as being received \ - * by this interface, because they are coming in over \ - * the bridge. They likely have been accounted for \ - * when received by the interface that they came from, \ - * but this is not enough for other consumers, \ - * e.g. dhclient, to be satisfied. \ - * \ - * rcvif needs to be set on the mbuf here, lest we risk \ - * losing the mbuf as a "duplicate" because it's \ - * considered outgoing by bpf. \ - */ \ - if ((iface)->if_type != IFT_BRIDGE && \ - (iface)->if_bpf != NULL && (iface) != (ifp)) \ - ETHER_BPF_MTAP(iface, m); \ return (m); \ } \ \ @@ -2906,6 +2890,7 @@ bridge_rtable_fini(struct bridge_softc *sc) KASSERT(sc->sc_brtcnt == 0, ("%s: %d bridge routes referenced", __func__, sc->sc_brtcnt)); + bridge_rtflush(sc, 1); free(sc->sc_rthash, M_DEVBUF); } From owner-svn-src-all@freebsd.org Fri Mar 15 17:19:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 859D915279D7; Fri, 15 Mar 2019 17:19:37 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2575D72407; Fri, 15 Mar 2019 17:19:37 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A031D3EA; Fri, 15 Mar 2019 17:19:37 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FHJaZq054395; Fri, 15 Mar 2019 17:19:36 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FHJala054394; Fri, 15 Mar 2019 17:19:36 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201903151719.x2FHJala054394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 15 Mar 2019 17:19:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345194 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 345194 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2575D72407 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 17:19:37 -0000 Author: kevans Date: Fri Mar 15 17:19:36 2019 New Revision: 345194 URL: https://svnweb.freebsd.org/changeset/base/345194 Log: if_bridge(4): Drop pointless rtflush At this point, all routes should've already been dropped by removing all members from the bridge. This condition is in-fact KASSERT'd in the line immediately above where this nop flush was added. Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Fri Mar 15 17:18:19 2019 (r345193) +++ head/sys/net/if_bridge.c Fri Mar 15 17:19:36 2019 (r345194) @@ -2890,7 +2890,6 @@ bridge_rtable_fini(struct bridge_softc *sc) KASSERT(sc->sc_brtcnt == 0, ("%s: %d bridge routes referenced", __func__, sc->sc_brtcnt)); - bridge_rtflush(sc, 1); free(sc->sc_rthash, M_DEVBUF); } From owner-svn-src-all@freebsd.org Fri Mar 15 17:27:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF5AB1527D13; Fri, 15 Mar 2019 17:27:08 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 4CBE4728D3; Fri, 15 Mar 2019 17:27:08 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2FHR4l3031295; Fri, 15 Mar 2019 10:27:04 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2FHR4ls031294; Fri, 15 Mar 2019 10:27:04 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903151727.x2FHR4ls031294@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve In-Reply-To: To: Warner Losh Date: Fri, 15 Mar 2019 10:27:04 -0700 (PDT) CC: "Rodney W. Grimes" , Chuck Tuffli , src-committers , svn-src-all , svn-src-head 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-Rspamd-Queue-Id: 4CBE4728D3 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 17:27:09 -0000 > On Fri, Mar 15, 2019 at 9:56 AM Rodney W. Grimes > wrote: > > > > On Thu, Mar 14, 2019 at 8:32 PM Rodney W. Grimes < > > freebsd@gndrsh.dnsmgr.net> > > > wrote: > > > > > > > > Author: chuck > > > > > Date: Fri Mar 15 02:11:28 2019 > > > > > New Revision: 345171 > > > > > URL: https://svnweb.freebsd.org/changeset/base/345171 > > > > > > > > > > Log: > > > > > Fix bhyve PCIe capability emulation > > > > > > > > > > PCIe devices starting with version 1.1 must set the Role-Based > > Error > > > > > Reporting bit. > > > > > > > > > > And while we're in the neighborhood, generalize the code assigning > > the > > > > > device type. > > > > > > > > > > Reviewed by: imp, araujo, rgrimes > > > > > Approved by: imp (mentor) > > > > > MFC after: 1 week > > > > > Differential Revision: https://reviews.freebsd.org/D19580 > > > > > > > > This code requires maintainer approval before a commit, > > > > though this was well reviewed that doesnt exclude it > > > > from the MAINTAINERS entry. > > > > > > > > Leave it for now, I am sure jhb or thyco are fine with it, > > > > this is just a heads up FYI for future commits. > > > > > > > > Bhyve code has been and still is under a fairly tight > > > > MAINTAINER status. > > > > > > > > > > There is no such thing as a hard lock in FreeBSD. This sounds like you > > are > > > advocating for that, but that's not the case. > > > > > > Stop this stupid nitpicking for single line commits. We don't have that ^^^^^^ Thank you for calling my actions stupid, in effect demoralizing me with the label that includes. I may nit pick, but I never call people degrading names on a public list. Also it only takes a single like to make a bug or problem, it would help to not consider single line changes any less or any more important or potentially damaging. > > > culture any more and it's really pissing a lot of people off. > > > > > > The MAINTAINERS file even says this: > > > > > > Please note that the content of this file is strictly advisory. > > > > > > And the entry for bhyve doesn't say things are mandatory, just requested. > > > > > > Jumping on people's case like this, for a review you yourself were on and > > > approved but made no mention of seeking further review / approval, is > > > demotivating and toxic. Please stop. > > > > I explicitly DID add jhb to the review. > > I also explicitly did not mark the bhyve# box that is added by > > the hearald rules. > > > > I did not jump on him, I informed him of the entry, and told him to leave > > it. > > You how ever have infact jumped on me, repeatedly, if you want to talk > > about > > discouraging tones of behavior I suggest you look at yourself as well. > > > > Weird that so many other people in the thread read it the same way that I > did, and not only this time. That suggests that you're not aware that your > behavior is annoying others, which I contend is a problem that needs > looking into. If you have a pre conceived notion or opinion about anything I say, and I contend that many do, you well always hear it in that tone. This is the rose colored glasses problem. I can not fix that what you hear is not what I said. I speak frankly and without political or other polish to my words, which at times do make them sound harsh or overly direct. I think we both actually do that, and, imho, that is better than trying to sugar coat stuff and be all polite and indirect about things. > As always, I'm open to constructive, actionable feedback about my actions. I have tried above. > Warner > > > Warner > > > > head/usr.sbin/bhyve/pci_emul.c > > > > > > > > > > Modified: head/usr.sbin/bhyve/pci_emul.c > > > > > > > > > > > ============================================================================== > > > > > --- head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:27 2019 > > > > (r345170) > > > > > +++ head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:28 2019 > > > > (r345171) > > > > > @@ -953,7 +953,10 @@ pci_emul_add_pciecap(struct pci_devinst *pi, int > > > > type) > > > > > bzero(&pciecap, sizeof(pciecap)); > > > > > > > > > > pciecap.capid = PCIY_EXPRESS; > > > > > - pciecap.pcie_capabilities = PCIECAP_VERSION | > > PCIEM_TYPE_ROOT_PORT; > > > > > + pciecap.pcie_capabilities = PCIECAP_VERSION | type; > > > > > + /* Devices starting with version 1.1 must set the RBER bit */ > > > > > + if (PCIECAP_VERSION >= 1) > > > > > + pciecap.dev_capabilities = PCIEM_CAP_ROLE_ERR_RPT; > > > > > pciecap.link_capabilities = 0x411; /* gen1, x1 */ > > > > > pciecap.link_status = 0x11; /* gen1, x1 */ > > > > > > > > > > > > > > > > > > > > > > > -- > > > > Rod Grimes > > > > rgrimes@freebsd.org > > > > > > > > > > > > -- > > Rod Grimes > > rgrimes@freebsd.org > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 15 17:31:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73DA31527F55; Fri, 15 Mar 2019 17:31:33 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 CC34272C67; Fri, 15 Mar 2019 17:31:32 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2FHVUtf031315; Fri, 15 Mar 2019 10:31:30 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2FHVUVE031314; Fri, 15 Mar 2019 10:31:30 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903151731.x2FHVUVE031314@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345151 - head/sys/net In-Reply-To: To: Kyle Evans Date: Fri, 15 Mar 2019 10:31:30 -0700 (PDT) CC: "Rodney W. Grimes" , "Bjoern A. Zeeb" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: CC34272C67 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 17:31:33 -0000 > On Fri, Mar 15, 2019 at 12:04 PM Rodney W. Grimes > wrote: > > > > > On 14 Mar 2019, at 19:48, Kyle Evans wrote: > > > > > > > Author: kevans > > > > Date: Thu Mar 14 19:48:43 2019 > > > > New Revision: 345151 > > > > URL: https://svnweb.freebsd.org/changeset/base/345151 > > > > > > > > Log: > > > > ether_fakeaddr: Use 'b' 's' 'd' for the prefix > > > > > > > > This has the advantage of being obvious to sniff out the designated > > > > prefix > > > > by eye and it has all the right bits set. Comment stolen from ffec. > > > > > > > > I've removed bryanv@'s pending question of using the FreeBSD OUI > > > > range -- > > > > no one has followed up on this with a definitive action, and there's > > > > no > > > > particular reason to shoot for it and the administrative overhead > > > > that comes > > > > with deciding exactly how to use it. > > > > > > Yay. iflib_gen_mac() has already thought kind-of similar and just took > > > the entire(?) FreeBSD space for doing the same. That code should be > > > merged as well. > > > > > > Bhyve is using a good chunk from the FreeBSD allocation; see > > > sys/net/ieee_oui.h also for allocation guidelines (if I don?t > > > misremember). > > > > > > The fact that it might need figuring out should not prevent us from > > > doing it right .. the third time .. maybe .. this time? > > > > > > epair(4) is yet another one of the cloned interfaces which does magic > > > for the ethernet addresses, not sure what else. > > > > Yes yes yes please! Can we get the OUI assigning code collapsed to > > one place, though it well need to come in dependent on a complex set > > of options, or perhaps just INET and/or INET6 should drag it in. > > > > For you and anyone else that wants to participate, I opened up > https://reviews.freebsd.org/D19587 for this effort last night-ish to > hash out the details. > Thank you Kyle, I have subscribed and read all the comments so far, keep moving the state of art forward. This may take some time on this one, but it shoud be possible to come to a generally usable OUI management code. > Thanks, > Kyle Evans -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 15 17:35:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06F12152804D; Fri, 15 Mar 2019 17:35:13 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 642D072F0F; Fri, 15 Mar 2019 17:35:12 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-lf1-x12f.google.com with SMTP id g7so7458222lfh.10; Fri, 15 Mar 2019 10:35:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=5W92w+e/fa7L0oeaGNIsuyV+h/SuNYawDf9nFbwDKcs=; b=TuABeWgDiR3+xaQ+TWt+oXac2LKgZoY8Kz0gu311ecxPcAHYh2GLNJtL8MWL14uMwC yys8Z5EK6sZIP3we5XP0GXpumB46NOZYcULF3oYPxEa0PpER2OnmZrsmJTiEOelZ51FQ rIvY5/vWAVpVf4bfN4H7V4bmA2jYjMC5MZeAKw51vPJqHah81GYa9xiJY+hF6Y/iCWfJ rWpx1BPlehHJrYZzQdDSqvWgqudE1+MkEC0GFA26Q03xhvjBKOifUKbdk6uhc30XrreE N7eTwcj2nTc0Fx1kn9pj/gos5ioi3jqN41Xh7hxqBnMyp7sRexGb/69YTXNw5uk6zG+q wjGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=5W92w+e/fa7L0oeaGNIsuyV+h/SuNYawDf9nFbwDKcs=; b=WpCYP7Mp9h2t52310Ca6duicxBSMDKDSDcoPtlCyZ9jV6z1T1OA+bkQIwhgFycxZ7N urhPUNFXHdtSvNa1cxGInbhKU5KT7ltefIReHtAYAZM1vvWEaGtO5zkXCPG2x32awf4F iYEAw76D+vl5wMXyESnQqHXL7bzdGW385dKEunP8dd01Dlg6Uemkzay3QonzAU5/XOgH uQISWSCH+EdOxVZZdLZPbQgUQEIcEXbfan790bLiqOogYtZwgkPv4wYMtV+QsVeiUydG ezxerp63NgU9M1c9wCUU6Twsrobq5AoqVnA981DvTndufuwTib6rdti4nZY+hvPCDivN Yo+A== X-Gm-Message-State: APjAAAXrbY/XvJ2Jjv2aWVE9w7b1UylEqU9Nd4WHTqNNfD68FJF7eFJL iP+ge9MPEjoN+K8XQBsuKuts28eINFO317wLlIDfjiga X-Google-Smtp-Source: APXvYqywX/x6UCzJfY7um0SgevBEIUyERBrl5z/8EFrKm96PkZ+WChKzg/bi4vJvbYdCCPm/05s1ZgFUaZr97KWYwBI= X-Received: by 2002:a19:ed19:: with SMTP id y25mr2998675lfy.80.1552671310571; Fri, 15 Mar 2019 10:35:10 -0700 (PDT) MIME-Version: 1.0 References: <201903151727.x2FHR4ls031294@gndrsh.dnsmgr.net> In-Reply-To: <201903151727.x2FHR4ls031294@gndrsh.dnsmgr.net> Reply-To: araujo@freebsd.org From: Marcelo Araujo Date: Sat, 16 Mar 2019 01:34:58 +0800 Message-ID: Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve To: "Rodney W. Grimes" Cc: Warner Losh , Chuck Tuffli , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 642D072F0F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 17:35:13 -0000 Em s=C3=A1b, 16 de mar de 2019 =C3=A0s 01:27, Rodney W. Grimes < freebsd@gndrsh.dnsmgr.net> escreveu: > > On Fri, Mar 15, 2019 at 9:56 AM Rodney W. Grimes < > freebsd@gndrsh.dnsmgr.net> > > wrote: > > > > > > On Thu, Mar 14, 2019 at 8:32 PM Rodney W. Grimes < > > > freebsd@gndrsh.dnsmgr.net> > > > > wrote: > > > > > > > > > > Author: chuck > > > > > > Date: Fri Mar 15 02:11:28 2019 > > > > > > New Revision: 345171 > > > > > > URL: https://svnweb.freebsd.org/changeset/base/345171 > > > > > > > > > > > > Log: > > > > > > Fix bhyve PCIe capability emulation > > > > > > > > > > > > PCIe devices starting with version 1.1 must set the Role-Base= d > > > Error > > > > > > Reporting bit. > > > > > > > > > > > > And while we're in the neighborhood, generalize the code > assigning > > > the > > > > > > device type. > > > > > > > > > > > > Reviewed by: imp, araujo, rgrimes > > > > > > Approved by: imp (mentor) > > > > > > MFC after: 1 week > > > > > > Differential Revision: https://reviews.freebsd.org/D19580 > > > > > > > > > > This code requires maintainer approval before a commit, > > > > > though this was well reviewed that doesnt exclude it > > > > > from the MAINTAINERS entry. > > > > > > > > > > Leave it for now, I am sure jhb or thyco are fine with it, > > > > > this is just a heads up FYI for future commits. > > > > > > > > > > Bhyve code has been and still is under a fairly tight > > > > > MAINTAINER status. > > > > > > > > > > > > > There is no such thing as a hard lock in FreeBSD. This sounds like > you > > > are > > > > advocating for that, but that's not the case. > > > > > > > > Stop this stupid nitpicking for single line commits. We don't have > that > ^^^^^^ > > Thank you for calling my actions stupid, in effect demoralizing me with > the label that includes. I may nit pick, but I never call people degradi= ng > names on a public list. > > Also it only takes a single like to make a bug or problem, > it would help to not consider single line changes any less or > any more important or potentially damaging. > > > > > culture any more and it's really pissing a lot of people off. > > > > > > > > The MAINTAINERS file even says this: > > > > > > > > Please note that the content of this file is strictly advisory. > > > > > > > > And the entry for bhyve doesn't say things are mandatory, just > requested. > > > > > > > > Jumping on people's case like this, for a review you yourself were > on and > > > > approved but made no mention of seeking further review / approval, = is > > > > demotivating and toxic. Please stop. > > > > > > I explicitly DID add jhb to the review. > > > I also explicitly did not mark the bhyve# box that is added by > > > the hearald rules. > > > > > > I did not jump on him, I informed him of the entry, and told him to > leave > > > it. > > > You how ever have infact jumped on me, repeatedly, if you want to tal= k > > > about > > > discouraging tones of behavior I suggest you look at yourself as well= . > > > > > > > Weird that so many other people in the thread read it the same way that= I > > did, and not only this time. That suggests that you're not aware that > your > > behavior is annoying others, which I contend is a problem that needs > > looking into. > > If you have a pre conceived notion or opinion about anything I say, > and I contend that many do, you well always hear it in that tone. This i= s > the rose colored glasses problem. I can not fix that what you hear is > not what I said. > > I speak frankly and without political or other polish to my words, > which at times do make them sound harsh or overly direct. I think > we both actually do that, and, imho, that is better than trying to > sugar coat stuff and be all polite and indirect about things. > > > As always, I'm open to constructive, actionable feedback about my > actions. > > I have tried above. > > > Warner > > > > Warner > > > > > head/usr.sbin/bhyve/pci_emul.c > > > > > > > > > > > > Modified: head/usr.sbin/bhyve/pci_emul.c > > > > > > > > > > > > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > > > > > > --- head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:27 2019 > > > > > (r345170) > > > > > > +++ head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:28 2019 > > > > > (r345171) > > > > > > @@ -953,7 +953,10 @@ pci_emul_add_pciecap(struct pci_devinst > *pi, int > > > > > type) > > > > > > bzero(&pciecap, sizeof(pciecap)); > > > > > > > > > > > > pciecap.capid =3D PCIY_EXPRESS; > > > > > > - pciecap.pcie_capabilities =3D PCIECAP_VERSION | > > > PCIEM_TYPE_ROOT_PORT; > > > > > > + pciecap.pcie_capabilities =3D PCIECAP_VERSION | type; > > > > > > + /* Devices starting with version 1.1 must set the RBER bi= t > */ > > > > > > + if (PCIECAP_VERSION >=3D 1) > > > > > > + pciecap.dev_capabilities =3D PCIEM_CAP_ROLE_ERR_R= PT; > > > > > > pciecap.link_capabilities =3D 0x411; /* gen1, x1 */ > > > > > > pciecap.link_status =3D 0x11; /* gen1, x1 */ > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Rod Grimes > > > > > rgrimes@freebsd.org > > > > > > > > > > > > > > > > -- > > > Rod Grimes > > > rgrimes@freebsd.org > > > > > -- > Rod Grimes > rgrimes@freebsd.org > > Rod, again, I don't really want to be rude!!! But have you tried to write a blog or something like that with the ideas that you have instead to write an email and press send? Sometimes we are eager to reply every each email, but if we wait for a while that desire disappears and we will realize if we send that email or not would not change anything. I'm not trying to be sarcastic here, my point is, somebody commit something and someone else replies in public is because there is something really wrong and needs everybody attention. Maybe if you really think there is something wrong, first reply in private to that person and then escalete to public if the matters were not solved. Best, -- --=20 Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_) From owner-svn-src-all@freebsd.org Fri Mar 15 18:01:58 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E22BA1528ABB for ; Fri, 15 Mar 2019 18:01:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 691D1743D4 for ; Fri, 15 Mar 2019 18:01:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x741.google.com with SMTP id u22so6014549qkj.11 for ; Fri, 15 Mar 2019 11:01:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eCHBr7sZ06T4E5n7PugznPweDM/pVsQIOk1aoLogFP8=; b=HWKZ6p0O8yiwx+tyPA0uf90zEFfVUStkLMbsOBiwewZBP4LBJo/yobAUOappTDB7LO OnmjMSdIY1dlAar52BgyhwU8HKBz2Q81Be3F7vGXXLUHdp0hfGFox2ex0vxse/+oofbJ J++V0ZGAJUB+TWGquAUTbFKEowTZAupkVLD7bcxRi0LRnqohJscH+m7BGOTltIlrg3+V vAodu9XrWV/ntLt+iH2Rh3lU1lK8tRvOa37mngFh0uutJhxjYKUNT5PMChFpv1GGqjP6 Zkt8mBvTQDRMbVdbnha0i2B0cwbyZgxwFyKYnh06gtOy/YrUV/8QrZHCMzdNcEeEJ0JJ lakA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eCHBr7sZ06T4E5n7PugznPweDM/pVsQIOk1aoLogFP8=; b=e1EAvqkgn5MpqwLraLrVXeGX70KDMfK8SQ3+PXWy4rns+A58FHuEWLLGQtGf+WGZKl r/CroudKlAIvhqDhOZzy64/qsbIxpnCvJiOIkSmlOwOTM7QCQtzi4z1WWhImspRC7bhc VS17iHnmPy1IrGB1MopBUAZpmroV/CmLrYVqcOh58cwFsg6BTfLqRihXy6qllbVg86Ke uBfGEur9l6qeFhrF4qB9BbEAYLSmH8/vgGoA/Rodah2DKsBbnZuwt1LMFBuhSU6FEUaL dYZDJcUyDCaavxu4F9KseveLc8VP+bfQZdVFmBBbeY0iXdiNTeFb+ueNa6PClRZn9PLU OycQ== X-Gm-Message-State: APjAAAWMzoRLQrzz7gmTvBQDJrf8IulHcgrQxf/nywVh1wQaPiKfY0zx AKlzjL9q9XR8CiiEi5x2yLQZQmoHHGN4QLQm+8w35Q== X-Google-Smtp-Source: APXvYqyEzeWqGOBQk2LAyQBcpDJMrauPu/lp2wAIPpR1UET9NYasBPbgqK+WvCu4EBQEijVLUWYIBwLnWeb514+s0rs= X-Received: by 2002:a37:a34f:: with SMTP id m76mr3970749qke.245.1552672916863; Fri, 15 Mar 2019 11:01:56 -0700 (PDT) MIME-Version: 1.0 References: <201903151727.x2FHR4ls031294@gndrsh.dnsmgr.net> In-Reply-To: <201903151727.x2FHR4ls031294@gndrsh.dnsmgr.net> From: Warner Losh Date: Fri, 15 Mar 2019 12:01:45 -0600 Message-ID: Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve To: "Rodney W. Grimes" Cc: Chuck Tuffli , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 691D1743D4 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 18:01:58 -0000 On Fri, Mar 15, 2019 at 11:27 AM Rodney W. Grimes wrote: > > On Fri, Mar 15, 2019 at 9:56 AM Rodney W. Grimes < > freebsd@gndrsh.dnsmgr.net> > > wrote: > > > > > > On Thu, Mar 14, 2019 at 8:32 PM Rodney W. Grimes < > > > freebsd@gndrsh.dnsmgr.net> > > > > wrote: > > > > > > > > > > Author: chuck > > > > > > Date: Fri Mar 15 02:11:28 2019 > > > > > > New Revision: 345171 > > > > > > URL: https://svnweb.freebsd.org/changeset/base/345171 > > > > > > > > > > > > Log: > > > > > > Fix bhyve PCIe capability emulation > > > > > > > > > > > > PCIe devices starting with version 1.1 must set the Role-Based > > > Error > > > > > > Reporting bit. > > > > > > > > > > > > And while we're in the neighborhood, generalize the code > assigning > > > the > > > > > > device type. > > > > > > > > > > > > Reviewed by: imp, araujo, rgrimes > > > > > > Approved by: imp (mentor) > > > > > > MFC after: 1 week > > > > > > Differential Revision: https://reviews.freebsd.org/D19580 > > > > > > > > > > This code requires maintainer approval before a commit, > > > > > though this was well reviewed that doesnt exclude it > > > > > from the MAINTAINERS entry. > > > > > > > > > > Leave it for now, I am sure jhb or thyco are fine with it, > > > > > this is just a heads up FYI for future commits. > > > > > > > > > > Bhyve code has been and still is under a fairly tight > > > > > MAINTAINER status. > > > > > > > > > > > > > There is no such thing as a hard lock in FreeBSD. This sounds like > you > > > are > > > > advocating for that, but that's not the case. > > > > > > > > Stop this stupid nitpicking for single line commits. We don't have > that > ^^^^^^ > > Thank you for calling my actions stupid, in effect demoralizing me with > the label that includes. I may nit pick, but I never call people degrading > names on a public list. I said your actions (specifically the nitpicking) were stupid. I never called you stupid, and don't think you are stupid. Warner From owner-svn-src-all@freebsd.org Fri Mar 15 18:18:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A6DF15293FF; Fri, 15 Mar 2019 18:18:07 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0824174E1C; Fri, 15 Mar 2019 18:18:07 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F3BFEDEEE; Fri, 15 Mar 2019 18:18:05 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FII5kr085555; Fri, 15 Mar 2019 18:18:05 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FII5Kv085552; Fri, 15 Mar 2019 18:18:05 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201903151818.x2FII5Kv085552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 15 Mar 2019 18:18:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345196 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 345196 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0824174E1C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 18:18:07 -0000 Author: glebius Date: Fri Mar 15 18:18:05 2019 New Revision: 345196 URL: https://svnweb.freebsd.org/changeset/base/345196 Log: Deanonymize thread and proc state enums, so that a userland app can use them without redefining the value names. New clang no longer allows to redefine a enum value name to the same value. Bump __FreeBSD_version, since ports depend on that. Discussed with: jhb Modified: head/sys/sys/param.h head/sys/sys/proc.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Mar 15 18:06:51 2019 (r345195) +++ head/sys/sys/param.h Fri Mar 15 18:18:05 2019 (r345196) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300014 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300015 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Fri Mar 15 18:06:51 2019 (r345195) +++ head/sys/sys/proc.h Fri Mar 15 18:18:05 2019 (r345196) @@ -326,7 +326,7 @@ struct thread { * or already have been set in the allocator, constructor, etc. */ struct pcb *td_pcb; /* (k) Kernel VA of pcb and kstack. */ - enum { + enum td_states { TDS_INACTIVE = 0x0, TDS_INHIBITED, TDS_CAN_RUN, @@ -573,7 +573,7 @@ struct proc { int p_flag; /* (c) P_* flags. */ int p_flag2; /* (c) P2_* flags. */ - enum { + enum p_states { PRS_NEW = 0, /* In creation */ PRS_NORMAL, /* threads can be run. */ PRS_ZOMBIE From owner-svn-src-all@freebsd.org Fri Mar 15 18:28:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 427461529984; Fri, 15 Mar 2019 18:28:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DC861754D5; Fri, 15 Mar 2019 18:28:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4CF691E2FC; Fri, 15 Mar 2019 18:28:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r345196 - head/sys/sys To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201903151818.x2FII5Kv085552@repo.freebsd.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <763f5e3c-38c1-2920-8138-6bae9482ad1f@FreeBSD.org> Date: Fri, 15 Mar 2019 11:28:38 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: <201903151818.x2FII5Kv085552@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: DC861754D5 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 18:28:41 -0000 On 3/15/19 11:18 AM, Gleb Smirnoff wrote: > Author: glebius > Date: Fri Mar 15 18:18:05 2019 > New Revision: 345196 > URL: https://svnweb.freebsd.org/changeset/base/345196 > > Log: > Deanonymize thread and proc state enums, so that a userland app can > use them without redefining the value names. New clang no longer > allows to redefine a enum value name to the same value. > > Bump __FreeBSD_version, since ports depend on that. > > Discussed with: jhb Note that devel/mdb from before this commit will no longer work on kernels built with this commit (so you can't use mdb on a 12.x box to cross-debug a crash with this change anymore). Similarly, once mdb is fixed to build with this change, a new mdb built with this won't work with older kernels. -- John Baldwin From owner-svn-src-all@freebsd.org Fri Mar 15 18:43:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2BCA152A106; Fri, 15 Mar 2019 18:43:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C3F575FA5; Fri, 15 Mar 2019 18:43:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id A27BD1E51C; Fri, 15 Mar 2019 18:43:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r345196 - head/sys/sys From: John Baldwin To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201903151818.x2FII5Kv085552@repo.freebsd.org> <763f5e3c-38c1-2920-8138-6bae9482ad1f@FreeBSD.org> Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <5d6a44da-7980-e8a1-a41f-2d30e373b3a8@FreeBSD.org> Date: Fri, 15 Mar 2019 11:43:42 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: <763f5e3c-38c1-2920-8138-6bae9482ad1f@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4C3F575FA5 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.993,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 18:43:45 -0000 On 3/15/19 11:28 AM, John Baldwin wrote: > On 3/15/19 11:18 AM, Gleb Smirnoff wrote: >> Author: glebius >> Date: Fri Mar 15 18:18:05 2019 >> New Revision: 345196 >> URL: https://svnweb.freebsd.org/changeset/base/345196 >> >> Log: >> Deanonymize thread and proc state enums, so that a userland app can >> use them without redefining the value names. New clang no longer >> allows to redefine a enum value name to the same value. >> >> Bump __FreeBSD_version, since ports depend on that. >> >> Discussed with: jhb > > Note that devel/mdb from before this commit will no longer work on > kernels built with this commit (so you can't use mdb on a 12.x box > to cross-debug a crash with this change anymore). Similarly, once > mdb is fixed to build with this change, a new mdb built with this > won't work with older kernels. For background, mdb makes "clever" use of CTF debug info. You declare a structure in the debugger (or one of the debugger modules) that contains a subset of the fields of the type from the thing you are debugging. mdb then compares the CTF of the two structures and figures out how to copy the needed fields from the target structure into the smaller one in the debugger module handling endian-ness swaps, integer size differences, etc. However, it requires the types of each field to be identical. The simplest way to do this is to make a copy of the field by literally copying the fields (in this case from sys/proc.h). This meant that mdb had structs like this: typedef struct { ... enum { TDS_INACTIVE = 0, ... } td_state; } mdb_thread_t; clang 8, in its infinite wisdom decided that the existing enum values in conflicted with the ones in mdb_thread_t even though the numerical value of the enumerators was identical. Note that even with this change, the existing code can't be copied verbatim to mdb as using 'enum td_states { TDS_INACTIVE' once again triggers clang 8's hyper-sensitivity. Thus, with clang 8 it is now impossible to copy and paste enum fields from the target structure to the debugger version of the structure if you ever include the original header for some other reason. I consider this to be a compiler bug that it isn't able to understand that 0 == 0. -- John Baldwin From owner-svn-src-all@freebsd.org Fri Mar 15 18:50:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02C85152A270; Fri, 15 Mar 2019 18:50:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 95AF876267; Fri, 15 Mar 2019 18:50:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 881D9E461; Fri, 15 Mar 2019 18:50:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FIo0YZ001590; Fri, 15 Mar 2019 18:50:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FIo0nb001589; Fri, 15 Mar 2019 18:50:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903151850.x2FIo0nb001589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 15 Mar 2019 18:50: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: r345197 - 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: 345197 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 95AF876267 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 18:50:01 -0000 Author: kib Date: Fri Mar 15 18:50:00 2019 New Revision: 345197 URL: https://svnweb.freebsd.org/changeset/base/345197 Log: MFC r345074: Remove useless version check. Modified: stable/11/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/11/sys/dev/hwpmc/hwpmc_core.c Fri Mar 15 18:18:05 2019 (r345196) +++ stable/11/sys/dev/hwpmc/hwpmc_core.c Fri Mar 15 18:50:00 2019 (r345197) @@ -38,11 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include -#if (__FreeBSD_version >= 1100000) #include -#else -#include -#endif #include #include #include From owner-svn-src-all@freebsd.org Fri Mar 15 18:53:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4136B152A49A; Fri, 15 Mar 2019 18:53:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D74CD76757; Fri, 15 Mar 2019 18:53:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C1E0DE60E; Fri, 15 Mar 2019 18:53:36 +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 x2FIraaI006318; Fri, 15 Mar 2019 18:53:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FIrata006316; Fri, 15 Mar 2019 18:53:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903151853.x2FIrata006316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 15 Mar 2019 18: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: r345199 - in stable/11/sys/x86: include x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys/x86: include x86 X-SVN-Commit-Revision: 345199 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D74CD76757 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 18:53:37 -0000 Author: kib Date: Fri Mar 15 18:53:36 2019 New Revision: 345199 URL: https://svnweb.freebsd.org/changeset/base/345199 Log: MFC r345075: Add register number, CPUID bits, and print identification for TSX force abort errata. Modified: stable/11/sys/x86/include/specialreg.h stable/11/sys/x86/x86/identcpu.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/include/specialreg.h ============================================================================== --- stable/11/sys/x86/include/specialreg.h Fri Mar 15 18:50:36 2019 (r345198) +++ stable/11/sys/x86/include/specialreg.h Fri Mar 15 18:53:36 2019 (r345199) @@ -390,6 +390,7 @@ /* * CPUID instruction 7 Structured Extended Features, leaf 0 edx info */ +#define CPUID_STDEXT3_TSXFA 0x00002000 #define CPUID_STDEXT3_IBPB 0x04000000 #define CPUID_STDEXT3_STIBP 0x08000000 #define CPUID_STDEXT3_L1D_FLUSH 0x10000000 @@ -448,6 +449,7 @@ #define MSR_MTRRcap 0x0fe #define MSR_IA32_ARCH_CAP 0x10a #define MSR_IA32_FLUSH_CMD 0x10b +#define MSR_TSX_FORCE_ABORT 0x10f #define MSR_BBL_CR_ADDR 0x116 #define MSR_BBL_CR_DECC 0x118 #define MSR_BBL_CR_CTL 0x119 Modified: stable/11/sys/x86/x86/identcpu.c ============================================================================== --- stable/11/sys/x86/x86/identcpu.c Fri Mar 15 18:50:36 2019 (r345198) +++ stable/11/sys/x86/x86/identcpu.c Fri Mar 15 18:53:36 2019 (r345199) @@ -991,6 +991,7 @@ printcpuinfo(void) printf("\n Structured Extended Features3=0x%b", cpu_stdext_feature3, "\020" + "\016TSXFA" "\033IBPB" "\034STIBP" "\035L1DFL" From owner-svn-src-all@freebsd.org Fri Mar 15 18:59:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 500D7152A617; Fri, 15 Mar 2019 18:59:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F3E6F7699C; Fri, 15 Mar 2019 18:59:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E8A53E615; Fri, 15 Mar 2019 18:59:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FIx4Q3006600; Fri, 15 Mar 2019 18:59:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FIx4Zu006597; Fri, 15 Mar 2019 18:59:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903151859.x2FIx4Zu006597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 15 Mar 2019 18:59:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345200 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 345200 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F3E6F7699C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 18:59:05 -0000 Author: mav Date: Fri Mar 15 18:59:04 2019 New Revision: 345200 URL: https://svnweb.freebsd.org/changeset/base/345200 Log: MFV r336930: 9284 arc_reclaim_thread has 2 jobs `arc_reclaim_thread()` calls `arc_adjust()` after calling `arc_kmem_reap_now()`; `arc_adjust()` signals `arc_get_data_buf()` to indicate that we may no longer be `arc_is_overflowing()`. The problem is, `arc_kmem_reap_now()` can take several seconds to complete, has no impact on `arc_is_overflowing()`, but due to how the code is structured, can impact how long the ARC will remain in the `arc_is_overflowing()` state. The fix is to use seperate threads to: 1. keep `arc_size` under `arc_c`, by calling `arc_adjust()`, which improves `arc_is_overflowing()` 2. keep enough free memory in the system, by calling `arc_kmem_reap_now()` plus `arc_shrink()`, which improves `arc_available_memory()`. illumos/illumos-gate@de753e34f9c399037936e8bc547d823bba9d4b0d Reviewed by: Matt Ahrens Reviewed by: Serapheim Dimitropoulos Reviewed by: Pavel Zakharov Reviewed by: Dan Kimmel Reviewed by: Paul Dagnelie Reviewed by: Dan McDonald Reviewed by: Tim Kordas Approved by: Garrett D'Amore Author: Brad Lewis Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zthr.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zthr.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Mar 15 18:53:36 2019 (r345199) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Mar 15 18:59:04 2019 (r345200) @@ -281,6 +281,7 @@ #include #include #include +#include #include #include #include @@ -296,11 +297,23 @@ int arc_procfd; #endif #endif /* illumos */ -static kmutex_t arc_reclaim_lock; -static kcondvar_t arc_reclaim_thread_cv; -static boolean_t arc_reclaim_thread_exit; -static kcondvar_t arc_reclaim_waiters_cv; +/* + * This thread's job is to keep enough free memory in the system, by + * calling arc_kmem_reap_now() plus arc_shrink(), which improves + * arc_available_memory(). + */ +static zthr_t *arc_reap_zthr; +/* + * This thread's job is to keep arc_size under arc_c, by calling + * arc_adjust(), which improves arc_is_overflowing(). + */ +static zthr_t *arc_adjust_zthr; + +static kmutex_t arc_adjust_lock; +static kcondvar_t arc_adjust_waiters_cv; +static boolean_t arc_adjust_needed = B_FALSE; + static kmutex_t arc_dnlc_evicts_lock; static kcondvar_t arc_dnlc_evicts_cv; static boolean_t arc_dnlc_evicts_thread_exit; @@ -317,19 +330,23 @@ uint_t arc_reduce_dnlc_percent = 3; int zfs_arc_evict_batch_limit = 10; /* number of seconds before growing cache again */ -static int arc_grow_retry = 60; +int arc_grow_retry = 60; -/* number of milliseconds before attempting a kmem-cache-reap */ -static int arc_kmem_cache_reap_retry_ms = 0; +/* + * Minimum time between calls to arc_kmem_reap_soon(). Note that this will + * be converted to ticks, so with the default hz=100, a setting of 15 ms + * will actually wait 2 ticks, or 20ms. + */ +int arc_kmem_cache_reap_retry_ms = 1000; /* shift of arc_c for calculating overflow limit in arc_get_data_impl */ -int zfs_arc_overflow_shift = 8; +int zfs_arc_overflow_shift = 8; /* shift of arc_c for calculating both min and max arc_p */ -static int arc_p_min_shift = 4; +int arc_p_min_shift = 4; /* log2(fraction of arc to reclaim) */ -static int arc_shrink_shift = 7; +int arc_shrink_shift = 7; /* * log2(fraction of ARC which must be free to allow growing). @@ -355,7 +372,7 @@ static int zfs_arc_min_prescient_prefetch_ms = 6; */ int arc_lotsfree_percent = 10; -static int arc_dead; +static boolean_t arc_initialized; extern boolean_t zfs_prefetch_disable; /* @@ -1052,6 +1069,7 @@ static kmutex_t arc_prune_mtx; static taskq_t *arc_prune_taskq; static int arc_no_grow; /* Don't try to grow cache size */ +static hrtime_t arc_growtime; static uint64_t arc_tempreserve; static uint64_t arc_loaned_bytes; @@ -1819,8 +1837,8 @@ hdr_recl(void *unused) * umem calls the reclaim func when we destroy the buf cache, * which is after we do arc_fini(). */ - if (!arc_dead) - cv_signal(&arc_reclaim_thread_cv); + if (arc_initialized) + zthr_wakeup(arc_reap_zthr); } static void @@ -3905,13 +3923,14 @@ arc_evict_state_impl(multilist_t *ml, int idx, arc_buf * function should proceed in this case). * * If threads are left sleeping, due to not - * using cv_broadcast, they will be woken up - * just before arc_reclaim_thread() sleeps. + * using cv_broadcast here, they will be woken + * up via cv_broadcast in arc_adjust_cb() just + * before arc_adjust_zthr sleeps. */ - mutex_enter(&arc_reclaim_lock); + mutex_enter(&arc_adjust_lock); if (!arc_is_overflowing()) - cv_signal(&arc_reclaim_waiters_cv); - mutex_exit(&arc_reclaim_lock); + cv_signal(&arc_adjust_waiters_cv); + mutex_exit(&arc_adjust_lock); } else { ARCSTAT_BUMP(arcstat_mutex_miss); } @@ -4565,8 +4584,8 @@ arc_flush(spa_t *spa, boolean_t retry) (void) arc_flush_state(arc_mfu_ghost, guid, ARC_BUFC_METADATA, retry); } -uint64_t -arc_shrink(int64_t to_free) +static void +arc_reduce_target_size(int64_t to_free) { uint64_t asize = aggsum_value(&arc_size); if (arc_c > arc_c_min) { @@ -4593,9 +4612,12 @@ arc_shrink(int64_t to_free) if (asize > arc_c) { DTRACE_PROBE2(arc__shrink_adjust, uint64_t, asize, uint64_t, arc_c); - return (arc_adjust()); + /* See comment in arc_adjust_cb_check() on why lock+flag */ + mutex_enter(&arc_adjust_lock); + arc_adjust_needed = B_TRUE; + mutex_exit(&arc_adjust_lock); + zthr_wakeup(arc_adjust_zthr); } - return (0); } typedef enum free_memory_reason_t { @@ -4765,7 +4787,7 @@ extern kmem_cache_t *range_seg_cache; extern kmem_cache_t *abd_chunk_cache; static __noinline void -arc_kmem_reap_now(void) +arc_kmem_reap_soon(void) { size_t i; kmem_cache_t *prev_cache = NULL; @@ -4788,16 +4810,6 @@ arc_kmem_reap_now(void) #endif #endif - /* - * If a kmem reap is already active, don't schedule more. We must - * check for this because kmem_cache_reap_soon() won't actually - * block on the cache being reaped (this is to prevent callers from - * becoming implicitly blocked by a system-wide kmem reap -- which, - * on a system with many, many full magazines, can take minutes). - */ - if (kmem_cache_reap_active()) - return; - for (i = 0; i < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT; i++) { if (zio_buf_cache[i] != prev_cache) { prev_cache = zio_buf_cache[i]; @@ -4826,141 +4838,163 @@ arc_kmem_reap_now(void) DTRACE_PROBE(arc__kmem_reap_end); } -/* - * Threads can block in arc_get_data_impl() waiting for this thread to evict - * enough data and signal them to proceed. When this happens, the threads in - * arc_get_data_impl() are sleeping while holding the hash lock for their - * particular arc header. Thus, we must be careful to never sleep on a - * hash lock in this thread. This is to prevent the following deadlock: - * - * - Thread A sleeps on CV in arc_get_data_impl() holding hash lock "L", - * waiting for the reclaim thread to signal it. - * - * - arc_reclaim_thread() tries to acquire hash lock "L" using mutex_enter, - * fails, and goes to sleep forever. - * - * This possible deadlock is avoided by always acquiring a hash lock - * using mutex_tryenter() from arc_reclaim_thread(). - */ /* ARGSUSED */ -static void -arc_reclaim_thread(void *unused __unused) +static boolean_t +arc_adjust_cb_check(void *arg, zthr_t *zthr) { - hrtime_t growtime = 0; - hrtime_t kmem_reap_time = 0; - callb_cpr_t cpr; + /* + * This is necessary in order for the mdb ::arc dcmd to + * show up to date information. Since the ::arc command + * does not call the kstat's update function, without + * this call, the command may show stale stats for the + * anon, mru, mru_ghost, mfu, and mfu_ghost lists. Even + * with this change, the data might be up to 1 second + * out of date(the arc_adjust_zthr has a maximum sleep + * time of 1 second); but that should suffice. The + * arc_state_t structures can be queried directly if more + * accurate information is needed. + */ + if (arc_ksp != NULL) + arc_ksp->ks_update(arc_ksp, KSTAT_READ); - CALLB_CPR_INIT(&cpr, &arc_reclaim_lock, callb_generic_cpr, FTAG); + /* + * We have to rely on arc_get_data_impl() to tell us when to adjust, + * rather than checking if we are overflowing here, so that we are + * sure to not leave arc_get_data_impl() waiting on + * arc_adjust_waiters_cv. If we have become "not overflowing" since + * arc_get_data_impl() checked, we need to wake it up. We could + * broadcast the CV here, but arc_get_data_impl() may have not yet + * gone to sleep. We would need to use a mutex to ensure that this + * function doesn't broadcast until arc_get_data_impl() has gone to + * sleep (e.g. the arc_adjust_lock). However, the lock ordering of + * such a lock would necessarily be incorrect with respect to the + * zthr_lock, which is held before this function is called, and is + * held by arc_get_data_impl() when it calls zthr_wakeup(). + */ + return (arc_adjust_needed); +} - mutex_enter(&arc_reclaim_lock); - while (!arc_reclaim_thread_exit) { - uint64_t evicted = 0; +/* + * Keep arc_size under arc_c by running arc_adjust which evicts data + * from the ARC. */ +/* ARGSUSED */ +static int +arc_adjust_cb(void *arg, zthr_t *zthr) +{ + uint64_t evicted = 0; + /* Evict from cache */ + evicted = arc_adjust(); + + /* + * If evicted is zero, we couldn't evict anything + * via arc_adjust(). This could be due to hash lock + * collisions, but more likely due to the majority of + * arc buffers being unevictable. Therefore, even if + * arc_size is above arc_c, another pass is unlikely to + * be helpful and could potentially cause us to enter an + * infinite loop. Additionally, zthr_iscancelled() is + * checked here so that if the arc is shutting down, the + * broadcast will wake any remaining arc adjust waiters. + */ + mutex_enter(&arc_adjust_lock); + arc_adjust_needed = !zthr_iscancelled(arc_adjust_zthr) && + evicted > 0 && aggsum_compare(&arc_size, arc_c) > 0; + if (!arc_adjust_needed) { /* - * This is necessary in order for the mdb ::arc dcmd to - * show up to date information. Since the ::arc command - * does not call the kstat's update function, without - * this call, the command may show stale stats for the - * anon, mru, mru_ghost, mfu, and mfu_ghost lists. Even - * with this change, the data might be up to 1 second - * out of date; but that should suffice. The arc_state_t - * structures can be queried directly if more accurate - * information is needed. + * We're either no longer overflowing, or we + * can't evict anything more, so we should wake + * up any waiters. */ - if (arc_ksp != NULL) - arc_ksp->ks_update(arc_ksp, KSTAT_READ); + cv_broadcast(&arc_adjust_waiters_cv); + } + mutex_exit(&arc_adjust_lock); - mutex_exit(&arc_reclaim_lock); + return (0); +} +/* ARGSUSED */ +static boolean_t +arc_reap_cb_check(void *arg, zthr_t *zthr) +{ + int64_t free_memory = arc_available_memory(); + + /* + * If a kmem reap is already active, don't schedule more. We must + * check for this because kmem_cache_reap_soon() won't actually + * block on the cache being reaped (this is to prevent callers from + * becoming implicitly blocked by a system-wide kmem reap -- which, + * on a system with many, many full magazines, can take minutes). + */ + if (!kmem_cache_reap_active() && + free_memory < 0) { + arc_no_grow = B_TRUE; + arc_warm = B_TRUE; /* - * We call arc_adjust() before (possibly) calling - * arc_kmem_reap_now(), so that we can wake up - * arc_get_data_impl() sooner. + * Wait at least zfs_grow_retry (default 60) seconds + * before considering growing. */ - evicted = arc_adjust(); + arc_growtime = gethrtime() + SEC2NSEC(arc_grow_retry); + return (B_TRUE); + } else if (free_memory < arc_c >> arc_no_grow_shift) { + arc_no_grow = B_TRUE; + } else if (gethrtime() >= arc_growtime) { + arc_no_grow = B_FALSE; + } - int64_t free_memory = arc_available_memory(); - if (free_memory < 0) { - hrtime_t curtime = gethrtime(); - arc_no_grow = B_TRUE; - arc_warm = B_TRUE; + return (B_FALSE); +} - /* - * Wait at least zfs_grow_retry (default 60) seconds - * before considering growing. - */ - growtime = curtime + SEC2NSEC(arc_grow_retry); +/* + * Keep enough free memory in the system by reaping the ARC's kmem + * caches. To cause more slabs to be reapable, we may reduce the + * target size of the cache (arc_c), causing the arc_adjust_cb() + * to free more buffers. + */ +/* ARGSUSED */ +static int +arc_reap_cb(void *arg, zthr_t *zthr) +{ + int64_t free_memory; - /* - * Wait at least arc_kmem_cache_reap_retry_ms - * between arc_kmem_reap_now() calls. Without - * this check it is possible to end up in a - * situation where we spend lots of time - * reaping caches, while we're near arc_c_min. - */ - if (curtime >= kmem_reap_time) { - arc_kmem_reap_now(); - kmem_reap_time = gethrtime() + - MSEC2NSEC(arc_kmem_cache_reap_retry_ms); - } + /* + * Kick off asynchronous kmem_reap()'s of all our caches. + */ + arc_kmem_reap_soon(); - /* - * If we are still low on memory, shrink the ARC - * so that we have arc_shrink_min free space. - */ - free_memory = arc_available_memory(); + /* + * Wait at least arc_kmem_cache_reap_retry_ms between + * arc_kmem_reap_soon() calls. Without this check it is possible to + * end up in a situation where we spend lots of time reaping + * caches, while we're near arc_c_min. Waiting here also gives the + * subsequent free memory check a chance of finding that the + * asynchronous reap has already freed enough memory, and we don't + * need to call arc_reduce_target_size(). + */ + delay((hz * arc_kmem_cache_reap_retry_ms + 999) / 1000); - int64_t to_free = - (arc_c >> arc_shrink_shift) - free_memory; - if (to_free > 0) { + /* + * Reduce the target size as needed to maintain the amount of free + * memory in the system at a fraction of the arc_size (1/128th by + * default). If oversubscribed (free_memory < 0) then reduce the + * target arc_size by the deficit amount plus the fractional + * amount. If free memory is positive but less then the fractional + * amount, reduce by what is needed to hit the fractional amount. + */ + free_memory = arc_available_memory(); + + int64_t to_free = + (arc_c >> arc_shrink_shift) - free_memory; + if (to_free > 0) { #ifdef _KERNEL #ifdef illumos - to_free = MAX(to_free, ptob(needfree)); + to_free = MAX(to_free, ptob(needfree)); #endif #endif - evicted += arc_shrink(to_free); - } - } else if (free_memory < arc_c >> arc_no_grow_shift) { - arc_no_grow = B_TRUE; - } else if (gethrtime() >= growtime) { - arc_no_grow = B_FALSE; - } - - mutex_enter(&arc_reclaim_lock); - - /* - * If evicted is zero, we couldn't evict anything via - * arc_adjust(). This could be due to hash lock - * collisions, but more likely due to the majority of - * arc buffers being unevictable. Therefore, even if - * arc_size is above arc_c, another pass is unlikely to - * be helpful and could potentially cause us to enter an - * infinite loop. - */ - if (aggsum_compare(&arc_size, arc_c) <= 0|| evicted == 0) { - /* - * We're either no longer overflowing, or we - * can't evict anything more, so we should wake - * up any threads before we go to sleep. - */ - cv_broadcast(&arc_reclaim_waiters_cv); - - /* - * Block until signaled, or after one second (we - * might need to perform arc_kmem_reap_now() - * even if we aren't being signalled) - */ - CALLB_CPR_SAFE_BEGIN(&cpr); - (void) cv_timedwait_hires(&arc_reclaim_thread_cv, - &arc_reclaim_lock, SEC2NSEC(1), MSEC2NSEC(1), 0); - CALLB_CPR_SAFE_END(&cpr, &arc_reclaim_lock); - } + arc_reduce_target_size(to_free); } - arc_reclaim_thread_exit = B_FALSE; - cv_broadcast(&arc_reclaim_thread_cv); - CALLB_CPR_EXIT(&cpr); /* drops arc_reclaim_lock */ - thread_exit(); + return (0); } static u_int arc_dnlc_evicts_arg; @@ -5055,8 +5089,11 @@ arc_adapt(int bytes, arc_state_t *state) } ASSERT((int64_t)arc_p >= 0); + /* + * Wake reap thread if we do not have any available memory + */ if (arc_reclaim_needed()) { - cv_signal(&arc_reclaim_thread_cv); + zthr_wakeup(arc_reap_zthr); return; } @@ -5164,7 +5201,7 @@ arc_get_data_impl(arc_buf_hdr_t *hdr, uint64_t size, v * overflowing; thus we don't use a while loop here. */ if (arc_is_overflowing()) { - mutex_enter(&arc_reclaim_lock); + mutex_enter(&arc_adjust_lock); /* * Now that we've acquired the lock, we may no longer be @@ -5178,11 +5215,12 @@ arc_get_data_impl(arc_buf_hdr_t *hdr, uint64_t size, v * shouldn't cause any harm. */ if (arc_is_overflowing()) { - cv_signal(&arc_reclaim_thread_cv); - cv_wait(&arc_reclaim_waiters_cv, &arc_reclaim_lock); + arc_adjust_needed = B_TRUE; + zthr_wakeup(arc_adjust_zthr); + (void) cv_wait(&arc_adjust_waiters_cv, + &arc_adjust_lock); } - - mutex_exit(&arc_reclaim_lock); + mutex_exit(&arc_adjust_lock); } VERIFY3U(hdr->b_type, ==, type); @@ -6898,19 +6936,28 @@ static eventhandler_tag arc_event_lowmem = NULL; static void arc_lowmem(void *arg __unused, int howto __unused) { + int64_t free_memory, to_free; - mutex_enter(&arc_reclaim_lock); - DTRACE_PROBE1(arc__needfree, int64_t, ((int64_t)freemem - zfs_arc_free_target) * PAGESIZE); - cv_signal(&arc_reclaim_thread_cv); + arc_no_grow = B_TRUE; + arc_warm = B_TRUE; + arc_growtime = gethrtime() + SEC2NSEC(arc_grow_retry); + free_memory = arc_available_memory(); + to_free = (arc_c >> arc_shrink_shift) - MIN(free_memory, 0); + DTRACE_PROBE2(arc__needfree, int64_t, free_memory, int64_t, to_free); + arc_reduce_target_size(to_free); + mutex_enter(&arc_adjust_lock); + arc_adjust_needed = B_TRUE; + zthr_wakeup(arc_adjust_zthr); + /* * It is unsafe to block here in arbitrary threads, because we can come * here from ARC itself and may hold ARC locks and thus risk a deadlock * with ARC reclaim thread. */ if (curproc == pageproc) - (void) cv_wait(&arc_reclaim_waiters_cv, &arc_reclaim_lock); - mutex_exit(&arc_reclaim_lock); + (void) cv_wait(&arc_adjust_waiters_cv, &arc_adjust_lock); + mutex_exit(&arc_adjust_lock); } #endif @@ -7052,12 +7099,9 @@ arc_init(void) #else uint64_t allmem = kmem_size(); #endif + mutex_init(&arc_adjust_lock, NULL, MUTEX_DEFAULT, NULL); + cv_init(&arc_adjust_waiters_cv, NULL, CV_DEFAULT, NULL); - - mutex_init(&arc_reclaim_lock, NULL, MUTEX_DEFAULT, NULL); - cv_init(&arc_reclaim_thread_cv, NULL, CV_DEFAULT, NULL); - cv_init(&arc_reclaim_waiters_cv, NULL, CV_DEFAULT, NULL); - mutex_init(&arc_dnlc_evicts_lock, NULL, MUTEX_DEFAULT, NULL); cv_init(&arc_dnlc_evicts_cv, NULL, CV_DEFAULT, NULL); @@ -7159,6 +7203,13 @@ arc_init(void) zfs_arc_max = arc_c_max; arc_state_init(); + + /* + * The arc must be "uninitialized", so that hdr_recl() (which is + * registered by buf_init()) will not access arc_reap_zthr before + * it is created. + */ + ASSERT(!arc_initialized); buf_init(); list_create(&arc_prune_list, sizeof (arc_prune_t), @@ -7168,7 +7219,6 @@ arc_init(void) arc_prune_taskq = taskq_create("arc_prune", max_ncpus, minclsyspri, max_ncpus, INT_MAX, TASKQ_PREPOPULATE | TASKQ_DYNAMIC); - arc_reclaim_thread_exit = B_FALSE; arc_dnlc_evicts_thread_exit = FALSE; arc_ksp = kstat_create("zfs", 0, "arcstats", "misc", KSTAT_TYPE_NAMED, @@ -7180,8 +7230,10 @@ arc_init(void) kstat_install(arc_ksp); } - (void) thread_create(NULL, 0, arc_reclaim_thread, NULL, 0, &p0, - TS_RUN, minclsyspri); + arc_adjust_zthr = zthr_create_timer(arc_adjust_cb_check, + arc_adjust_cb, NULL, SEC2NSEC(1)); + arc_reap_zthr = zthr_create_timer(arc_reap_cb_check, + arc_reap_cb, NULL, SEC2NSEC(1)); #ifdef _KERNEL arc_event_lowmem = EVENTHANDLER_REGISTER(vm_lowmem, arc_lowmem, NULL, @@ -7191,7 +7243,7 @@ arc_init(void) (void) thread_create(NULL, 0, arc_dnlc_evicts_thread, NULL, 0, &p0, TS_RUN, minclsyspri); - arc_dead = B_FALSE; + arc_initialized = B_TRUE; arc_warm = B_FALSE; /* @@ -7256,18 +7308,6 @@ arc_fini(void) EVENTHANDLER_DEREGISTER(vm_lowmem, arc_event_lowmem); #endif - mutex_enter(&arc_reclaim_lock); - arc_reclaim_thread_exit = B_TRUE; - /* - * The reclaim thread will set arc_reclaim_thread_exit back to - * B_FALSE when it is finished exiting; we're waiting for that. - */ - while (arc_reclaim_thread_exit) { - cv_signal(&arc_reclaim_thread_cv); - cv_wait(&arc_reclaim_thread_cv, &arc_reclaim_lock); - } - mutex_exit(&arc_reclaim_lock); - /* Use B_TRUE to ensure *all* buffers are evicted */ arc_flush(NULL, B_TRUE); @@ -7283,7 +7323,7 @@ arc_fini(void) } mutex_exit(&arc_dnlc_evicts_lock); - arc_dead = B_TRUE; + arc_initialized = B_FALSE; if (arc_ksp != NULL) { kstat_delete(arc_ksp); @@ -7304,12 +7344,18 @@ arc_fini(void) list_destroy(&arc_prune_list); mutex_destroy(&arc_prune_mtx); - mutex_destroy(&arc_reclaim_lock); - cv_destroy(&arc_reclaim_thread_cv); - cv_destroy(&arc_reclaim_waiters_cv); + (void) zthr_cancel(arc_adjust_zthr); + zthr_destroy(arc_adjust_zthr); + mutex_destroy(&arc_dnlc_evicts_lock); cv_destroy(&arc_dnlc_evicts_cv); + + (void) zthr_cancel(arc_reap_zthr); + zthr_destroy(arc_reap_zthr); + + mutex_destroy(&arc_adjust_lock); + cv_destroy(&arc_adjust_waiters_cv); arc_state_fini(); buf_fini(); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zthr.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zthr.h Fri Mar 15 18:53:36 2019 (r345199) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zthr.h Fri Mar 15 18:59:04 2019 (r345200) @@ -29,6 +29,7 @@ struct zthr { kmutex_t zthr_lock; kcondvar_t zthr_cv; boolean_t zthr_cancel; + hrtime_t zthr_wait_time; zthr_checkfunc_t *zthr_checkfunc; zthr_func_t *zthr_func; @@ -38,6 +39,9 @@ struct zthr { extern zthr_t *zthr_create(zthr_checkfunc_t checkfunc, zthr_func_t *func, void *arg); +extern zthr_t *zthr_create_timer(zthr_checkfunc_t *checkfunc, + zthr_func_t *func, void *arg, hrtime_t nano_wait); + extern void zthr_exit(zthr_t *t, int rc); extern void zthr_destroy(zthr_t *t); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zthr.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zthr.c Fri Mar 15 18:53:36 2019 (r345199) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zthr.c Fri Mar 15 18:59:04 2019 (r345200) @@ -47,6 +47,10 @@ * 3] When the zthr is done, it changes the indicator to stopped, allowing * a new cycle to start. * + * Besides being awakened by other threads, a zthr can be configured + * during creation to wakeup on it's own after a specified interval + * [see zthr_create_timer()]. + * * == ZTHR creation * * Every zthr needs three inputs to start running: @@ -74,6 +78,9 @@ * * To start a zthr: * zthr_t *zthr_pointer = zthr_create(checkfunc, func, args); + * or + * zthr_t *zthr_pointer = zthr_create_timer(checkfunc, func, + * args, max_sleep); * * After that you should be able to wakeup, cancel, and resume the * zthr from another thread using zthr_pointer. @@ -189,7 +196,13 @@ zthr_procedure(void *arg) mutex_enter(&t->zthr_lock); } else { /* go to sleep */ - cv_wait(&t->zthr_cv, &t->zthr_lock); + if (t->zthr_wait_time == 0) { + cv_wait(&t->zthr_cv, &t->zthr_lock); + } else { + (void) cv_timedwait_hires(&t->zthr_cv, + &t->zthr_lock, t->zthr_wait_time, + MSEC2NSEC(1), 0); + } } } mutex_exit(&t->zthr_lock); @@ -200,6 +213,18 @@ zthr_procedure(void *arg) zthr_t * zthr_create(zthr_checkfunc_t *checkfunc, zthr_func_t *func, void *arg) { + return (zthr_create_timer(checkfunc, func, arg, (hrtime_t)0)); +} + +/* + * Create a zthr with specified maximum sleep time. If the time + * in sleeping state exceeds max_sleep, a wakeup(do the check and + * start working if required) will be triggered. + */ +zthr_t * +zthr_create_timer(zthr_checkfunc_t *checkfunc, zthr_func_t *func, + void *arg, hrtime_t max_sleep) +{ zthr_t *t = kmem_zalloc(sizeof (*t), KM_SLEEP); mutex_init(&t->zthr_lock, NULL, MUTEX_DEFAULT, NULL); cv_init(&t->zthr_cv, NULL, CV_DEFAULT, NULL); @@ -208,6 +233,7 @@ zthr_create(zthr_checkfunc_t *checkfunc, zthr_func_t * t->zthr_checkfunc = checkfunc; t->zthr_func = func; t->zthr_arg = arg; + t->zthr_wait_time = max_sleep; t->zthr_thread = thread_create(NULL, 0, zthr_procedure, t, 0, &p0, TS_RUN, minclsyspri); From owner-svn-src-all@freebsd.org Fri Mar 15 21:11:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09C8E152ED3D; Fri, 15 Mar 2019 21:11:48 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9DBCC832D7; Fri, 15 Mar 2019 21:11:47 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 935B9FE3A; Fri, 15 Mar 2019 21:11:47 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FLBlfj075464; Fri, 15 Mar 2019 21:11:47 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FLBl1w075463; Fri, 15 Mar 2019 21:11:47 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201903152111.x2FLBl1w075463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 15 Mar 2019 21:11:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345202 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 345202 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9DBCC832D7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 21:11:48 -0000 Author: asomers Date: Fri Mar 15 21:11:47 2019 New Revision: 345202 URL: https://svnweb.freebsd.org/changeset/base/345202 Log: VOP_INACTIVE(9): clarify wording Reviewed by: kib, 0mp MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19596 Modified: head/share/man/man9/VOP_INACTIVE.9 Modified: head/share/man/man9/VOP_INACTIVE.9 ============================================================================== --- head/share/man/man9/VOP_INACTIVE.9 Fri Mar 15 20:16:35 2019 (r345201) +++ head/share/man/man9/VOP_INACTIVE.9 Fri Mar 15 21:11:47 2019 (r345202) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 27, 2014 +.Dd March 15, 2019 .Dt VOP_INACTIVE 9 .Os .Sh NAME @@ -50,13 +50,16 @@ The vnode being reclaimed. .El .Pp .Fn VOP_INACTIVE -is called when the kernel is no longer using the vnode. +is usually called when the kernel is no longer using the vnode. +However, there is no guarantee that it will be called at all, for example if +the last reference was dropped while the vnode lock could not be upgraded +to exclusive without sleeping. This may be because the reference count reaches zero or it may be that the file system is being forcibly unmounted while there are open files. -It can be used to reclaim space for +It can be used to reclaim space on the last close of an .Sq open but deleted -files. +file. .Pp .Fn VOP_RECLAIM is called when a vnode is being reused for a different file system. From owner-svn-src-all@freebsd.org Fri Mar 15 21:37:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1868B152F5FB; Fri, 15 Mar 2019 21:37:13 +0000 (UTC) (envelope-from ctuffli@gmail.com) Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 941AA83EDD; Fri, 15 Mar 2019 21:37:12 +0000 (UTC) (envelope-from ctuffli@gmail.com) Received: by mail-oi1-x241.google.com with SMTP id 67so8513236oif.10; Fri, 15 Mar 2019 14:37:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=J+QH5+/lhtLMPsxmxN2qZ8hG528gYh4QwEXhU2KhgbM=; b=YubHZ1iICqH/waOjQI6mTrS+yzIOrTqdI869ufAr6n6Rq724jP+6FpnkvIfJBSE6WZ XZNc0VmFmcR76Py9MEjirnF9PZVMosicRi2AU/XI2li/69oa8r/1c3kI8buuGP1PCPqL OTxTy2reisg4dQj38qRe9f2I6+XDLvUO8RmWpCEl6DkPzM0rOabdG8FS6qdwYOK5tE29 TSyDrAgIOqD/k0a5aOniD4gjVZ9ifpBL1JxGCZhFjbFGAI04rjtJP3CGHRWdRlIxOg0c PmmVN0bS9kQrBvqomKalQnxTEUOIRYzdt6bSNG5EQtH53Ii6ehTjOauL8VUTbW1lxdde QiyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=J+QH5+/lhtLMPsxmxN2qZ8hG528gYh4QwEXhU2KhgbM=; b=gNMkwERB48QNGHFER6zD+KfETuOVu0HtfwkIJ+Z/yZFMvF5WPd0zIqMKPFeELhIiDG Wwx5ndAsl+gb2DPegnoULKR77SohenZgjyWQ7b1PD4Cb2mkrwgD2nM5mq5ahILZAuzr3 eEhklMRaHmhP5tLqVcFS3snCvSQAm8KdC4JaWJHKAUp/EqCvFX/j5I1V/2Asr6kQZSmx Z44YvI7BktE8+UfoSogjxyyTD8hvet95OBscoXFriGBC53DcXQwLSoVdEGGO+v7xhlUd BOWJiM4JkrYFsbOZREq+SGj59hBOGwf++jzIQMrnIsZrqjAHAQKN/r5OlfalJIpOUyB+ cKlw== X-Gm-Message-State: APjAAAUljofERHrBeuhkY61h4NYHt5J25/MnyBqmr3Z6q4LjELPLrFqI 5ZX0zZ6T5GbuvvvS1/xwr9f25Q2Dr4F6Wh01UMgiTQ== X-Google-Smtp-Source: APXvYqyWEHhj7SMbXsqtfoapWUDjOSabfMxqlz4miVoxs3LmxmzHs3Wu3R84/wveXWK4eA6BATrplO9pPJxG8O8+tSo= X-Received: by 2002:aca:f4d3:: with SMTP id s202mr2873196oih.178.1552685831631; Fri, 15 Mar 2019 14:37:11 -0700 (PDT) MIME-Version: 1.0 References: <201903150211.x2F2BSai079898@repo.freebsd.org> <5adee283-2cac-14d2-ec06-bce43bf3bcde@FreeBSD.org> In-Reply-To: <5adee283-2cac-14d2-ec06-bce43bf3bcde@FreeBSD.org> From: Chuck Tuffli Date: Fri, 15 Mar 2019 14:36:59 -0700 Message-ID: Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve To: John Baldwin Cc: cem@freebsd.org, Andrew Thompson , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 941AA83EDD X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 21:37:13 -0000 Apologies all the way around. I was ignorant about the maintainer for this code and goofed. See inline for other comments. On Fri, Mar 15, 2019 at 9:28 AM John Baldwin wrote: > > On 3/14/19 10:24 PM, Conrad Meyer wrote: > > On Thu, Mar 14, 2019 at 8:06 PM Andrew Thompson wrote: > >> > >> On Fri, 15 Mar 2019 at 15:11, Chuck Tuffli wrote: > >>> bzero(&pciecap, sizeof(pciecap)); > > ... > >>> + pciecap.dev_capabilities = PCIEM_CAP_ROLE_ERR_RPT; > >> > >> If the message you say 'set the bit' but you are overwriting the whole variable, is this intended? > > > > Looks like it was zero before. So yeah, it sets the bit. > > It would probably be cleaner for future changes to make it a |=, but that's a > tiny nit. style(9) wants a blank line before the comment as well. Happy to make those changes > I hadn't approved it yet only because I hadn't gone and dug through my PCIe > books / specs to see what this bit is and confirm it is required. > > OTOH, it's not clear to me that bhyve PCI-e devices don't want to just be 1.0a > devices as a lowest common denominator to be as accommodating to as wide variety > of OS's as possible. > > One thing I didn't see in a review was a reason for why to make this change? > Does some OS reject devices without this bit set or is it just based on reading > the spec? bhyve doesn't assert any PCI-e errors for virtual devices, so > this bit is pretty meaningless. I was contacted by a bhyve user who mentioned that Windows didn't seem to like bhyve's NVMe emulation. This change doesn't fix that, but this is one of a handful of changes inspired by qemu. While trying to reverse engineer why Windows is grumpy, I've run across several comments in the qemu code which make claims about what Windows needs to see before starting a device. This was one of those, and (at the time) seemed innocuous enough to commit. --chuck From owner-svn-src-all@freebsd.org Fri Mar 15 21:43:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EA70152FFD0; Fri, 15 Mar 2019 21:43:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EF5C68563C; Fri, 15 Mar 2019 21:43:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5121B183A3; Fri, 15 Mar 2019 21:43:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FLhuhF098455; Fri, 15 Mar 2019 21:43:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FLhrcK098439; Fri, 15 Mar 2019 21:43:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201903152143.x2FLhrcK098439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Fri, 15 Mar 2019 21:43:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345203 - in head: contrib/googletest contrib/mandoc etc/mtree lib lib/googletest share/examples/tests/tests share/examples/tests/tests/googletest share/mk tools/build/mk tools/build/op... X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in head: contrib/googletest contrib/mandoc etc/mtree lib lib/googletest share/examples/tests/tests share/examples/tests/tests/googletest share/mk tools/build/mk tools/build/options X-SVN-Commit-Revision: 345203 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EF5C68563C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 21:43:57 -0000 Author: ngie Date: Fri Mar 15 21:43:52 2019 New Revision: 345203 URL: https://svnweb.freebsd.org/changeset/base/345203 Log: Initial googlemock/googletest integration into the build/FreeBSD test suite This initial integration takes googlemock/googletest release 1.8.1, integrates the library, tests, and sample unit tests into the build. googlemock/googletest's inclusion is optionally available via `MK_GOOGLETEST`. `MK_GOOGLETEST` is dependent on `MK_TESTS` and is enabled by default when built with a C++11 capable toolchain. Google tests can be specified via the `GTESTS` variable, which, in comparison with the other test drivers, is more simplified/streamlined, as Googletest only supports C++ tests; not raw C or shell tests (C tests can be written in C++ using the standard embedding methods). No dependent libraries are assumed for the tests. One must specify `gmock`, `gmock_main`, `gtest`, or `gtest_main`, via `LIBADD` for the program. More information about googlemock and googletest can be found on the Googletest [project page](https://github.com/google/googletest), and the [GoogleMock](https://github.com/google/googletest/blob/v1.8.x/googlemock/docs/Documentation.md) and [GoogleTest](https://github.com/google/googletest/tree/v1.8.x/googletest/docs) docs. These tests are originally integrated into the build as plain driver tests, but will be natively integrated into Kyua in a later version. Known issues/Errata: * [WhenDynamicCastToTest.AmbiguousCast fails on FreeBSD](https://github.com/google/googletest/issues/2172) Reviewed by: asomers Approved by: emaste (mentor) MFC after: 2 months Differential Revision: https://reviews.freebsd.org/D19551 Added: head/contrib/googletest/ - copied from r345031, projects/import-googletest-1.8.1/contrib/googletest/ head/lib/googletest/ - copied from r345031, projects/import-googletest-1.8.1/lib/googletest/ head/share/examples/tests/tests/googletest/ - copied from r345031, projects/import-googletest-1.8.1/share/examples/tests/tests/googletest/ head/share/mk/googletest.test.inc.mk - copied, changed from r345031, projects/import-googletest-1.8.1/share/mk/googletest.test.inc.mk head/share/mk/googletest.test.mk - copied unchanged from r345031, projects/import-googletest-1.8.1/share/mk/googletest.test.mk head/tools/build/options/WITHOUT_GOOGLETEST - copied, changed from r345031, projects/import-googletest-1.8.1/tools/build/options/WITHOUT_GOOGLETEST Modified: head/contrib/mandoc/lib.in head/etc/mtree/BSD.tests.dist head/etc/mtree/BSD.usr.dist head/lib/Makefile head/share/examples/tests/tests/Makefile head/share/examples/tests/tests/googletest/Makefile head/share/mk/Makefile head/share/mk/bsd.README head/share/mk/bsd.test.mk head/share/mk/src.libnames.mk head/share/mk/src.opts.mk head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/contrib/mandoc/lib.in ============================================================================== --- head/contrib/mandoc/lib.in Fri Mar 15 21:11:47 2019 (r345202) +++ head/contrib/mandoc/lib.in Fri Mar 15 21:43:52 2019 (r345203) @@ -62,7 +62,9 @@ LINE("libfsid", "Filesystem Identification Library (l LINE("libftpio", "FTP Connection Management Library (libftpio, \\-lftpio)") LINE("libform", "Curses Form Library (libform, \\-lform)") LINE("libgeom", "Userland API Library for Kernel GEOM subsystem (libgeom, \\-lgeom)") +LINE("libgmock", "GoogleMock library (libgmock, \\-lgmock)") LINE("libgpio", "General-Purpose Input Output (GPIO) library (libgpio, \\-lgpio)") +LINE("libgtest", "GoogleTest library (libgtest, \\-lgtest)") LINE("libhammer", "HAMMER Filesystem Userland Library (libhammer, \\-lhammer)") LINE("libi386", "i386 Architecture Library (libi386, \\-li386)") LINE("libintl", "Internationalized Message Handling Library (libintl, \\-lintl)") Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Fri Mar 15 21:11:47 2019 (r345202) +++ head/etc/mtree/BSD.tests.dist Fri Mar 15 21:43:52 2019 (r345203) @@ -278,6 +278,16 @@ static .. .. + googletest + gmock + .. + gmock_main + .. + gtest + .. + gtest_main + .. + .. libarchive .. libc @@ -429,6 +439,8 @@ examples tests atf + .. + googletest .. plain .. Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Fri Mar 15 21:11:47 2019 (r345202) +++ head/etc/mtree/BSD.usr.dist Fri Mar 15 21:43:52 2019 (r345203) @@ -13,6 +13,18 @@ .. event .. + gmock + internal + custom + .. + .. + .. + gtest + internal + custom + .. + .. + .. sqlite3 .. ucl Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Fri Mar 15 21:11:47 2019 (r345202) +++ head/lib/Makefile Fri Mar 15 21:43:52 2019 (r345203) @@ -170,6 +170,7 @@ _libcplusplus+= libc++fs .endif SUBDIR.${MK_EFI}+= libefivar +SUBDIR.${MK_GOOGLETEST}+= googletest SUBDIR.${MK_LIBTHR}+= libthr SUBDIR.${MK_LLVM_LIBUNWIND}+= libgcc_eh SUBDIR.${MK_LLVM_LIBUNWIND}+= libgcc_s Modified: head/share/examples/tests/tests/Makefile ============================================================================== --- head/share/examples/tests/tests/Makefile Fri Mar 15 21:11:47 2019 (r345202) +++ head/share/examples/tests/tests/Makefile Fri Mar 15 21:43:52 2019 (r345203) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + # Directory into which the Kyuafile provided by this directory will be # installed. # @@ -20,6 +22,10 @@ TESTS_SUBDIRS+= atf TESTS_SUBDIRS+= plain TESTS_SUBDIRS+= tap + +.if ${MK_GOOGLETEST} != no +TESTS_SUBDIRS+= googletest +.endif # We leave KYUAFILE unset so that bsd.test.mk auto-generates a Kyuafile # for us based on the contents of the TESTS_SUBDIRS line above. The Modified: head/share/examples/tests/tests/googletest/Makefile ============================================================================== --- projects/import-googletest-1.8.1/share/examples/tests/tests/googletest/Makefile Mon Mar 11 21:56:35 2019 (r345031) +++ head/share/examples/tests/tests/googletest/Makefile Fri Mar 15 21:43:52 2019 (r345203) @@ -1,5 +1,25 @@ # $FreeBSD$ +# +# This Makefile differs from the other examples, in the sense that its purpose +# is to install the upstream provided googletest sample unit tests. +# The release package to use for the tests contained within the directory +# +# This applies to components which rely on ^/projects/release-pkg support +# (see UPDATING XXXXXXXXX / svn revision r298107). +PACKAGE= tests + +# Directory into which the Kyuafile provided by this directory will be +# installed. +# +# This is always a subdirectory of ${TESTSBASE}/. The remainder of the +# path has to match the relative path within the source tree in which +# these files are found modulo the tests/ component at the end. +# +# For example: if this Makefile were in src/bin/cp/tests/, its TESTSDIR +# would point at ${TESTSBASE}/bin/cp/. +TESTSDIR= ${TESTSBASE}/share/examples/tests/googletest + .PATH: ${SRCTOP}/contrib/googletest/googletest/samples GTEST_MAIN_REQ_TESTS+= sample1_unittest @@ -16,18 +36,21 @@ GTEST_MAIN_REQ_TESTS+= sample8_unittest #GTEST_REQ_TESTS+= sample9_unittest GTEST_REQ_TESTS+= sample10_unittest -.for t in ${GTEST_MAIN_REQ_TESTS} -GTESTS+= $t -LIBADD.$t+= gtest_main -SRCS.$t+= $t.cc -.endfor +# List of test programs to build. Note that we can build more than one +# test from a single directory, and this is expected. +GTESTS+= ${GTEST_MAIN_REQ_TESTS} ${GTEST_REQ_TESTS} -.for t in ${GTEST_REQ_TESTS} -GTESTS+= $t +# +.for t in ${GTESTS} +.if ${GTEST_MAIN_REQ_TESTS:M$t} +LIBADD.$t+= gtest_main +.else LIBADD.$t+= gtest +.endif SRCS.$t+= $t.cc .endfor +# Additional sources for sample testcase 1, 2, 4, and 5. SRCS.sample1_unittest+= sample1.cc SRCS.sample2_unittest+= sample2.cc SRCS.sample4_unittest+= sample4.cc Modified: head/share/mk/Makefile ============================================================================== --- head/share/mk/Makefile Fri Mar 15 21:11:47 2019 (r345202) +++ head/share/mk/Makefile Fri Mar 15 21:43:52 2019 (r345203) @@ -73,6 +73,8 @@ FILESDIR= ${BINDIR}/mk .if ${MK_TESTS} != "no" FILES+= atf.test.mk +FILES+= googletest.test.inc.mk +FILES+= googletest.test.mk FILES+= plain.test.mk FILES+= suite.test.mk FILES+= tap.test.mk Modified: head/share/mk/bsd.README ============================================================================== --- head/share/mk/bsd.README Fri Mar 15 21:11:47 2019 (r345202) +++ head/share/mk/bsd.README Fri Mar 15 21:43:52 2019 (r345203) @@ -649,6 +649,8 @@ ATF_TESTS_CXX The names of the ATF C++ test programs t ATF_TESTS_SH The names of the ATF sh test programs to build. +GTESTS The names of the GoogleTest test programs to build. + KYUAFILE If 'auto' (the default), generate a Kyuafile out of the test programs defined in the Makefile. If 'yes', then a manually-crafted Kyuafile must be supplied with the Modified: head/share/mk/bsd.test.mk ============================================================================== --- head/share/mk/bsd.test.mk Fri Mar 15 21:11:47 2019 (r345202) +++ head/share/mk/bsd.test.mk Fri Mar 15 21:43:52 2019 (r345203) @@ -63,6 +63,7 @@ _TESTS= # Pull in the definitions of all supported test interfaces. .include +.include .include .include Copied and modified: head/share/mk/googletest.test.inc.mk (from r345031, projects/import-googletest-1.8.1/share/mk/googletest.test.inc.mk) ============================================================================== --- projects/import-googletest-1.8.1/share/mk/googletest.test.inc.mk Mon Mar 11 21:56:35 2019 (r345031, copy source) +++ head/share/mk/googletest.test.inc.mk Fri Mar 15 21:43:52 2019 (r345203) @@ -1,10 +1,13 @@ # $FreeBSD$ +# XXX: this should be defined in bsd.sys.mk +CXXSTD?= c++11 + GTESTS_CXXFLAGS+= -DGTEST_HAS_POSIX_RE=1 GTESTS_CXXFLAGS+= -DGTEST_HAS_PTHREAD=1 GTESTS_CXXFLAGS+= -DGTEST_HAS_STREAM_REDIRECTION=1 GTESTS_CXXFLAGS+= -frtti -GTESTS_CXXFLAGS+= -std=c++11 +GTESTS_CXXFLAGS+= -std=${CXXSTD} # XXX: src.libnames.mk should handle adding this directory. GTESTS_CXXFLAGS+= -I${DESTDIR}${INCLUDEDIR}/private Copied: head/share/mk/googletest.test.mk (from r345031, projects/import-googletest-1.8.1/share/mk/googletest.test.mk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/mk/googletest.test.mk Fri Mar 15 21:43:52 2019 (r345203, copy of r345031, projects/import-googletest-1.8.1/share/mk/googletest.test.mk) @@ -0,0 +1,41 @@ +# $FreeBSD$ +# +# You must include bsd.test.mk instead of this file from your Makefile. +# +# Logic to build and install GoogleTest based test programs. +# +# GoogleTest is a C++ test framework, thus, it does not describe/articulate how +# to write tests in other languages, e.g., C or shell, unlike the ATF, plain, +# and TAP raw test interfaces. +# +# For now this is a thin wrapper around the `plain` test interface, but in the +# future this will rely on a newer version of kyua which will integrate in +# GoogleTest support. + +.if !target(____) +.error googletest.test.mk cannot be included directly. +.endif + +# List of GoogleTest test programs to build. +# +# Programs listed here are built according to the semantics of bsd.progs.mk for +# PROGS_CXX. +# +# Test programs registered in this manner are set to be installed into TESTSDIR +# (which should be overridden by the Makefile) and are not required to provide a +# manpage. +GTESTS?= + +.if !empty(GTESTS) +.include + +PROGS_CXX+= ${GTESTS} +_TESTS+= ${GTESTS} +.for _T in ${GTESTS} +BINDIR.${_T}= ${TESTSDIR} +CXXFLAGS.${_T}+= ${GTESTS_CXXFLAGS} +MAN.${_T}?= # empty +SRCS.${_T}?= ${_T}.cc +TEST_INTERFACE.${_T}= plain +.endfor +.endif Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Fri Mar 15 21:11:47 2019 (r345202) +++ head/share/mk/src.libnames.mk Fri Mar 15 21:43:52 2019 (r345203) @@ -18,6 +18,10 @@ _PRIVATELIBS= \ bsdstat \ devdctl \ event \ + gmock \ + gtest \ + gmock_main \ + gtest_main \ heimipcc \ heimipcs \ ldns \ @@ -302,6 +306,10 @@ _DP_dpv= dialog figpar util ncursesw _DP_dialog= ncursesw m _DP_cuse= pthread _DP_atf_cxx= atf_c +_DP_gtest= pthread +_DP_gmock= gtest +_DP_gmock_main= gmock +_DP_gtest_main= gtest _DP_devstat= kvm _DP_pam= radius tacplus opie md util .if ${MK_KERBEROS} != "no" @@ -379,6 +387,15 @@ LIBATF_CXX= ${LIBDESTDIR}${LIBDIR_BASE}/libprivateatf- LDADD_atf_c= -lprivateatf-c LDADD_atf_cxx= -lprivateatf-c++ +LIBGMOCK= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategmock.a +LIBGMOCK_MAIN= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategmock_main.a +LIBGTEST= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategtest.a +LIBGTEST_MAIN= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategtest_main.a +LDADD_gmock= -lprivategmock +LDADD_gtest= -lprivategtest +LDADD_gmock_main= -lprivategmock_main +LDADD_gtest_main= -lprivategtest_main + .for _l in ${_PRIVATELIBS} LIB${_l:tu}?= ${LIBDESTDIR}${LIBDIR_BASE}/libprivate${_l}.a .endfor @@ -421,6 +438,15 @@ LDADD_${_l}+= ${LDADD_${_d}} DPADD_atf_cxx+= ${DPADD_atf_c} LDADD_atf_cxx+= ${LDADD_atf_c} +DPADD_gmock+= ${DPADD_gtest} +LDADD_gmock+= ${LDADD_gtest} + +DPADD_gmock_main+= ${DPADD_gmock} +LDADD_gmock_main+= ${LDADD_gmock} + +DPADD_gtest_main+= ${DPADD_gtest} +LDADD_gtest_main+= ${LDADD_gtest} + # Detect LDADD/DPADD that should be LIBADD, before modifying LDADD here. _BADLDADD= .for _l in ${LDADD:M-l*:N-l*/*:C,^-l,,} @@ -562,6 +588,10 @@ LIBROKENDIR= ${OBJTOP}/kerberos5/lib/libroken LIBWINDDIR= ${OBJTOP}/kerberos5/lib/libwind LIBATF_CDIR= ${OBJTOP}/lib/atf/libatf-c LIBATF_CXXDIR= ${OBJTOP}/lib/atf/libatf-c++ +LIBGMOCKDIR= ${OBJTOP}/lib/googletest/gmock +LIBGMOCK_MAINDIR= ${OBJTOP}/lib/googletest/gmock_main +LIBGTESTDIR= ${OBJTOP}/lib/googletest/gtest +LIBGTEST_MAINDIR= ${OBJTOP}/lib/googletest/gtest_main LIBALIASDIR= ${OBJTOP}/lib/libalias/libalias LIBBLACKLISTDIR= ${OBJTOP}/lib/libblacklist LIBBLOCKSRUNTIMEDIR= ${OBJTOP}/lib/libblocksruntime Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Fri Mar 15 21:11:47 2019 (r345202) +++ head/share/mk/src.opts.mk Fri Mar 15 21:43:52 2019 (r345203) @@ -108,6 +108,7 @@ __DEFAULT_YES_OPTIONS = \ GDB \ GNU_DIFF \ GNU_GREP \ + GOOGLETEST \ GPIO \ HAST \ HTML \ @@ -427,6 +428,7 @@ MK_${var}:= no # Order is somewhat important. # .if !${COMPILER_FEATURES:Mc++11} +MK_GOOGLETEST:= no MK_LLVM_LIBUNWIND:= no .endif @@ -505,6 +507,10 @@ MK_FREEBSD_UPDATE:= no .if ${MK_TESTS} == "no" MK_DTRACE_TESTS:= no +.endif + +.if ${MK_TESTS_SUPPORT} == "no" +MK_GOOGLETEST:= no .endif .if ${MK_ZONEINFO} == "no" Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Mar 15 21:11:47 2019 (r345202) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Mar 15 21:43:52 2019 (r345203) @@ -2776,6 +2776,135 @@ OLD_FILES+=usr/libexec/gdb OLD_FILES+=usr/libexec/kgdb .endif +.if ${MK_GOOGLETEST} == no +OLD_FILES+=usr/include/gmock/gmock-actions.h +OLD_FILES+=usr/include/gmock/gmock-cardinalities.h +OLD_FILES+=usr/include/gmock/gmock-generated-actions.h +OLD_FILES+=usr/include/gmock/gmock-generated-function-mockers.h +OLD_FILES+=usr/include/gmock/gmock-generated-matchers.h +OLD_FILES+=usr/include/gmock/gmock-generated-nice-strict.h +OLD_FILES+=usr/include/gmock/gmock-matchers.h +OLD_FILES+=usr/include/gmock/gmock-more-actions.h +OLD_FILES+=usr/include/gmock/gmock-more-matchers.h +OLD_FILES+=usr/include/gmock/gmock-spec-builders.h +OLD_FILES+=usr/include/gmock/gmock.h +OLD_FILES+=usr/include/gmock/internal/custom/gmock-generated-actions.h +OLD_FILES+=usr/include/gmock/internal/custom/gmock-matchers.h +OLD_FILES+=usr/include/gmock/internal/custom/gmock-port.h +OLD_FILES+=usr/include/gmock/internal/gmock-generated-internal-utils.h +OLD_FILES+=usr/include/gmock/internal/gmock-internal-utils.h +OLD_FILES+=usr/include/gmock/internal/gmock-port.h +OLD_DIRS+=usr/include/gmock +OLD_FILES+=usr/include/gtest/gtest_pred_impl.h +OLD_FILES+=usr/include/gtest/gtest_prod.h +OLD_FILES+=usr/include/gtest/gtest-death-test.h +OLD_FILES+=usr/include/gtest/gtest-message.h +OLD_FILES+=usr/include/gtest/gtest-param-test.h +OLD_FILES+=usr/include/gtest/gtest-printers.h +OLD_FILES+=usr/include/gtest/gtest-spi.h +OLD_FILES+=usr/include/gtest/gtest-test-part.h +OLD_FILES+=usr/include/gtest/gtest-typed-test.h +OLD_FILES+=usr/include/gtest/gtest.h +OLD_FILES+=usr/include/gtest/internal/custom/gtest-port.h +OLD_FILES+=usr/include/gtest/internal/custom/gtest-printers.h +OLD_FILES+=usr/include/gtest/internal/custom/gtest.h +OLD_FILES+=usr/include/gtest/internal/gtest-death-test-internal.h +OLD_FILES+=usr/include/gtest/internal/gtest-filepath.h +OLD_FILES+=usr/include/gtest/internal/gtest-internal.h +OLD_FILES+=usr/include/gtest/internal/gtest-linked_ptr.h +OLD_FILES+=usr/include/gtest/internal/gtest-param-util-generated.h +OLD_FILES+=usr/include/gtest/internal/gtest-param-util.h +OLD_FILES+=usr/include/gtest/internal/gtest-port-arch.h +OLD_FILES+=usr/include/gtest/internal/gtest-port.h +OLD_FILES+=usr/include/gtest/internal/gtest-string.h +OLD_FILES+=usr/include/gtest/internal/gtest-tuple.h +OLD_FILES+=usr/include/gtest/internal/gtest-type-util.h +OLD_DIRS+=usr/include/gtest +OLD_FILES+=usr/lib/libprivategmock_main.a +OLD_FILES+=usr/lib/libprivategmock_main.so +OLD_LIBS+=usr/lib/libprivategmock_main.so.0 +OLD_FILES+=usr/lib/libprivategmock_main_p.a +OLD_FILES+=usr/lib/libprivategmock.a +OLD_FILES+=usr/lib/libprivategmock.so +OLD_LIBS+=usr/lib/libprivategmock.so.0 +OLD_FILES+=usr/lib/libprivategmock_p.a +OLD_FILES+=usr/lib/libprivategtest_main.a +OLD_FILES+=usr/lib/libprivategtest_main.so +OLD_LIBS+=usr/lib/libprivategtest_main.so.0 +OLD_FILES+=usr/lib/libprivategtest_main_p.a +OLD_FILES+=usr/lib/libprivategtest.a +OLD_FILES+=usr/lib/libprivategtest.so +OLD_LIBS+=usr/lib/libprivategtest.so.0 +OLD_FILES+=usr/lib/libprivategtest_p.a +OLD_FILES+=usr/tests/lib/googletest/gmock/gmock_stress_test +OLD_FILES+=usr/tests/lib/googletest/gmock/Kyuafile +OLD_DIRS+=usr/tests/lib/googletest/gmock +OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock_ex_test +OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock_link_test +OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock_test +OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-actions_test +OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-cardinalities_test +OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-ex_test +OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-generated-actions_test +OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-generated-function-mockers_test +OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-generated-internal-utils_test +OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-generated-matchers_test +OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-internal-utils_test +OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-matchers_test +OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-more-actions_test +OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-nice-strict_test +OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-port_test +OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-spec-builders_test +OLD_FILES+=usr/tests/lib/googletest/gmock_main/Kyuafile +OLD_DIRS+=usr/tests/lib/googletest/gmock_main +OLD_FILES+=usr/tests/lib/googletest/gtest/googletest-param-test-test +OLD_FILES+=usr/tests/lib/googletest/gtest/gtest_all_test +OLD_FILES+=usr/tests/lib/googletest/gtest/gtest_environment_test +OLD_FILES+=usr/tests/lib/googletest/gtest/gtest_no_test_unittest +OLD_FILES+=usr/tests/lib/googletest/gtest/gtest_premature_exit_test +OLD_FILES+=usr/tests/lib/googletest/gtest/gtest_repeat_test +OLD_FILES+=usr/tests/lib/googletest/gtest/gtest_stress_test +OLD_FILES+=usr/tests/lib/googletest/gtest/gtest_throw_on_failure_ex_test +OLD_FILES+=usr/tests/lib/googletest/gtest/gtest-death-test_ex_catch_test +OLD_FILES+=usr/tests/lib/googletest/gtest/gtest-death-test_ex_nocatch_test +OLD_FILES+=usr/tests/lib/googletest/gtest/gtest-unittest-api_test +OLD_FILES+=usr/tests/lib/googletest/gtest/Kyuafile +OLD_DIRS+=usr/tests/lib/googletest/gtest +OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-death-test-test +OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-filepath-test +OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-linked-ptr-test +OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-listener-test +OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-message-test +OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-options-test +OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-port-test +OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-printers-test +OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-test-part-test +OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest_help_test_ +OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest_main_unittest +OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest_pred_impl_unittest +OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest_prod_test +OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest_sole_header_test +OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest_unittest +OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest_xml_outfile1_test_ +OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest_xml_outfile2_test_ +OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest-typed-test_test +OLD_FILES+=usr/tests/lib/googletest/gtest_main/Kyuafile +OLD_DIRS+=usr/tests/lib/googletest/gtest_main +OLD_FILES+=usr/tests/lib/googletest/Kyuafile +OLD_DIRS+=usr/tests/lib/googletest/ +OLD_FILES+=usr/tests/share/examples/tests/googletest/Kyuafile +OLD_FILES+=usr/tests/share/examples/tests/googletest/sample1_unittest +OLD_FILES+=usr/tests/share/examples/tests/googletest/sample10_unittest +OLD_FILES+=usr/tests/share/examples/tests/googletest/sample2_unittest +OLD_FILES+=usr/tests/share/examples/tests/googletest/sample3_unittest +OLD_FILES+=usr/tests/share/examples/tests/googletest/sample4_unittest +OLD_FILES+=usr/tests/share/examples/tests/googletest/sample5_unittest +OLD_FILES+=usr/tests/share/examples/tests/googletest/sample6_unittest +OLD_FILES+=usr/tests/share/examples/tests/googletest/sample7_unittest +OLD_FILES+=usr/tests/share/examples/tests/googletest/sample8_unittest +OLD_DIRS+=usr/tests/share/examples/tests/googletest +.endif + .if ${MK_GPIO} == no OLD_FILES+=usr/include/libgpio.h OLD_FILES+=usr/lib/libgpio.a Copied and modified: head/tools/build/options/WITHOUT_GOOGLETEST (from r345031, projects/import-googletest-1.8.1/tools/build/options/WITHOUT_GOOGLETEST) ============================================================================== --- projects/import-googletest-1.8.1/tools/build/options/WITHOUT_GOOGLETEST Mon Mar 11 21:56:35 2019 (r345031, copy source) +++ head/tools/build/options/WITHOUT_GOOGLETEST Fri Mar 15 21:43:52 2019 (r345203) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -Set to not build nor install +Set to neither build nor install .Lb libgmock , .Lb libgtest , and dependent tests. From owner-svn-src-all@freebsd.org Fri Mar 15 21:46:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C1741530160; Fri, 15 Mar 2019 21:46:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C96D185867; Fri, 15 Mar 2019 21:46:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B2B6A183A6; Fri, 15 Mar 2019 21:46:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FLks8K098639; Fri, 15 Mar 2019 21:46:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FLksef098638; Fri, 15 Mar 2019 21:46:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201903152146.x2FLksef098638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Fri, 15 Mar 2019 21:46:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345204 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 345204 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C96D185867 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 21:46:55 -0000 Author: ngie Date: Fri Mar 15 21:46:54 2019 New Revision: 345204 URL: https://svnweb.freebsd.org/changeset/base/345204 Log: Regenerate src.conf(5) after r345203 (MK_GOOGLETEST addition) MFC after: 2 months MFC with: r345203 Approved by: emaste (mentor; implicit: https://reviews.freebsd.org/D19551) Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Fri Mar 15 21:43:52 2019 (r345203) +++ head/share/man/man5/src.conf.5 Fri Mar 15 21:46:54 2019 (r345204) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd March 6, 2019 +.Dd March 15, 2019 .Dt SRC.CONF 5 .Os .Sh NAME @@ -828,6 +828,11 @@ Set to not build GNU Set this option to include GNU extensions in .Xr bsdgrep 1 by linking against libgnuregex. +.It Va WITHOUT_GOOGLETEST +Set to neither build nor install +.Lb libgmock , +.Lb libgtest , +and dependent tests. .It Va WITHOUT_GPIO Set to not build .Xr gpioctl 8 @@ -1826,6 +1831,10 @@ When set, it enforces these options: When set, these options are also in effect: .Pp .Bl -inset -compact +.It Va WITHOUT_GOOGLETEST +(unless +.Va WITH_GOOGLETEST +is set explicitly) .It Va WITHOUT_TESTS_SUPPORT (unless .Va WITH_TESTS_SUPPORT @@ -1833,6 +1842,12 @@ is set explicitly) .El .It Va WITHOUT_TESTS_SUPPORT Set to disables the build of all test-related dependencies, including ATF. +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_GOOGLETEST +.El .It Va WITHOUT_TEXTPROC Set to not build programs used for text processing. From owner-svn-src-all@freebsd.org Fri Mar 15 21:49:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42B45153025D; Fri, 15 Mar 2019 21:49:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D1C3585A19; Fri, 15 Mar 2019 21:49:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C5F4F183A9; Fri, 15 Mar 2019 21:49:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FLnKkN098779; Fri, 15 Mar 2019 21:49:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FLnK3n098777; Fri, 15 Mar 2019 21:49:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201903152149.x2FLnK3n098777@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Fri, 15 Mar 2019 21:49:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345205 - in head/cddl/usr.sbin/zfsd: . tests X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in head/cddl/usr.sbin/zfsd: . tests X-SVN-Commit-Revision: 345205 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D1C3585A19 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 21:49:21 -0000 Author: ngie Date: Fri Mar 15 21:49:19 2019 New Revision: 345205 URL: https://svnweb.freebsd.org/changeset/base/345205 Log: Integrate cddl/usr.sbin/zfds/tests into the FreeBSD test suite This change integrates the unit tests for zfsd into the test suite using the integration method described in r345203. This change removes the `LOCALBASE` includes added for the port version of googlemock/googletest, as well as unnecessary `LIBADD`/`DPADD` and `CXXFLAGS` defines, which are included in the `GTEST_CXXFLAGS` variable, as part of r345203. Reviewed by: asomers Approved by: emaste (mentor) MFC after: 2 months MFC with: r345203 Differential Revision: https://reviews.freebsd.org/D19552 Modified: head/cddl/usr.sbin/zfsd/Makefile head/cddl/usr.sbin/zfsd/Makefile.common head/cddl/usr.sbin/zfsd/tests/Makefile Modified: head/cddl/usr.sbin/zfsd/Makefile ============================================================================== --- head/cddl/usr.sbin/zfsd/Makefile Fri Mar 15 21:46:54 2019 (r345204) +++ head/cddl/usr.sbin/zfsd/Makefile Fri Mar 15 21:49:19 2019 (r345205) @@ -1,12 +1,13 @@ # $FreeBSD$ +.include + .include "Makefile.common" PROG_CXX= zfsd MAN= zfsd.8 -.include +HAS_TESTS= +SUBDIR.${MK_GOOGLETEST}+= tests -# The unittests require devel/googletest and devel/googlemock from ports. -# Don't automatically build them. -SUBDIR= +.include Modified: head/cddl/usr.sbin/zfsd/Makefile.common ============================================================================== --- head/cddl/usr.sbin/zfsd/Makefile.common Fri Mar 15 21:46:54 2019 (r345204) +++ head/cddl/usr.sbin/zfsd/Makefile.common Fri Mar 15 21:49:19 2019 (r345205) @@ -28,12 +28,11 @@ INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/li INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +INCFLAGS+= -I${SRCTOP}/cddl/usr.sbin CFLAGS= -g -DNEED_SOLARIS_BOOLEAN ${INCFLAGS} -DPADD= ${LIBDEVDCTL} ${LIBZFS} ${LIBZFS_CORE} ${LIBUTIL} ${LIBGEOM} \ - ${LIBBSDXML} ${LIBSBUF} ${LIBNVPAIR} ${LIBUUTIL} -LIBADD= devdctl zfs zfs_core util geom bsdxml sbuf nvpair uutil +LIBADD+= devdctl zfs zfs_core util geom bsdxml sbuf nvpair uutil cscope: find ${.CURDIR} -type f -a \( -name "*.[ch]" -o -name "*.cc" \) \ Modified: head/cddl/usr.sbin/zfsd/tests/Makefile ============================================================================== --- head/cddl/usr.sbin/zfsd/tests/Makefile Fri Mar 15 21:46:54 2019 (r345204) +++ head/cddl/usr.sbin/zfsd/tests/Makefile Fri Mar 15 21:49:19 2019 (r345205) @@ -3,30 +3,12 @@ .include "${.CURDIR}/../Makefile.common" .PATH: ${.CURDIR:H} -PLAIN_TESTS_CXX= zfsd_unittest -SRCS.zfsd_unittest:= ${SRCS:Nzfsd_main.cc} -SRCS.zfsd_unittest+= libmocks.c zfsd_unittest.cc -SRCS= +GTESTS= zfsd_unittest -# Use #include in test programs. -INCFLAGS+= -I${.CURDIR:H:H} +SRCS.zfsd_unittest:= ${SRCS:Nzfsd_main.cc} +SRCS.zfsd_unittest+= libmocks.c zfsd_unittest.cc +.undef SRCS -.if defined(DESTDIR) || defined(SYSROOT) -INCFLAGS+= -I${SYSROOT:U${DESTDIR}}/usr/include -LDFLAGS.zfsd_unittest+= -L${SYSROOT:U${DESTDIR}}/lib \ - -L${SYSROOT:U${DESTDIR}}/usr/lib -.endif - -# Googletest options -INCFLAGS+= -I${LOCALBASE}/include -D_THREAD_SAFE -pthread -LDFLAGS.zfsd_unittest+= -L${LOCALBASE}/lib -D_THREAD_SAFE -pthread -LDADD.zfsd_unittest+= ${LOCALBASE}/lib/libgtest.a - -# GoogleMock options -LDADD.zfsd_unittest+= ${LOCALBASE}/lib/libgmock.a ${LOCALBASE}/lib/libgmock_main.a - -# Googlemock fails if we don't have this line -# https://groups.google.com/forum/#!msg/googletestframework/h8ixEPCFm0o/amwfu4xGJb0J -CFLAGS.zfsd_unittest+= -DGTEST_HAS_PTHREAD +LIBADD.zfsd_unittest+= gmock_main .include From owner-svn-src-all@freebsd.org Fri Mar 15 21:53:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 778A21530545; Fri, 15 Mar 2019 21:53:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E76185F2A; Fri, 15 Mar 2019 21:53:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 097381F9CA; Fri, 15 Mar 2019 21:53:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve To: Chuck Tuffli Cc: cem@freebsd.org, Andrew Thompson , src-committers , svn-src-all , svn-src-head References: <201903150211.x2F2BSai079898@repo.freebsd.org> <5adee283-2cac-14d2-ec06-bce43bf3bcde@FreeBSD.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <98cfb3b3-0e2a-02e0-b694-62cf1fd02f23@FreeBSD.org> Date: Fri, 15 Mar 2019 14:53:53 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 0E76185F2A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.94)[-0.938,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 21:53:57 -0000 On 3/15/19 2:36 PM, Chuck Tuffli wrote: > I was contacted by a bhyve user who mentioned that Windows didn't seem > to like bhyve's NVMe emulation. This change doesn't fix that, but this > is one of a handful of changes inspired by qemu. While trying to > reverse engineer why Windows is grumpy, I've run across several > comments in the qemu code which make claims about what Windows needs > to see before starting a device. This was one of those, and (at the > time) seemed innocuous enough to commit. Ok. It seems like a bit of an odd requirement, but perhaps Windows PCI-e error handling stuff assumes it is present? It might be worth expanding the comment to note that as the reason? -- John Baldwin From owner-svn-src-all@freebsd.org Fri Mar 15 22:39:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66B53153221F; Fri, 15 Mar 2019 22:39:57 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 072D28732E; Fri, 15 Mar 2019 22:39:57 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EDAE518C05; Fri, 15 Mar 2019 22:39:56 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FMduCB025808; Fri, 15 Mar 2019 22:39:56 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FMdutD025804; Fri, 15 Mar 2019 22:39:56 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201903152239.x2FMdutD025804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 15 Mar 2019 22:39:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345206 - in head/sys: geom kern sys X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys: geom kern sys X-SVN-Commit-Revision: 345206 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 072D28732E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 22:39:57 -0000 Author: cem Date: Fri Mar 15 22:39:55 2019 New Revision: 345206 URL: https://svnweb.freebsd.org/changeset/base/345206 Log: stack(9): Drop unused API mode and comment that referenced it Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D19601 Modified: head/sys/geom/geom_io.c head/sys/kern/subr_stack.c head/sys/sys/_stack.h head/sys/sys/stack.h Modified: head/sys/geom/geom_io.c ============================================================================== --- head/sys/geom/geom_io.c Fri Mar 15 21:49:19 2019 (r345205) +++ head/sys/geom/geom_io.c Fri Mar 15 22:39:55 2019 (r345206) @@ -155,7 +155,7 @@ g_new_bio(void) CTR1(KTR_GEOM, "g_new_bio(): %p", bp); stack_save(&st); - CTRSTACK(KTR_GEOM, &st, 3, 0); + CTRSTACK(KTR_GEOM, &st, 3); } #endif return (bp); @@ -173,7 +173,7 @@ g_alloc_bio(void) CTR1(KTR_GEOM, "g_alloc_bio(): %p", bp); stack_save(&st); - CTRSTACK(KTR_GEOM, &st, 3, 0); + CTRSTACK(KTR_GEOM, &st, 3); } #endif return (bp); @@ -188,7 +188,7 @@ g_destroy_bio(struct bio *bp) CTR1(KTR_GEOM, "g_destroy_bio(): %p", bp); stack_save(&st); - CTRSTACK(KTR_GEOM, &st, 3, 0); + CTRSTACK(KTR_GEOM, &st, 3); } #endif uma_zfree(biozone, bp); @@ -236,7 +236,7 @@ g_clone_bio(struct bio *bp) CTR2(KTR_GEOM, "g_clone_bio(%p): %p", bp, bp2); stack_save(&st); - CTRSTACK(KTR_GEOM, &st, 3, 0); + CTRSTACK(KTR_GEOM, &st, 3); } #endif return(bp2); @@ -265,7 +265,7 @@ g_duplicate_bio(struct bio *bp) CTR2(KTR_GEOM, "g_duplicate_bio(%p): %p", bp, bp2); stack_save(&st); - CTRSTACK(KTR_GEOM, &st, 3, 0); + CTRSTACK(KTR_GEOM, &st, 3); } #endif return(bp2); Modified: head/sys/kern/subr_stack.c ============================================================================== --- head/sys/kern/subr_stack.c Fri Mar 15 21:49:19 2019 (r345205) +++ head/sys/kern/subr_stack.c Fri Mar 15 22:39:55 2019 (r345206) @@ -215,7 +215,7 @@ stack_sbuf_print_ddb(struct sbuf *sb, const struct sta #ifdef KTR void stack_ktr(u_int mask, const char *file, int line, const struct stack *st, - u_int depth, int cheap) + u_int depth) { #ifdef DDB const char *name; @@ -224,31 +224,15 @@ stack_ktr(u_int mask, const char *file, int line, cons #endif KASSERT(st->depth <= STACK_MAX, ("bogus stack")); - if (cheap) { - ktr_tracepoint(mask, file, line, "#0 %p %p %p %p %p %p", - st->pcs[0], st->pcs[1], st->pcs[2], st->pcs[3], - st->pcs[4], st->pcs[5]); - if (st->depth <= 6) - return; - ktr_tracepoint(mask, file, line, "#1 %p %p %p %p %p %p", - st->pcs[6], st->pcs[7], st->pcs[8], st->pcs[9], - st->pcs[10], st->pcs[11]); - if (st->depth <= 12) - return; - ktr_tracepoint(mask, file, line, "#2 %p %p %p %p %p %p", - st->pcs[12], st->pcs[13], st->pcs[14], st->pcs[15], - st->pcs[16], st->pcs[17]); #ifdef DDB - } else { - if (depth == 0 || st->depth < depth) - depth = st->depth; - for (i = 0; i < depth; i++) { - (void)stack_symbol_ddb(st->pcs[i], &name, &offset); - ktr_tracepoint(mask, file, line, "#%d %p at %s+%#lx", - i, st->pcs[i], (u_long)name, offset, 0, 0); - } -#endif + if (depth == 0 || st->depth < depth) + depth = st->depth; + for (i = 0; i < depth; i++) { + (void)stack_symbol_ddb(st->pcs[i], &name, &offset); + ktr_tracepoint(mask, file, line, "#%d %p at %s+%#lx", + i, st->pcs[i], (u_long)name, offset, 0, 0); } +#endif } #endif Modified: head/sys/sys/_stack.h ============================================================================== --- head/sys/sys/_stack.h Fri Mar 15 21:49:19 2019 (r345205) +++ head/sys/sys/_stack.h Fri Mar 15 22:39:55 2019 (r345206) @@ -31,7 +31,7 @@ #ifndef _SYS__STACK_H_ #define _SYS__STACK_H_ -#define STACK_MAX 18 /* Don't change, stack_ktr relies on this. */ +#define STACK_MAX 18 struct stack { int depth; Modified: head/sys/sys/stack.h ============================================================================== --- head/sys/sys/stack.h Fri Mar 15 21:49:19 2019 (r345205) +++ head/sys/sys/stack.h Fri Mar 15 22:39:55 2019 (r345206) @@ -51,13 +51,13 @@ int stack_sbuf_print_flags(struct sbuf *, const stru int); #ifdef KTR void stack_ktr(u_int, const char *, int, const struct stack *, - u_int, int); -#define CTRSTACK(m, st, depth, cheap) do { \ + u_int); +#define CTRSTACK(m, st, depth) do { \ if (KTR_COMPILE & (m)) \ - stack_ktr((m), __FILE__, __LINE__, st, depth, cheap); \ + stack_ktr((m), __FILE__, __LINE__, st, depth); \ } while(0) #else -#define CTRSTACK(m, st, depth, cheap) +#define CTRSTACK(m, st, depth) #endif /* MD Routines. */ From owner-svn-src-all@freebsd.org Sat Mar 16 03:41:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03EAA153F720; Sat, 16 Mar 2019 03:41:17 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 17AED6BC1C; Sat, 16 Mar 2019 03:41:14 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg1-x52f.google.com with SMTP id e17so7740465pgd.2; Fri, 15 Mar 2019 20:41:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=gc7zl/kSSyHFIELO2OhGG1IPuzuj2x/44JcBE1SyNAQ=; b=eiOaqx5Kvx64SG0JPyAEjY77PCheGCco3IUhXSDDRJbTEcGEBoY59dvyd0ETGzNv7h IVLasKITdh7dMlE56Crbhg3FR1bZYPeoZLuefUjobreh8f/2JaAdowqOJd0/y2d6SC1u pYBMZDmimZjXLld5kErybiCtTrWDb03APVrYSAtUYHwrD5dvBJqC61FaRuO1C2Y77bn6 mQLrWye+T2vTmYXd8Y1pCpA0dvse9iZ4rcAXdwIBOXlPmOdGZ1nUb2FO7qjrmZ/C4Od/ LUQTZ0o6Z3S2CZ7l7Hs6m8VSpGW+CoOFHHHCQzJHB4imLuvFAB61suHwhCVP2vEpNBYy fTbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=gc7zl/kSSyHFIELO2OhGG1IPuzuj2x/44JcBE1SyNAQ=; b=IvyAJA6JyDOv4J1jDbIE43RK/FVcSQWjsBQFcPcj4daH57H8bv3YLLIr+UAug1M7w4 eyYIkHskFoFVmMLdPjMvq533Y22PL1ixp6Aw6udoRWbYT7QzvfC/bJ8dMWuofknM13ZR zSc5gVQ6r4hS1KzjqNXT/rVlBkRllv/OOEAnOuw2J+aRK2A0yspRJOUK3L1TKevVtsRi ngWolzwE5RCtYPlmk7niiG7NoNhrPsNuiHExrH9yskkzGsdoKRwo1HnqcN+Z6acL3sag qSy5vRyB8s59ONFMxHHQRpUPzH/xRtc64gWAoF6xy83XPdp0Q9papU/IhV02pPAyekqq bE8g== X-Gm-Message-State: APjAAAXwIxas+AnYf5/X1aGBnfsFgJ6KjS3sGtHH72M1qHlMc46yOh0O h5xZhK+3PxQO4rk1WUTE86+TOqn6 X-Google-Smtp-Source: APXvYqyqhINm8xwNUbSeYq7Mt6xPgwYuGlGeXdGAtsUxHOkGR+pJG38orgoW700mPSF8fqhmehHfxA== X-Received: by 2002:aa7:8012:: with SMTP id j18mr7803827pfi.42.1552707672483; Fri, 15 Mar 2019 20:41:12 -0700 (PDT) Received: from [192.168.20.7] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id j9sm4926076pfc.67.2019.03.15.20.41.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Mar 2019 20:41:11 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: svn commit: r345216 - head/tests/sys/cddl/zfs/tests/delegate From: Enji Cooper In-Reply-To: <201903160337.x2G3bltq082570@repo.freebsd.org> Date: Fri, 15 Mar 2019 20:41:11 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <73B6DE0E-278D-404E-B1D0-988D73B59C62@gmail.com> References: <201903160337.x2G3bltq082570@repo.freebsd.org> To: Enji Cooper X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: 17AED6BC1C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=eiOaqx5K; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::52f as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com X-Spamd-Result: default: False [-6.02 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.69)[-0.689,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(-2.82)[ip: (-9.23), ipnet: 2607:f8b0::/32(-2.73), asn: 15169(-2.08), country: US(-0.07)]; RCVD_IN_DNSWL_NONE(0.00)[f.2.5.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 03:41:17 -0000 > On Mar 15, 2019, at 8:37 PM, Enji Cooper wrote: >=20 > Author: ngie > Date: Sat Mar 16 03:37:47 2019 > New Revision: 345216 > URL: https://svnweb.freebsd.org/changeset/base/345216 >=20 > Log: > Remove duplicate `${PACKAGE}FILES+=3D cleanup.ksh` line >=20 > This mutes the duplicate target warning emitted via bsd.files.mk each = build. >=20 > MFC after: 1 week > Reviewed by: asomers > Approved by: emaste (mentor) > Differential Revision: https://reviews.freebsd.org/D19603 This also accidentally included svn:mergeinfo to ^/head that I didn=E2=80=99= t commit (by accident) as part of r345203 and r345205. I will omit this = from the upcoming merge commits (there isn=E2=80=99t much value in = reverting it IMHO). -Enji= From owner-svn-src-all@freebsd.org Sat Mar 16 03:37:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A64B153F505; Sat, 16 Mar 2019 03:37:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EEB3F6B95F; Sat, 16 Mar 2019 03:37:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DE67F1C3EB; Sat, 16 Mar 2019 03:37:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2G3blEU082571; Sat, 16 Mar 2019 03:37:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2G3bltq082570; Sat, 16 Mar 2019 03:37:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201903160337.x2G3bltq082570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Sat, 16 Mar 2019 03:37:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345216 - head/tests/sys/cddl/zfs/tests/delegate X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tests/sys/cddl/zfs/tests/delegate X-SVN-Commit-Revision: 345216 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EEB3F6B95F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.92 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.92)[-0.918,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 03:37:48 -0000 Author: ngie Date: Sat Mar 16 03:37:47 2019 New Revision: 345216 URL: https://svnweb.freebsd.org/changeset/base/345216 Log: Remove duplicate `${PACKAGE}FILES+= cleanup.ksh` line This mutes the duplicate target warning emitted via bsd.files.mk each build. MFC after: 1 week Reviewed by: asomers Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D19603 Modified: head/tests/sys/cddl/zfs/tests/delegate/Makefile Directory Properties: head/ (props changed) Modified: head/tests/sys/cddl/zfs/tests/delegate/Makefile ============================================================================== --- head/tests/sys/cddl/zfs/tests/delegate/Makefile Sat Mar 16 03:16:44 2019 (r345215) +++ head/tests/sys/cddl/zfs/tests/delegate/Makefile Sat Mar 16 03:37:47 2019 (r345216) @@ -12,7 +12,6 @@ TEST_METADATA+= required_user="root" TEST_METADATA+= is_exclusive=true ${PACKAGE}FILES+= cleanup.ksh -${PACKAGE}FILES+= cleanup.ksh ${PACKAGE}FILES+= delegate.cfg ${PACKAGE}FILES+= delegate_common.kshlib ${PACKAGE}FILES+= setup.ksh From owner-svn-src-all@freebsd.org Sat Mar 16 10:14:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90D27154CE86; Sat, 16 Mar 2019 10:14:04 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2254B81B38; Sat, 16 Mar 2019 10:14:04 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A2401209B6; Sat, 16 Mar 2019 10:14:03 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2GAE3P1092682; Sat, 16 Mar 2019 10:14:03 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2GAE3He092681; Sat, 16 Mar 2019 10:14:03 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201903161014.x2GAE3He092681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sat, 16 Mar 2019 10:14:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345223 - head/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/netpfil/pf X-SVN-Commit-Revision: 345223 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2254B81B38 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 10:14:04 -0000 Author: kp Date: Sat Mar 16 10:14:03 2019 New Revision: 345223 URL: https://svnweb.freebsd.org/changeset/base/345223 Log: pf: Rename pfsync bucket lock Previously the main pfsync lock and the bucket locks shared the same name. This lead to spurious warnings from WITNESS like this: acquiring duplicate lock of same type: "pfsync" 1st pfsync @ /usr/src/sys/netpfil/pf/if_pfsync.c:1402 2nd pfsync @ /usr/src/sys/netpfil/pf/if_pfsync.c:1429 It's perfectly okay to grab both the main pfsync lock and a bucket lock at the same time. We don't need different names for each bucket lock, because we should always only acquire a single one of those at a time. MFC after: 1 week Modified: head/sys/netpfil/pf/if_pfsync.c Modified: head/sys/netpfil/pf/if_pfsync.c ============================================================================== --- head/sys/netpfil/pf/if_pfsync.c Sat Mar 16 06:12:28 2019 (r345222) +++ head/sys/netpfil/pf/if_pfsync.c Sat Mar 16 10:14:03 2019 (r345223) @@ -363,7 +363,7 @@ pfsync_clone_create(struct if_clone *ifc, int unit, ca M_PFSYNC, M_ZERO | M_WAITOK); for (c = 0; c < pfsync_buckets; c++) { b = &sc->sc_buckets[c]; - mtx_init(&b->b_mtx, pfsyncname, NULL, MTX_DEF); + mtx_init(&b->b_mtx, "pfsync bucket", NULL, MTX_DEF); b->b_id = c; b->b_sc = sc; From owner-svn-src-all@freebsd.org Sat Mar 16 06:09:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1DF8154431B; Sat, 16 Mar 2019 06:09:46 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 930CC7098F; Sat, 16 Mar 2019 06:09:46 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 865331DE4C; Sat, 16 Mar 2019 06:09:46 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2G69k9N061098; Sat, 16 Mar 2019 06:09:46 GMT (envelope-from jmallett@FreeBSD.org) Received: (from jmallett@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2G69kO3061096; Sat, 16 Mar 2019 06:09:46 GMT (envelope-from jmallett@FreeBSD.org) Message-Id: <201903160609.x2G69kO3061096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmallett set sender to jmallett@FreeBSD.org using -f From: Juli Mallett Date: Sat, 16 Mar 2019 06:09:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345221 - in head/sys/mips: include mips X-SVN-Group: head X-SVN-Commit-Author: jmallett X-SVN-Commit-Paths: in head/sys/mips: include mips X-SVN-Commit-Revision: 345221 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 930CC7098F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.93)[-0.928,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 06:09:47 -0000 Author: jmallett Date: Sat Mar 16 06:09:45 2019 New Revision: 345221 URL: https://svnweb.freebsd.org/changeset/base/345221 Log: Remove obsolete wrappers for 64-bit loads/stores which were only used by the removed (r342255) SiByte port. Reviewed by: imp Modified: head/sys/mips/include/cpufunc.h head/sys/mips/mips/support.S Modified: head/sys/mips/include/cpufunc.h ============================================================================== --- head/sys/mips/include/cpufunc.h Sat Mar 16 04:24:02 2019 (r345220) +++ head/sys/mips/include/cpufunc.h Sat Mar 16 06:09:45 2019 (r345221) @@ -371,27 +371,19 @@ get_intr_mask(void) return (mips_rd_status() & MIPS_SR_INT_MASK); } -#if defined(__GNUC__) && !defined(__mips_o32) -#define mips3_ld(a) (*(const volatile uint64_t *)(a)) -#define mips3_sd(a, v) (*(volatile uint64_t *)(a) = (v)) -#else -uint64_t mips3_ld(volatile uint64_t *va); -void mips3_sd(volatile uint64_t *, uint64_t); -#endif /* __GNUC__ */ - #endif /* _KERNEL */ #define readb(va) (*(volatile uint8_t *) (va)) #define readw(va) (*(volatile uint16_t *) (va)) #define readl(va) (*(volatile uint32_t *) (va)) -#if defined(__GNUC__) && !defined(__mips_o32) +#if !defined(__mips_o32) #define readq(a) (*(volatile uint64_t *)(a)) #endif #define writeb(va, d) (*(volatile uint8_t *) (va) = (d)) #define writew(va, d) (*(volatile uint16_t *) (va) = (d)) #define writel(va, d) (*(volatile uint32_t *) (va) = (d)) -#if defined(__GNUC__) && !defined(__mips_o32) +#if !defined(__mips_o32) #define writeq(va, d) (*(volatile uint64_t *) (va) = (d)) #endif Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Sat Mar 16 04:24:02 2019 (r345220) +++ head/sys/mips/mips/support.S Sat Mar 16 06:09:45 2019 (r345221) @@ -865,78 +865,3 @@ LEAF(longjmp) jr ra li v0, 1 # longjmp return END(longjmp) - -LEAF(mips3_ld) - .set push - .set noreorder - .set mips64 -#if defined(__mips_o32) - mfc0 t0, MIPS_COP_0_STATUS # turn off interrupts - and t1, t0, ~(MIPS_SR_INT_IE) - mtc0 t1, MIPS_COP_0_STATUS - COP0_SYNC - nop - nop - nop - - ld v0, 0(a0) -#if _BYTE_ORDER == _BIG_ENDIAN - dsll v1, v0, 32 - dsra v1, v1, 32 # low word in v1 - dsra v0, v0, 32 # high word in v0 -#else - dsra v1, v0, 32 # high word in v1 - dsll v0, v0, 32 - dsra v0, v0, 32 # low word in v0 -#endif - - mtc0 t0, MIPS_COP_0_STATUS # restore intr status. - COP0_SYNC - nop -#else /* !__mips_o32 */ - ld v0, 0(a0) -#endif /* !__mips_o32 */ - - jr ra - nop - .set pop -END(mips3_ld) - -LEAF(mips3_sd) - .set push - .set mips64 - .set noreorder -#if defined(__mips_o32) - mfc0 t0, MIPS_COP_0_STATUS # turn off interrupts - and t1, t0, ~(MIPS_SR_INT_IE) - mtc0 t1, MIPS_COP_0_STATUS - COP0_SYNC - nop - nop - nop - - # NOTE: a1 is padding! - -#if _BYTE_ORDER == _BIG_ENDIAN - dsll a2, a2, 32 # high word in a2 - dsll a3, a3, 32 # low word in a3 - dsrl a3, a3, 32 -#else - dsll a2, a2, 32 # low word in a2 - dsrl a2, a2, 32 - dsll a3, a3, 32 # high word in a3 -#endif - or a1, a2, a3 - sd a1, 0(a0) - - mtc0 t0, MIPS_COP_0_STATUS # restore intr status. - COP0_SYNC - nop -#else /* !__mips_o32 */ - sd a1, 0(a0) -#endif /* !__mips_o32 */ - - jr ra - nop - .set pop -END(mips3_sd) From owner-svn-src-all@freebsd.org Sat Mar 16 11:31:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 503221525CDC; Sat, 16 Mar 2019 11:31:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E7C68847AC; Sat, 16 Mar 2019 11:31:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB436216F9; Sat, 16 Mar 2019 11:31:04 +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 x2GBV491030756; Sat, 16 Mar 2019 11:31:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2GBV2hK030744; Sat, 16 Mar 2019 11:31:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903161131.x2GBV2hK030744@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 16 Mar 2019 11:31:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345227 - in head/sys: amd64/amd64 amd64/include arm/arm arm64/arm64 i386/i386 kern mips/mips powerpc/powerpc riscv/riscv sparc64/sparc64 sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 amd64/include arm/arm arm64/arm64 i386/i386 kern mips/mips powerpc/powerpc riscv/riscv sparc64/sparc64 sys X-SVN-Commit-Revision: 345227 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E7C68847AC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 11:31:05 -0000 Author: kib Date: Sat Mar 16 11:31:01 2019 New Revision: 345227 URL: https://svnweb.freebsd.org/changeset/base/345227 Log: amd64: Add md process flags and first P_MD_PTI flag. PTI mode for the process pmap on exec is activated iff P_MD_PTI is set. On exec, the existing vmspace can be reused only if pti mode of the pmap matches the P_MD_PTI flag of the process. Add MD cpu_exec_vmspace_reuse() callback for exec_new_vmspace() which can vetoed reuse of the existing vmspace. MFC note: md_flags change struct proc KBI. Reviewed by: jhb, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D19514 Modified: head/sys/amd64/amd64/pmap.c head/sys/amd64/amd64/vm_machdep.c head/sys/amd64/include/proc.h head/sys/arm/arm/vm_machdep.c head/sys/arm64/arm64/vm_machdep.c head/sys/i386/i386/vm_machdep.c head/sys/kern/kern_exec.c head/sys/kern/kern_thread.c head/sys/mips/mips/vm_machdep.c head/sys/powerpc/powerpc/vm_machdep.c head/sys/riscv/riscv/vm_machdep.c head/sys/sparc64/sparc64/vm_machdep.c head/sys/sys/proc.h Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Mar 16 11:16:09 2019 (r345226) +++ head/sys/amd64/amd64/pmap.c Sat Mar 16 11:31:01 2019 (r345227) @@ -2853,6 +2853,7 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t va, pd_entry_t void pmap_pinit0(pmap_t pmap) { + struct proc *p; int i; PMAP_LOCK_INIT(pmap); @@ -2871,6 +2872,12 @@ pmap_pinit0(pmap_t pmap) pmap->pm_pcids[i].pm_gen = 1; } pmap_activate_boot(pmap); + if (pti) { + p = curproc; + PROC_LOCK(p); + p->p_md.md_flags |= P_MD_KPTI; + PROC_UNLOCK(p); + } if ((cpu_stdext_feature2 & CPUID_STDEXT2_PKU) != 0) { pmap_pkru_ranges_zone = uma_zcreate("pkru ranges", @@ -2957,7 +2964,7 @@ pmap_pinit_type(pmap_t pmap, enum pmap_type pm_type, i if (pm_type == PT_X86) { pmap->pm_cr3 = pml4phys; pmap_pinit_pml4(pml4pg); - if (pti) { + if ((curproc->p_md.md_flags & P_MD_KPTI) != 0) { pml4pgu = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_WAITOK); pmap->pm_pml4u = (pml4_entry_t *)PHYS_TO_DMAP( Modified: head/sys/amd64/amd64/vm_machdep.c ============================================================================== --- head/sys/amd64/amd64/vm_machdep.c Sat Mar 16 11:16:09 2019 (r345226) +++ head/sys/amd64/amd64/vm_machdep.c Sat Mar 16 11:31:01 2019 (r345227) @@ -369,6 +369,14 @@ cpu_thread_free(struct thread *td) cpu_thread_clean(td); } +bool +cpu_exec_vmspace_reuse(struct proc *p, vm_map_t map) +{ + + return (((curproc->p_md.md_flags & P_MD_KPTI) != 0) == + (vm_map_pmap(map)->pm_ucr3 != PMAP_NO_CR3)); +} + void cpu_set_syscall_retval(struct thread *td, int error) { Modified: head/sys/amd64/include/proc.h ============================================================================== --- head/sys/amd64/include/proc.h Sat Mar 16 11:16:09 2019 (r345226) +++ head/sys/amd64/include/proc.h Sat Mar 16 11:31:01 2019 (r345227) @@ -40,7 +40,8 @@ /* * List of locks - * k - only accessed by curthread + * c - proc lock + * k - only accessed by curthread * pp - pmap.c:invl_gen_mtx */ @@ -69,7 +70,10 @@ struct mdthread { struct mdproc { struct proc_ldt *md_ldt; /* (t) per-process ldt */ struct system_segment_descriptor md_ldt_sd; + u_int md_flags; /* (c) md process flags P_MD */ }; + +#define P_MD_KPTI 0x00000001 /* Enable KPTI on exec */ #define KINFO_PROC_SIZE 1088 #define KINFO_PROC32_SIZE 768 Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Sat Mar 16 11:16:09 2019 (r345226) +++ head/sys/arm/arm/vm_machdep.c Sat Mar 16 11:31:01 2019 (r345227) @@ -345,3 +345,10 @@ cpu_exit(struct thread *td) { } +bool +cpu_exec_vmspace_reuse(struct proc *p __unused, vm_map_t map __unused) +{ + + return (true); +} + Modified: head/sys/arm64/arm64/vm_machdep.c ============================================================================== --- head/sys/arm64/arm64/vm_machdep.c Sat Mar 16 11:16:09 2019 (r345226) +++ head/sys/arm64/arm64/vm_machdep.c Sat Mar 16 11:31:01 2019 (r345227) @@ -279,6 +279,13 @@ cpu_exit(struct thread *td) { } +bool +cpu_exec_vmspace_reuse(struct proc *p __unused, vm_map_t map __unused) +{ + + return (true); +} + void swi_vm(void *v) { Modified: head/sys/i386/i386/vm_machdep.c ============================================================================== --- head/sys/i386/i386/vm_machdep.c Sat Mar 16 11:16:09 2019 (r345226) +++ head/sys/i386/i386/vm_machdep.c Sat Mar 16 11:31:01 2019 (r345227) @@ -382,6 +382,13 @@ cpu_thread_free(struct thread *td) cpu_thread_clean(td); } +bool +cpu_exec_vmspace_reuse(struct proc *p __unused, vm_map_t map __unused) +{ + + return (true); +} + void cpu_set_syscall_retval(struct thread *td, int error) { Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Sat Mar 16 11:16:09 2019 (r345226) +++ head/sys/kern/kern_exec.c Sat Mar 16 11:31:01 2019 (r345227) @@ -1100,7 +1100,8 @@ exec_new_vmspace(struct image_params *imgp, struct sys else sv_minuser = MAX(sv->sv_minuser, PAGE_SIZE); if (vmspace->vm_refcnt == 1 && vm_map_min(map) == sv_minuser && - vm_map_max(map) == sv->sv_maxuser) { + vm_map_max(map) == sv->sv_maxuser && + cpu_exec_vmspace_reuse(p, map)) { shmexit(vmspace); pmap_remove_pages(vmspace_pmap(vmspace)); vm_map_remove(map, vm_map_min(map), vm_map_max(map)); Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Sat Mar 16 11:16:09 2019 (r345226) +++ head/sys/kern/kern_thread.c Sat Mar 16 11:31:01 2019 (r345227) @@ -94,7 +94,7 @@ _Static_assert(offsetof(struct proc, p_filemon) == 0x3 "struct proc KBI p_filemon"); _Static_assert(offsetof(struct proc, p_comm) == 0x3e8, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x4c0, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x4c8, "struct proc KBI p_emuldata"); #endif #ifdef __i386__ Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Sat Mar 16 11:16:09 2019 (r345226) +++ head/sys/mips/mips/vm_machdep.c Sat Mar 16 11:31:01 2019 (r345227) @@ -453,6 +453,13 @@ cpu_set_upcall(struct thread *td, void (*entry)(void * */ } +bool +cpu_exec_vmspace_reuse(struct proc *p __unused, vm_map_t map __unused) +{ + + return (true); +} + /* * Software interrupt handler for queued VM system processing. */ Modified: head/sys/powerpc/powerpc/vm_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/vm_machdep.c Sat Mar 16 11:16:09 2019 (r345226) +++ head/sys/powerpc/powerpc/vm_machdep.c Sat Mar 16 11:31:01 2019 (r345227) @@ -249,3 +249,10 @@ cpu_thread_swapout(struct thread *td) } +bool +cpu_exec_vmspace_reuse(struct proc *p __unused, vm_map_t map __unused) +{ + + return (true); +} + Modified: head/sys/riscv/riscv/vm_machdep.c ============================================================================== --- head/sys/riscv/riscv/vm_machdep.c Sat Mar 16 11:16:09 2019 (r345226) +++ head/sys/riscv/riscv/vm_machdep.c Sat Mar 16 11:31:01 2019 (r345227) @@ -264,6 +264,13 @@ cpu_exit(struct thread *td) { } +bool +cpu_exec_vmspace_reuse(struct proc *p __unused, vm_map_t map __unused) +{ + + return (true); +} + void swi_vm(void *v) { Modified: head/sys/sparc64/sparc64/vm_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/vm_machdep.c Sat Mar 16 11:16:09 2019 (r345226) +++ head/sys/sparc64/sparc64/vm_machdep.c Sat Mar 16 11:31:01 2019 (r345227) @@ -373,6 +373,13 @@ cpu_fork_kthread_handler(struct thread *td, void (*fun fp->fr_local[1] = (u_long)arg; } +bool +cpu_exec_vmspace_reuse(struct proc *p __unused, vm_map_t map __unused) +{ + + return (true); +} + int is_physical_memory(vm_paddr_t addr) { Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sat Mar 16 11:16:09 2019 (r345226) +++ head/sys/sys/proc.h Sat Mar 16 11:31:01 2019 (r345227) @@ -1093,6 +1093,7 @@ void userret(struct thread *, struct trapframe *); void cpu_exit(struct thread *); void exit1(struct thread *, int, int) __dead2; void cpu_copy_thread(struct thread *td, struct thread *td0); +bool cpu_exec_vmspace_reuse(struct proc *p, struct vm_map *map); int cpu_fetch_syscall_args(struct thread *td); void cpu_fork(struct thread *, struct proc *, struct thread *, int); void cpu_fork_kthread_handler(struct thread *, void (*)(void *), void *); From owner-svn-src-all@freebsd.org Sat Mar 16 11:44:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3756B1527409; Sat, 16 Mar 2019 11:44:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C50F284DE8; Sat, 16 Mar 2019 11:44:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B215921927; Sat, 16 Mar 2019 11:44:38 +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 x2GBicH0041262; Sat, 16 Mar 2019 11:44:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2GBiYms041236; Sat, 16 Mar 2019 11:44:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903161144.x2GBiYms041236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 16 Mar 2019 11:44:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345228 - in head/sys: amd64/amd64 amd64/include arm/arm arm/include arm64/arm64 arm64/include compat/freebsd32 i386/i386 i386/include kern mips/include mips/mips powerpc/include powerp... X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 amd64/include arm/arm arm/include arm64/arm64 arm64/include compat/freebsd32 i386/i386 i386/include kern mips/include mips/mips powerpc/include powerpc/powerpc riscv/include r... X-SVN-Commit-Revision: 345228 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C50F284DE8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 11:44:39 -0000 Author: kib Date: Sat Mar 16 11:44:33 2019 New Revision: 345228 URL: https://svnweb.freebsd.org/changeset/base/345228 Log: amd64 KPTI: add control from procctl(2). Add the infrastructure to allow MD procctl(2) commands, and use it to introduce amd64 PTI control and reporting. PTI mode cannot be modified for existing pmap, the knob controls PTI of the new vmspace created on exec. Requested by: jhb Reviewed by: jhb, markj (previous version) Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D19514 Added: head/sys/amd64/include/procctl.h (contents, props changed) head/sys/arm/include/procctl.h (contents, props changed) head/sys/arm64/include/procctl.h (contents, props changed) head/sys/i386/include/procctl.h (contents, props changed) head/sys/mips/include/procctl.h (contents, props changed) head/sys/powerpc/include/procctl.h (contents, props changed) head/sys/riscv/include/procctl.h (contents, props changed) head/sys/sparc64/include/procctl.h (contents, props changed) head/sys/x86/include/procctl.h (contents, props changed) Modified: head/sys/amd64/amd64/vm_machdep.c head/sys/arm/arm/vm_machdep.c head/sys/arm64/arm64/vm_machdep.c head/sys/compat/freebsd32/freebsd32_misc.c head/sys/i386/i386/vm_machdep.c head/sys/kern/kern_procctl.c head/sys/mips/mips/vm_machdep.c head/sys/powerpc/powerpc/vm_machdep.c head/sys/riscv/riscv/vm_machdep.c head/sys/sparc64/sparc64/vm_machdep.c head/sys/sys/proc.h head/sys/sys/procctl.h Modified: head/sys/amd64/amd64/vm_machdep.c ============================================================================== --- head/sys/amd64/amd64/vm_machdep.c Sat Mar 16 11:31:01 2019 (r345227) +++ head/sys/amd64/amd64/vm_machdep.c Sat Mar 16 11:44:33 2019 (r345228) @@ -59,13 +59,16 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include #include #include #include +#include #include #include @@ -375,6 +378,66 @@ cpu_exec_vmspace_reuse(struct proc *p, vm_map_t map) return (((curproc->p_md.md_flags & P_MD_KPTI) != 0) == (vm_map_pmap(map)->pm_ucr3 != PMAP_NO_CR3)); +} + +static void +cpu_procctl_kpti(struct proc *p, int com, int *val) +{ + + if (com == PROC_KPTI_CTL) { + if (pti && *val == PROC_KPTI_CTL_ENABLE_ON_EXEC) + p->p_md.md_flags |= P_MD_KPTI; + if (*val == PROC_KPTI_CTL_DISABLE_ON_EXEC) + p->p_md.md_flags &= ~P_MD_KPTI; + } else /* PROC_KPTI_STATUS */ { + *val = (p->p_md.md_flags & P_MD_KPTI) != 0 ? + PROC_KPTI_CTL_ENABLE_ON_EXEC: + PROC_KPTI_CTL_DISABLE_ON_EXEC; + if (vmspace_pmap(p->p_vmspace)->pm_ucr3 != PMAP_NO_CR3) + *val |= PROC_KPTI_STATUS_ACTIVE; + } +} + +int +cpu_procctl(struct thread *td, int idtype, id_t id, int com, void *data) +{ + struct proc *p; + int error, val; + + switch (com) { + case PROC_KPTI_CTL: + case PROC_KPTI_STATUS: + if (idtype != P_PID) { + error = EINVAL; + break; + } + if (com == PROC_KPTI_CTL) { + /* sad but true and not a joke */ + error = priv_check(td, PRIV_IO); + if (error != 0) + break; + error = copyin(data, &val, sizeof(val)); + if (error != 0) + break; + if (val != PROC_KPTI_CTL_ENABLE_ON_EXEC && + val != PROC_KPTI_CTL_DISABLE_ON_EXEC) { + error = EINVAL; + break; + } + } + error = pget(id, PGET_CANSEE | PGET_NOTWEXIT | PGET_NOTID, &p); + if (error == 0) { + cpu_procctl_kpti(p, com, &val); + PROC_UNLOCK(p); + if (com == PROC_KPTI_STATUS) + error = copyout(&val, data, sizeof(val)); + } + break; + default: + error = EINVAL; + break; + } + return (error); } void Added: head/sys/amd64/include/procctl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/include/procctl.h Sat Mar 16 11:44:33 2019 (r345228) @@ -0,0 +1,6 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ + +#include Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Sat Mar 16 11:31:01 2019 (r345227) +++ head/sys/arm/arm/vm_machdep.c Sat Mar 16 11:44:33 2019 (r345228) @@ -352,3 +352,10 @@ cpu_exec_vmspace_reuse(struct proc *p __unused, vm_map return (true); } +int +cpu_procctl(struct thread *td __unused, int idtype __unused, id_t id __unused, + int com __unused, void *data __unused) +{ + + return (EINVAL); +} Added: head/sys/arm/include/procctl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/include/procctl.h Sat Mar 16 11:44:33 2019 (r345228) @@ -0,0 +1,4 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ Modified: head/sys/arm64/arm64/vm_machdep.c ============================================================================== --- head/sys/arm64/arm64/vm_machdep.c Sat Mar 16 11:31:01 2019 (r345227) +++ head/sys/arm64/arm64/vm_machdep.c Sat Mar 16 11:44:33 2019 (r345228) @@ -286,6 +286,14 @@ cpu_exec_vmspace_reuse(struct proc *p __unused, vm_map return (true); } +int +cpu_procctl(struct thread *td __unused, int idtype __unused, id_t id __unused, + int com __unused, void *data __unused) +{ + + return (EINVAL); +} + void swi_vm(void *v) { Added: head/sys/arm64/include/procctl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/include/procctl.h Sat Mar 16 11:44:33 2019 (r345228) @@ -0,0 +1,4 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Sat Mar 16 11:31:01 2019 (r345227) +++ head/sys/compat/freebsd32/freebsd32_misc.c Sat Mar 16 11:44:33 2019 (r345228) @@ -3327,6 +3327,10 @@ freebsd32_procctl(struct thread *td, struct freebsd32_ } x32; int error, error1, flags, signum; + if (uap->com >= PROC_PROCCTL_MD_MIN) + return (cpu_procctl(td, uap->idtype, PAIR32TO64(id_t, uap->id), + uap->com, PTRIN(uap->data))); + switch (uap->com) { case PROC_ASLR_CTL: case PROC_SPROTECT: Modified: head/sys/i386/i386/vm_machdep.c ============================================================================== --- head/sys/i386/i386/vm_machdep.c Sat Mar 16 11:31:01 2019 (r345227) +++ head/sys/i386/i386/vm_machdep.c Sat Mar 16 11:44:33 2019 (r345228) @@ -389,6 +389,14 @@ cpu_exec_vmspace_reuse(struct proc *p __unused, vm_map return (true); } +int +cpu_procctl(struct thread *td __unused, int idtype __unused, id_t id __unused, + int com __unused, void *data __unused) +{ + + return (EINVAL); +} + void cpu_set_syscall_retval(struct thread *td, int error) { Added: head/sys/i386/include/procctl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/i386/include/procctl.h Sat Mar 16 11:44:33 2019 (r345228) @@ -0,0 +1,6 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ + +#include Modified: head/sys/kern/kern_procctl.c ============================================================================== --- head/sys/kern/kern_procctl.c Sat Mar 16 11:31:01 2019 (r345227) +++ head/sys/kern/kern_procctl.c Sat Mar 16 11:44:33 2019 (r345228) @@ -494,6 +494,10 @@ sys_procctl(struct thread *td, struct procctl_args *ua } x; int error, error1, flags, signum; + if (uap->com >= PROC_PROCCTL_MD_MIN) + return (cpu_procctl(td, uap->idtype, uap->id, + uap->com, uap->data)); + switch (uap->com) { case PROC_ASLR_CTL: case PROC_SPROTECT: Added: head/sys/mips/include/procctl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/include/procctl.h Sat Mar 16 11:44:33 2019 (r345228) @@ -0,0 +1,4 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Sat Mar 16 11:31:01 2019 (r345227) +++ head/sys/mips/mips/vm_machdep.c Sat Mar 16 11:44:33 2019 (r345228) @@ -460,6 +460,14 @@ cpu_exec_vmspace_reuse(struct proc *p __unused, vm_map return (true); } +int +cpu_procctl(struct thread *td __unused, int idtype __unused, id_t id __unused, + int com __unused, void *data __unused) +{ + + return (EINVAL); +} + /* * Software interrupt handler for queued VM system processing. */ Added: head/sys/powerpc/include/procctl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/include/procctl.h Sat Mar 16 11:44:33 2019 (r345228) @@ -0,0 +1,4 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ Modified: head/sys/powerpc/powerpc/vm_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/vm_machdep.c Sat Mar 16 11:31:01 2019 (r345227) +++ head/sys/powerpc/powerpc/vm_machdep.c Sat Mar 16 11:44:33 2019 (r345228) @@ -256,3 +256,10 @@ cpu_exec_vmspace_reuse(struct proc *p __unused, vm_map return (true); } +int +cpu_procctl(struct thread *td __unused, int idtype __unused, id_t id __unused, + int com __unused, void *data __unused) +{ + + return (EINVAL); +} Added: head/sys/riscv/include/procctl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/riscv/include/procctl.h Sat Mar 16 11:44:33 2019 (r345228) @@ -0,0 +1,4 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ Modified: head/sys/riscv/riscv/vm_machdep.c ============================================================================== --- head/sys/riscv/riscv/vm_machdep.c Sat Mar 16 11:31:01 2019 (r345227) +++ head/sys/riscv/riscv/vm_machdep.c Sat Mar 16 11:44:33 2019 (r345228) @@ -271,6 +271,14 @@ cpu_exec_vmspace_reuse(struct proc *p __unused, vm_map return (true); } +int +cpu_procctl(struct thread *td __unused, int idtype __unused, id_t id __unused, + int com __unused, void *data __unused) +{ + + return (EINVAL); +} + void swi_vm(void *v) { Added: head/sys/sparc64/include/procctl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sparc64/include/procctl.h Sat Mar 16 11:44:33 2019 (r345228) @@ -0,0 +1,4 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ Modified: head/sys/sparc64/sparc64/vm_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/vm_machdep.c Sat Mar 16 11:31:01 2019 (r345227) +++ head/sys/sparc64/sparc64/vm_machdep.c Sat Mar 16 11:44:33 2019 (r345228) @@ -381,6 +381,14 @@ cpu_exec_vmspace_reuse(struct proc *p __unused, vm_map } int +cpu_procctl(struct thread *td __unused, int idtype __unused, id_t id __unused, + int com __unused, void *data __unused) +{ + + return (EINVAL); +} + +int is_physical_memory(vm_paddr_t addr) { struct ofw_mem_region *mr; Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sat Mar 16 11:31:01 2019 (r345227) +++ head/sys/sys/proc.h Sat Mar 16 11:44:33 2019 (r345228) @@ -1097,6 +1097,8 @@ bool cpu_exec_vmspace_reuse(struct proc *p, struct vm_ int cpu_fetch_syscall_args(struct thread *td); void cpu_fork(struct thread *, struct proc *, struct thread *, int); void cpu_fork_kthread_handler(struct thread *, void (*)(void *), void *); +int cpu_procctl(struct thread *td, int idtype, id_t id, int com, + void *data); void cpu_set_syscall_retval(struct thread *, int); void cpu_set_upcall(struct thread *, void (*)(void *), void *, stack_t *); Modified: head/sys/sys/procctl.h ============================================================================== --- head/sys/sys/procctl.h Sat Mar 16 11:31:01 2019 (r345227) +++ head/sys/sys/procctl.h Sat Mar 16 11:44:33 2019 (r345228) @@ -41,6 +41,10 @@ #include #endif +/* MD PROCCTL verbs start at 0x10000000 */ +#define PROC_PROCCTL_MD_MIN 0x10000000 +#include + #define PROC_SPROTECT 1 /* set protected state */ #define PROC_REAP_ACQUIRE 2 /* reaping enable */ #define PROC_REAP_RELEASE 3 /* reaping disable */ Added: head/sys/x86/include/procctl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/x86/include/procctl.h Sat Mar 16 11:44:33 2019 (r345228) @@ -0,0 +1,43 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 The FreeBSD Foundation + * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _X86_PROCCTL_H +#define _X86_PROCCTL_H + +#define PROC_KPTI_CTL (PROC_PROCCTL_MD_MIN + 0) +#define PROC_KPTI_STATUS (PROC_PROCCTL_MD_MIN + 1) + +#define PROC_KPTI_CTL_ENABLE_ON_EXEC 1 +#define PROC_KPTI_CTL_DISABLE_ON_EXEC 2 +#define PROC_KPTI_STATUS_ACTIVE 0x80000000 + +#endif From owner-svn-src-all@freebsd.org Sat Mar 16 04:24:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D54081540C20; Sat, 16 Mar 2019 04:24:02 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7ACAF6D95F; Sat, 16 Mar 2019 04:24:02 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6F5C81CD2A; Sat, 16 Mar 2019 04:24:02 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2G4O20o009309; Sat, 16 Mar 2019 04:24:02 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2G4O2AD009308; Sat, 16 Mar 2019 04:24:02 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201903160424.x2G4O2AD009308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sat, 16 Mar 2019 04:24:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345220 - head/share/examples/kld/dyn_sysctl X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/share/examples/kld/dyn_sysctl X-SVN-Commit-Revision: 345220 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7ACAF6D95F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.92 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.92)[-0.918,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 04:24:03 -0000 Author: gonzo Date: Sat Mar 16 04:24:02 2019 New Revision: 345220 URL: https://svnweb.freebsd.org/changeset/base/345220 Log: Fix build for KLD dyn_sysctl example Looks like the example was broken by change of SYSCTL_STATIC_CHILDREN definition in r267992. Fix build by switching to using SYSCTL_ADD_ROOT_NODE PR: 236139 Submitted by: Andrew Reiter MFC after: 1 week Modified: head/share/examples/kld/dyn_sysctl/dyn_sysctl.c Modified: head/share/examples/kld/dyn_sysctl/dyn_sysctl.c ============================================================================== --- head/share/examples/kld/dyn_sysctl/dyn_sysctl.c Sat Mar 16 04:02:19 2019 (r345219) +++ head/share/examples/kld/dyn_sysctl/dyn_sysctl.c Sat Mar 16 04:24:02 2019 (r345220) @@ -72,12 +72,10 @@ load(module_t mod, int cmd, void *arg) * to different contexts. */ printf("TREE ROOT NAME\n"); - a_root = SYSCTL_ADD_NODE(&clist, - SYSCTL_STATIC_CHILDREN(/* top of sysctl tree */), + a_root = SYSCTL_ADD_ROOT_NODE(&clist, OID_AUTO, "dyn_sysctl", CTLFLAG_RW, 0, "dyn_sysctl root node"); - a_root = SYSCTL_ADD_NODE(&clist1, - SYSCTL_STATIC_CHILDREN(/* top of sysctl tree */), + a_root = SYSCTL_ADD_ROOT_NODE(&clist1, OID_AUTO, "dyn_sysctl", CTLFLAG_RW, 0, "dyn_sysctl root node"); if (a_root == NULL) { From owner-svn-src-all@freebsd.org Sat Mar 16 06:12:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8452F154465C; Sat, 16 Mar 2019 06:12:29 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA0BB70DF5; Sat, 16 Mar 2019 06:12:28 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B53A61DFE7; Sat, 16 Mar 2019 06:12:28 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2G6CSIC066099; Sat, 16 Mar 2019 06:12:28 GMT (envelope-from jmallett@FreeBSD.org) Received: (from jmallett@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2G6CSEN066098; Sat, 16 Mar 2019 06:12:28 GMT (envelope-from jmallett@FreeBSD.org) Message-Id: <201903160612.x2G6CSEN066098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmallett set sender to jmallett@FreeBSD.org using -f From: Juli Mallett Date: Sat, 16 Mar 2019 06:12:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345222 - head/sys/mips/sibyte X-SVN-Group: head X-SVN-Commit-Author: jmallett X-SVN-Commit-Paths: head/sys/mips/sibyte X-SVN-Commit-Revision: 345222 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DA0BB70DF5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.92 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.92)[-0.919,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 06:12:29 -0000 Author: jmallett Date: Sat Mar 16 06:12:28 2019 New Revision: 345222 URL: https://svnweb.freebsd.org/changeset/base/345222 Log: Remove empty directory left by r342255. Deleted: head/sys/mips/sibyte/ From owner-svn-src-all@freebsd.org Sat Mar 16 11:46:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DFEF15275D8; Sat, 16 Mar 2019 11:46:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F406884FA9; Sat, 16 Mar 2019 11:46:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E27CD21928; Sat, 16 Mar 2019 11:46:48 +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 x2GBkm9s041438; Sat, 16 Mar 2019 11:46:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2GBkmHC041437; Sat, 16 Mar 2019 11:46:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903161146.x2GBkmHC041437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 16 Mar 2019 11:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345229 - head/usr.bin/proccontrol X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/usr.bin/proccontrol X-SVN-Commit-Revision: 345229 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F406884FA9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 11:46:49 -0000 Author: kib Date: Sat Mar 16 11:46:48 2019 New Revision: 345229 URL: https://svnweb.freebsd.org/changeset/base/345229 Log: proccontrol(1): Add kpti control mode. Requested by: jhb Reviewed by: jhb, markj (previous version) Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D19514 Modified: head/usr.bin/proccontrol/proccontrol.c Modified: head/usr.bin/proccontrol/proccontrol.c ============================================================================== --- head/usr.bin/proccontrol/proccontrol.c Sat Mar 16 11:44:33 2019 (r345228) +++ head/usr.bin/proccontrol/proccontrol.c Sat Mar 16 11:46:48 2019 (r345229) @@ -43,6 +43,9 @@ enum { MODE_INVALID, MODE_TRACE, MODE_TRAPCAP, +#ifdef PROC_KPTI_CTL + MODE_KPTI, +#endif }; static pid_t @@ -59,11 +62,18 @@ str2pid(const char *str) return (res); } +#ifdef PROC_KPTI_CTL +#define KPTI_USAGE "|kpti" +#else +#define KPTI_USAGE +#endif + static void __dead2 usage(void) { - fprintf(stderr, "Usage: proccontrol -m (aslr|trace|trapcap) [-q] " + fprintf(stderr, "Usage: proccontrol -m (aslr|trace|trapcap" + KPTI_USAGE") [-q] " "[-s (enable|disable)] [-p pid | command]\n"); exit(1); } @@ -88,6 +98,10 @@ main(int argc, char *argv[]) mode = MODE_TRACE; else if (strcmp(optarg, "trapcap") == 0) mode = MODE_TRAPCAP; +#ifdef PROC_KPTI_CTL + else if (strcmp(optarg, "kpti") == 0) + mode = MODE_KPTI; +#endif else usage(); break; @@ -133,6 +147,11 @@ main(int argc, char *argv[]) case MODE_TRAPCAP: error = procctl(P_PID, pid, PROC_TRAPCAP_STATUS, &arg); break; +#ifdef PROC_KPTI_CTL + case MODE_KPTI: + error = procctl(P_PID, pid, PROC_KPTI_STATUS, &arg); + break; +#endif default: usage(); break; @@ -175,6 +194,22 @@ main(int argc, char *argv[]) break; } break; +#ifdef PROC_KPTI_CTL + case MODE_KPTI: + switch (arg & ~PROC_KPTI_STATUS_ACTIVE) { + case PROC_KPTI_CTL_ENABLE_ON_EXEC: + printf("enabled"); + break; + case PROC_KPTI_CTL_DISABLE_ON_EXEC: + printf("disabled"); + break; + } + if ((arg & PROC_KPTI_STATUS_ACTIVE) != 0) + printf(", active\n"); + else + printf(", not active\n"); + break; +#endif } } else { switch (mode) { @@ -193,6 +228,13 @@ main(int argc, char *argv[]) PROC_TRAPCAP_CTL_DISABLE; error = procctl(P_PID, pid, PROC_TRAPCAP_CTL, &arg); break; +#ifdef PROC_KPTI_CTL + case MODE_KPTI: + arg = enable ? PROC_KPTI_CTL_ENABLE_ON_EXEC : + PROC_KPTI_CTL_DISABLE_ON_EXEC; + error = procctl(P_PID, pid, PROC_KPTI_CTL, &arg); + break; +#endif default: usage(); break; From owner-svn-src-all@freebsd.org Sat Mar 16 11:12:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C6981517FC2; Sat, 16 Mar 2019 11:12:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3AB1A83A41; Sat, 16 Mar 2019 11:12:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1FAE7213D6; Sat, 16 Mar 2019 11:12:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2GBC3XI023218; Sat, 16 Mar 2019 11:12:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2GBC3AG023217; Sat, 16 Mar 2019 11:12:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903161112.x2GBC3AG023217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 16 Mar 2019 11:12:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345225 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 345225 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3AB1A83A41 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 11:12:03 -0000 Author: kib Date: Sat Mar 16 11:12:02 2019 New Revision: 345225 URL: https://svnweb.freebsd.org/changeset/base/345225 Log: amd64: rewrite cpu_switch.S fragment to reload tss.rsp0 on context switch. New code avoids jumps. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D19514 Modified: head/sys/amd64/amd64/cpu_switch.S Modified: head/sys/amd64/amd64/cpu_switch.S ============================================================================== --- head/sys/amd64/amd64/cpu_switch.S Sat Mar 16 10:51:11 2019 (r345224) +++ head/sys/amd64/amd64/cpu_switch.S Sat Mar 16 11:12:02 2019 (r345225) @@ -209,14 +209,11 @@ do_kthread: done_tss: movq %r8,PCPU(RSP0) movq %r8,PCPU(CURPCB) - /* Update the TSS_RSP0 pointer for the next interrupt */ - cmpq $~0,PCPU(UCR3) - je 1f movq PCPU(PTI_RSP0),%rax + cmpq $~0,PCPU(UCR3) + cmove %r8,%rax movq %rax,TSS_RSP0(%rdx) - jmp 2f -1: movq %r8,TSS_RSP0(%rdx) -2: movq %r12,PCPU(CURTHREAD) /* into next thread */ + movq %r12,PCPU(CURTHREAD) /* into next thread */ /* Test if debug registers should be restored. */ testl $PCB_DBREGS,PCB_FLAGS(%r8) From owner-svn-src-all@freebsd.org Sat Mar 16 11:16:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F1B1152514F; Sat, 16 Mar 2019 11:16:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F39383D57; Sat, 16 Mar 2019 11:16:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0309321417; Sat, 16 Mar 2019 11:16:10 +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 x2GBG957025152; Sat, 16 Mar 2019 11:16:09 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2GBG9KO025151; Sat, 16 Mar 2019 11:16:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903161116.x2GBG9KO025151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 16 Mar 2019 11:16:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345226 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 345226 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0F39383D57 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 11:16:10 -0000 Author: kib Date: Sat Mar 16 11:16:09 2019 New Revision: 345226 URL: https://svnweb.freebsd.org/changeset/base/345226 Log: amd64: fix switching to the pmap with pti disabled. When the pmap with pti disabled (i.e. pm_ucr3 == PMAP_NO_CR3) is activated, tss.rsp0 was not updated. Any interrupt that happen before next context switch would use pti trampoline stack for hardware frame but fault and interrupt handlers are not prepared to this. Correctly update tss.rsp0 for both PMAP_NO_CR3 and pti pmaps. Note that this case, pti = 1 but pmap->pm_ucr3 == PMAP_NO_CR3 is not used at the moment. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D19514 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Mar 16 11:12:02 2019 (r345225) +++ head/sys/amd64/amd64/pmap.c Sat Mar 16 11:16:09 2019 (r345226) @@ -7759,12 +7759,11 @@ pmap_pcid_alloc_checked(pmap_t pmap, u_int cpuid) } static void -pmap_activate_sw_pti_post(pmap_t pmap) +pmap_activate_sw_pti_post(struct thread *td, pmap_t pmap) { - if (pmap->pm_ucr3 != PMAP_NO_CR3) - PCPU_GET(tssp)->tss_rsp0 = ((vm_offset_t)PCPU_PTR(pti_stack) + - PC_PTI_STACK_SZ * sizeof(uint64_t)) & ~0xful; + PCPU_GET(tssp)->tss_rsp0 = pmap->pm_ucr3 != PMAP_NO_CR3 ? + PCPU_GET(pti_rsp0) : (uintptr_t)td->td_pcb; } static void inline @@ -7811,15 +7810,16 @@ pmap_activate_sw_pcid_pti(pmap_t pmap, u_int cpuid, co } static void -pmap_activate_sw_pcid_invpcid_pti(pmap_t pmap, u_int cpuid) +pmap_activate_sw_pcid_invpcid_pti(struct thread *td, pmap_t pmap, u_int cpuid) { pmap_activate_sw_pcid_pti(pmap, cpuid, true); - pmap_activate_sw_pti_post(pmap); + pmap_activate_sw_pti_post(td, pmap); } static void -pmap_activate_sw_pcid_noinvpcid_pti(pmap_t pmap, u_int cpuid) +pmap_activate_sw_pcid_noinvpcid_pti(struct thread *td, pmap_t pmap, + u_int cpuid) { register_t rflags; @@ -7843,11 +7843,12 @@ pmap_activate_sw_pcid_noinvpcid_pti(pmap_t pmap, u_int rflags = intr_disable(); pmap_activate_sw_pcid_pti(pmap, cpuid, false); intr_restore(rflags); - pmap_activate_sw_pti_post(pmap); + pmap_activate_sw_pti_post(td, pmap); } static void -pmap_activate_sw_pcid_nopti(pmap_t pmap, u_int cpuid) +pmap_activate_sw_pcid_nopti(struct thread *td __unused, pmap_t pmap, + u_int cpuid) { uint64_t cached, cr3; @@ -7862,17 +7863,19 @@ pmap_activate_sw_pcid_nopti(pmap_t pmap, u_int cpuid) } static void -pmap_activate_sw_pcid_noinvpcid_nopti(pmap_t pmap, u_int cpuid) +pmap_activate_sw_pcid_noinvpcid_nopti(struct thread *td __unused, pmap_t pmap, + u_int cpuid) { register_t rflags; rflags = intr_disable(); - pmap_activate_sw_pcid_nopti(pmap, cpuid); + pmap_activate_sw_pcid_nopti(td, pmap, cpuid); intr_restore(rflags); } static void -pmap_activate_sw_nopcid_nopti(pmap_t pmap, u_int cpuid __unused) +pmap_activate_sw_nopcid_nopti(struct thread *td __unused, pmap_t pmap, + u_int cpuid __unused) { load_cr3(pmap->pm_cr3); @@ -7880,16 +7883,18 @@ pmap_activate_sw_nopcid_nopti(pmap_t pmap, u_int cpuid } static void -pmap_activate_sw_nopcid_pti(pmap_t pmap, u_int cpuid __unused) +pmap_activate_sw_nopcid_pti(struct thread *td, pmap_t pmap, + u_int cpuid __unused) { - pmap_activate_sw_nopcid_nopti(pmap, cpuid); + pmap_activate_sw_nopcid_nopti(td, pmap, cpuid); PCPU_SET(kcr3, pmap->pm_cr3); PCPU_SET(ucr3, pmap->pm_ucr3); - pmap_activate_sw_pti_post(pmap); + pmap_activate_sw_pti_post(td, pmap); } -DEFINE_IFUNC(static, void, pmap_activate_sw_mode, (pmap_t, u_int), static) +DEFINE_IFUNC(static, void, pmap_activate_sw_mode, (struct thread *, pmap_t, + u_int), static) { if (pmap_pcid_enabled && pti && invpcid_works) @@ -7922,7 +7927,7 @@ pmap_activate_sw(struct thread *td) #else CPU_SET(cpuid, &pmap->pm_active); #endif - pmap_activate_sw_mode(pmap, cpuid); + pmap_activate_sw_mode(td, pmap, cpuid); #ifdef SMP CPU_CLR_ATOMIC(cpuid, &oldpmap->pm_active); #else From owner-svn-src-all@freebsd.org Sat Mar 16 13:26:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53597152CE0D; Sat, 16 Mar 2019 13:26:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E4B4588890; Sat, 16 Mar 2019 13:26:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA853229F1; Sat, 16 Mar 2019 13:26:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2GDQgGP095015; Sat, 16 Mar 2019 13:26:42 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2GDQgp6095014; Sat, 16 Mar 2019 13:26:42 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903161326.x2GDQgp6095014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 Mar 2019 13:26:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345230 - head X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 345230 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E4B4588890 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 13:26:43 -0000 Author: dim Date: Sat Mar 16 13:26:42 2019 New Revision: 345230 URL: https://svnweb.freebsd.org/changeset/base/345230 Log: Update maintainers for libunwind and lldb. Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Sat Mar 16 11:46:48 2019 (r345229) +++ head/MAINTAINERS Sat Mar 16 13:26:42 2019 (r345230) @@ -41,8 +41,9 @@ contrib/compiler-rt dim Pre-commit review preferred. contrib/ipfilter cy Pre-commit review requested. contrib/libc++ dim Pre-commit review preferred. contrib/libcxxrt dim Pre-commit review preferred. +contrib/libunwind dim,emaste,jhb Pre-commit review preferred. contrib/llvm dim Pre-commit review preferred. -contrib/llvm/tools/lldb emaste Pre-commit review preferred. +contrib/llvm/tools/lldb dim,emaste Pre-commit review preferred. contrib/netbsd-tests freebsd-testing,ngie Pre-commit review requested. contrib/pjdfstest freebsd-testing,asomers,ngie,pjd Pre-commit review requested. *env(3) secteam Due to the problematic security history of this From owner-svn-src-all@freebsd.org Sat Mar 16 13:34:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF491152D126; Sat, 16 Mar 2019 13:34:22 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07BA888CBD; Sat, 16 Mar 2019 13:34:20 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.110.112]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1h59S0-0006Bj-TM; Sat, 16 Mar 2019 14:34:13 +0100 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "Emmanuel Vadot" Subject: Re: svn commit: r345159 - head References: <201903142208.x2EM8Akf049649@repo.freebsd.org> Date: Sat, 16 Mar 2019 14:34:30 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <201903142208.x2EM8Akf049649@repo.freebsd.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.4.2 X-Scan-Signature: c09395f469c52153b963e4ff2d10f427 X-Rspamd-Queue-Id: 07BA888CBD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of ronald-lists@klop.ws designates 195.190.28.88 as permitted sender) smtp.mailfrom=ronald-lists@klop.ws X-Spamd-Result: default: False [-2.52 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.93)[-0.927,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:195.190.28.64/27]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[klop.ws]; NEURAL_HAM_LONG(-1.00)[-0.996,0]; TO_DN_SOME(0.00)[]; IP_SCORE(-0.26)[ipnet: 195.190.28.0/24(-0.74), asn: 47172(-0.56), country: NL(0.01)]; MX_GOOD(-0.01)[mx2.greenhost.nl,mx1.greenhost.nl]; NEURAL_HAM_SHORT(-0.53)[-0.525,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:47172, ipnet:195.190.28.0/24, country:NL]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 13:34:23 -0000 Thanks! A very welcome user friendlyness. On Thu, 14 Mar 2019 23:08:10 +0100, Emmanuel Vadot wrote: > Author: manu > Date: Thu Mar 14 22:08:09 2019 > New Revision: 345159 > URL: https://svnweb.freebsd.org/changeset/base/345159 > > Log: > pkgbase: Use uname as ABI_FILE > uname is always rebuild on FreeBSD so use this as ABI_FILE for pkg when > building pkg for pkgbase. > pkg uses uname too as default ABI_FILE as of commit > d8bbf980b7f6f424fb7cc672c23ab2dfc82b6599 > https://github.com/freebsd/pkg/commit/d8bbf980b7f6f424fb7cc672c23ab2dfc82b6599 > Discussed with: bapt > MFC after: 1 week > > Modified: > head/Makefile.inc1 > > Modified: head/Makefile.inc1 > ============================================================================== > --- head/Makefile.inc1 Thu Mar 14 21:08:48 2019 (r345158) > +++ head/Makefile.inc1 Thu Mar 14 22:08:09 2019 (r345159) > @@ -1864,11 +1864,11 @@ create-world-package-${pkgname}: .PHONY > @if [ "${pkgname}" == "runtime" ]; then \ > sed -i '' -e "s/%VCS_REVISION%/${VCS_REVISION}/" > ${WSTAGEDIR}/${pkgname}.ucl ; \ > fi > - ${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes \ > + ${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname -o > ALLOW_BASE_SHLIBS=yes \ > create -M ${WSTAGEDIR}/${pkgname}.ucl \ > -p ${WSTAGEDIR}/${pkgname}.plist \ > -r ${WSTAGEDIR} \ > - -o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config > ABI)/${PKG_VERSION} > + -o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname > config ABI)/${PKG_VERSION} > .endfor > _default_flavor= -default > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@freebsd.org Sat Mar 16 13:43:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53338152D569; Sat, 16 Mar 2019 13:43:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E8512893A1; Sat, 16 Mar 2019 13:43:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D711322D78; Sat, 16 Mar 2019 13:43:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2GDh7HL005762; Sat, 16 Mar 2019 13:43:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2GDh7EW005761; Sat, 16 Mar 2019 13:43:07 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903161343.x2GDh7EW005761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 Mar 2019 13:43:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345233 - head/contrib/openmp/runtime/src X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/openmp/runtime/src X-SVN-Commit-Revision: 345233 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E8512893A1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 13:43:08 -0000 Author: dim Date: Sat Mar 16 13:43:07 2019 New Revision: 345233 URL: https://svnweb.freebsd.org/changeset/base/345233 Log: Merge openmp release_80 branch r356034 (effectively, 8.0.0 rc5). PR: 236062 MFC after: 1 month X-MFC-With: r344779 Modified: head/contrib/openmp/runtime/src/ompt-general.cpp Directory Properties: head/contrib/openmp/ (props changed) Modified: head/contrib/openmp/runtime/src/ompt-general.cpp ============================================================================== --- head/contrib/openmp/runtime/src/ompt-general.cpp Sat Mar 16 13:42:00 2019 (r345232) +++ head/contrib/openmp/runtime/src/ompt-general.cpp Sat Mar 16 13:43:07 2019 (r345233) @@ -450,9 +450,6 @@ OMPT_API_ROUTINE ompt_set_result_t ompt_set_callback(o OMPT_API_ROUTINE int ompt_get_callback(ompt_callbacks_t which, ompt_callback_t *callback) { - if (!ompt_enabled.enabled) - return ompt_get_callback_failure; - switch (which) { #define ompt_event_macro(event_name, callback_type, event_id) \ @@ -460,7 +457,7 @@ OMPT_API_ROUTINE int ompt_get_callback(ompt_callbacks_ if (ompt_event_implementation_status(event_name)) { \ ompt_callback_t mycb = \ (ompt_callback_t)ompt_callbacks.ompt_callback(event_name); \ - if (ompt_enabled.event_name && mycb) { \ + if (mycb) { \ *callback = mycb; \ return ompt_get_callback_success; \ } \ @@ -483,15 +480,11 @@ OMPT_API_ROUTINE int ompt_get_callback(ompt_callbacks_ OMPT_API_ROUTINE int ompt_get_parallel_info(int ancestor_level, ompt_data_t **parallel_data, int *team_size) { - if (!ompt_enabled.enabled) - return 0; return __ompt_get_parallel_info_internal(ancestor_level, parallel_data, team_size); } OMPT_API_ROUTINE int ompt_get_state(ompt_wait_id_t *wait_id) { - if (!ompt_enabled.enabled) - return ompt_state_work_serial; int thread_state = __ompt_get_state_internal(wait_id); if (thread_state == ompt_state_undefined) { @@ -506,8 +499,6 @@ OMPT_API_ROUTINE int ompt_get_state(ompt_wait_id_t *wa ****************************************************************************/ OMPT_API_ROUTINE ompt_data_t *ompt_get_thread_data(void) { - if (!ompt_enabled.enabled) - return NULL; return __ompt_get_thread_data_internal(); } @@ -516,8 +507,6 @@ OMPT_API_ROUTINE int ompt_get_task_info(int ancestor_l ompt_frame_t **task_frame, ompt_data_t **parallel_data, int *thread_num) { - if (!ompt_enabled.enabled) - return 0; return __ompt_get_task_info_internal(ancestor_level, type, task_data, task_frame, parallel_data, thread_num); } @@ -592,7 +581,7 @@ OMPT_API_ROUTINE int ompt_get_place_num(void) { #if !KMP_AFFINITY_SUPPORTED return -1; #else - if (!ompt_enabled.enabled || __kmp_get_gtid() < 0) + if (__kmp_get_gtid() < 0) return -1; int gtid; @@ -613,7 +602,7 @@ OMPT_API_ROUTINE int ompt_get_partition_place_nums(int #if !KMP_AFFINITY_SUPPORTED return 0; #else - if (!ompt_enabled.enabled || __kmp_get_gtid() < 0) + if (__kmp_get_gtid() < 0) return 0; int i, gtid, place_num, first_place, last_place, start, end; @@ -648,7 +637,7 @@ OMPT_API_ROUTINE int ompt_get_partition_place_nums(int ****************************************************************************/ OMPT_API_ROUTINE int ompt_get_proc_id(void) { - if (!ompt_enabled.enabled || __kmp_get_gtid() < 0) + if (__kmp_get_gtid() < 0) return -1; #if KMP_OS_LINUX return sched_getcpu(); From owner-svn-src-all@freebsd.org Sat Mar 16 13:40:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93E3C152D2F4; Sat, 16 Mar 2019 13:40:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 099EF88EAE; Sat, 16 Mar 2019 13:40:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC0DF22BC0; Sat, 16 Mar 2019 13:40:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2GDeRtC000923; Sat, 16 Mar 2019 13:40:27 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2GDeRTw000922; Sat, 16 Mar 2019 13:40:27 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903161340.x2GDeRTw000922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 Mar 2019 13:40:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345231 - head/contrib/openmp X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/openmp X-SVN-Commit-Revision: 345231 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 099EF88EAE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 13:40:28 -0000 Author: dim Date: Sat Mar 16 13:40:27 2019 New Revision: 345231 URL: https://svnweb.freebsd.org/changeset/base/345231 Log: Add LLVM openmp trunk r351319 (just before the release_80 branch point) to contrib/llvm. This is not yet connected to the build, the glue for that will come in a follow-up commit. PR: 236062 MFC after: 1 month X-MFC-With: r344779 Added: head/contrib/openmp/ - copied from r345230, vendor/llvm-openmp/dist/ From owner-svn-src-all@freebsd.org Sat Mar 16 13:42:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8926152D341; Sat, 16 Mar 2019 13:42:01 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6FDE1891E2; Sat, 16 Mar 2019 13:42:01 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C2B122D4A; Sat, 16 Mar 2019 13:42:01 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2GDg10J004808; Sat, 16 Mar 2019 13:42:01 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2GDg113004807; Sat, 16 Mar 2019 13:42:01 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903161342.x2GDg113004807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 Mar 2019 13:42:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345232 - head/contrib/openmp X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/openmp X-SVN-Commit-Revision: 345232 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6FDE1891E2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 13:42:02 -0000 Author: dim Date: Sat Mar 16 13:42:00 2019 New Revision: 345232 URL: https://svnweb.freebsd.org/changeset/base/345232 Log: Bootstrap svn:mergeinfo on contrib/openmp. PR: 236062 MFC after: 1 month X-MFC-With: r344779 Modified: Directory Properties: head/contrib/openmp/ (props changed) From owner-svn-src-all@freebsd.org Sat Mar 16 15:01:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E742152FA91; Sat, 16 Mar 2019 15:01:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4A5CF8BAB5; Sat, 16 Mar 2019 15:01:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3FEB523AA5; Sat, 16 Mar 2019 15:01:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2GF1bfK044607; Sat, 16 Mar 2019 15:01:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2GF1aVC044600; Sat, 16 Mar 2019 15:01:36 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903161501.x2GF1aVC044600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 Mar 2019 15:01:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345235 - head/lib/libomp X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/lib/libomp X-SVN-Commit-Revision: 345235 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4A5CF8BAB5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 15:01:38 -0000 Author: dim Date: Sat Mar 16 15:01:36 2019 New Revision: 345235 URL: https://svnweb.freebsd.org/changeset/base/345235 Log: Add lib/libomp, with a Makefile, and generated configuration headers. Not connected to the main build yet, as there is still the issue of the GNU omp.h header conflicting with the LLVM one. (That is, if MK_GCC is enabled.) PR: 236062 MFC after: 1 month X-MFC-With: r344779 Added: head/lib/libomp/ head/lib/libomp/Makefile (contents, props changed) head/lib/libomp/kmp_config.h (contents, props changed) head/lib/libomp/kmp_i18n_default.inc (contents, props changed) head/lib/libomp/kmp_i18n_id.inc (contents, props changed) head/lib/libomp/omp-tools.h (contents, props changed) head/lib/libomp/omp.h (contents, props changed) Added: head/lib/libomp/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libomp/Makefile Sat Mar 16 15:01:36 2019 (r345235) @@ -0,0 +1,69 @@ +# $FreeBSD$ + +SHLIB_NAME= libomp.so + +OMPSRC= ${SRCTOP}/contrib/openmp/runtime/src +ITTSRC= ${OMPSRC}/thirdparty/ittnotify +.PATH: ${OMPSRC} +.PATH: ${ITTSRC} + +SRCS+= ittnotify_static.c +SRCS+= kmp_affinity.cpp +SRCS+= kmp_alloc.cpp +SRCS+= kmp_atomic.cpp +SRCS+= kmp_barrier.cpp +SRCS+= kmp_cancel.cpp +SRCS+= kmp_csupport.cpp +SRCS+= kmp_debug.cpp +SRCS+= kmp_dispatch.cpp +SRCS+= kmp_environment.cpp +SRCS+= kmp_error.cpp +SRCS+= kmp_ftn_cdecl.cpp +SRCS+= kmp_ftn_extra.cpp +SRCS+= kmp_global.cpp +SRCS+= kmp_gsupport.cpp +SRCS+= kmp_i18n.cpp +SRCS+= kmp_io.cpp +SRCS+= kmp_itt.cpp +SRCS+= kmp_lock.cpp +SRCS+= kmp_runtime.cpp +SRCS+= kmp_sched.cpp +SRCS+= kmp_settings.cpp +SRCS+= kmp_str.cpp +SRCS+= kmp_taskdeps.cpp +SRCS+= kmp_tasking.cpp +SRCS+= kmp_taskq.cpp +SRCS+= kmp_threadprivate.cpp +SRCS+= kmp_utility.cpp +SRCS+= kmp_version.cpp +SRCS+= kmp_wait_release.cpp +SRCS+= ompt-general.cpp +SRCS+= z_Linux_asm.S +SRCS+= z_Linux_util.cpp +INCS+= omp.h + +WARNS?= 1 + +CFLAGS+= -D__STDC_CONSTANT_MACROS +CFLAGS+= -D__STDC_FORMAT_MACROS +CFLAGS+= -D__STDC_LIMIT_MACROS +CFLAGS+= -I${.CURDIR} +CFLAGS+= -I${OMPSRC} +CFLAGS+= -I${ITTSRC} +CFLAGS+= -ffunction-sections +CFLAGS+= -fdata-sections +CXXFLAGS+= -fvisibility-inlines-hidden +CXXFLAGS+= -std=c++11 +CXXFLAGS+= -fno-exceptions +CXXFLAGS+= -fno-rtti + +LDFLAGS+= -Wl,--warn-shared-textrel +LDFLAGS+= -Wl,--as-needed +LDFLAGS+= -Wl,--gc-sections +LDFLAGS+= -Wl,-z,noexecstack +LDFLAGS+= -Wl,-fini=__kmp_internal_end_fini +LDFLAGS+= -Wl,-soname,libomp.so + +VERSION_MAP= ${OMPSRC}/exports_so.txt + +.include Added: head/lib/libomp/kmp_config.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libomp/kmp_config.h Sat Mar 16 15:01:36 2019 (r345235) @@ -0,0 +1,118 @@ +// $FreeBSD$ +/* + * kmp_config.h -- Feature macros + */ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.txt for details. +// +//===----------------------------------------------------------------------===// +#ifndef KMP_CONFIG_H +#define KMP_CONFIG_H + +#include "kmp_platform.h" + +// cmakedefine01 MACRO will define MACRO as either 0 or 1 +// cmakedefine MACRO 1 will define MACRO as 1 or leave undefined +#define DEBUG_BUILD 0 +#define RELWITHDEBINFO_BUILD 0 +#define LIBOMP_USE_ITT_NOTIFY 1 +#define USE_ITT_NOTIFY LIBOMP_USE_ITT_NOTIFY +#if ! LIBOMP_USE_ITT_NOTIFY +# define INTEL_NO_ITTNOTIFY_API +#endif +#define LIBOMP_USE_VERSION_SYMBOLS 1 +#if LIBOMP_USE_VERSION_SYMBOLS +# define KMP_USE_VERSION_SYMBOLS +#endif +#define LIBOMP_HAVE_WEAK_ATTRIBUTE 1 +#define KMP_HAVE_WEAK_ATTRIBUTE LIBOMP_HAVE_WEAK_ATTRIBUTE +#define LIBOMP_HAVE_PSAPI 0 +#define KMP_HAVE_PSAPI LIBOMP_HAVE_PSAPI +#define LIBOMP_STATS 0 +#define KMP_STATS_ENABLED LIBOMP_STATS +#define LIBOMP_HAVE_X86INTRIN_H 0 +#define KMP_HAVE_X86INTRIN_H LIBOMP_HAVE_X86INTRIN_H +#define LIBOMP_HAVE___BUILTIN_READCYCLECOUNTER 0 +#define KMP_HAVE___BUILTIN_READCYCLECOUNTER LIBOMP_HAVE___BUILTIN_READCYCLECOUNTER +#define LIBOMP_HAVE___RDTSC 0 +#define KMP_HAVE___RDTSC LIBOMP_HAVE___RDTSC +#define LIBOMP_USE_DEBUGGER 0 +#define USE_DEBUGGER LIBOMP_USE_DEBUGGER +#define LIBOMP_OMPT_DEBUG 0 +#define OMPT_DEBUG LIBOMP_OMPT_DEBUG +#define LIBOMP_OMPT_SUPPORT 1 +#define OMPT_SUPPORT LIBOMP_OMPT_SUPPORT +#define LIBOMP_OMPT_OPTIONAL 1 +#define OMPT_OPTIONAL LIBOMP_OMPT_OPTIONAL +#define LIBOMP_USE_ADAPTIVE_LOCKS 1 +#define KMP_USE_ADAPTIVE_LOCKS LIBOMP_USE_ADAPTIVE_LOCKS +#define KMP_DEBUG_ADAPTIVE_LOCKS 0 +#define LIBOMP_USE_INTERNODE_ALIGNMENT 0 +#define KMP_USE_INTERNODE_ALIGNMENT LIBOMP_USE_INTERNODE_ALIGNMENT +#define LIBOMP_ENABLE_ASSERTIONS 1 +#define KMP_USE_ASSERT LIBOMP_ENABLE_ASSERTIONS +#define LIBOMP_USE_HIER_SCHED 0 +#define KMP_USE_HIER_SCHED LIBOMP_USE_HIER_SCHED +#define STUBS_LIBRARY 0 +#define LIBOMP_USE_HWLOC 0 +#define KMP_USE_HWLOC LIBOMP_USE_HWLOC +#define LIBOMP_ENABLE_SHARED 1 +#define KMP_DYNAMIC_LIB LIBOMP_ENABLE_SHARED +#define KMP_ARCH_STR "Intel(R) 64" +#define KMP_LIBRARY_FILE "libomp.so" +#define KMP_VERSION_MAJOR 5 +#define KMP_VERSION_MINOR 0 +#define LIBOMP_OMP_VERSION 50 +#define OMP_50_ENABLED (LIBOMP_OMP_VERSION >= 50) +#define OMP_45_ENABLED (LIBOMP_OMP_VERSION >= 45) +#define OMP_40_ENABLED (LIBOMP_OMP_VERSION >= 40) +#define OMP_30_ENABLED (LIBOMP_OMP_VERSION >= 30) +#define LIBOMP_TSAN_SUPPORT 0 +#if LIBOMP_TSAN_SUPPORT +#define TSAN_SUPPORT +#endif +#define MSVC 0 +#define KMP_MSVC_COMPAT MSVC + +// Configured cache line based on architecture +#if KMP_ARCH_PPC64 +# define CACHE_LINE 128 +#else +# define CACHE_LINE 64 +#endif + +#if ! KMP_32_BIT_ARCH +# define BUILD_I8 1 +#endif + +#define KMP_NESTED_HOT_TEAMS 1 +#define KMP_ADJUST_BLOCKTIME 1 +#define BUILD_PARALLEL_ORDERED 1 +#define KMP_ASM_INTRINS 1 +#define USE_ITT_BUILD LIBOMP_USE_ITT_NOTIFY +#define INTEL_ITTNOTIFY_PREFIX __kmp_itt_ +#if ! KMP_MIC +# define USE_LOAD_BALANCE 1 +#endif +#if ! (KMP_OS_WINDOWS || KMP_OS_DARWIN) +# define KMP_TDATA_GTID 1 +#endif +#if STUBS_LIBRARY +# define KMP_STUB 1 +#endif +#if DEBUG_BUILD || RELWITHDEBINFO_BUILD +# define KMP_DEBUG 1 +#endif + +#if KMP_OS_WINDOWS +# define KMP_WIN_CDECL +#else +# define BUILD_TV +# define KMP_GOMP_COMPAT +#endif + +#endif // KMP_CONFIG_H Added: head/lib/libomp/kmp_i18n_default.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libomp/kmp_i18n_default.inc Sat Mar 16 15:01:36 2019 (r345235) @@ -0,0 +1,432 @@ +// $FreeBSD$ +// Do not edit this file! // +// The file was generated from en_US.txt by message-converter.pl on Thu Mar 14 22:26:24 2019. // + +static char const * +__kmp_i18n_default_meta[] = + { + NULL, + "English", + "USA", + "1033", + "2", + "20170523", + NULL + }; + +static char const * +__kmp_i18n_default_strings[] = + { + NULL, + "Error", + "(unknown file)", + "not a number", + "bad unit", + "illegal characters", + "value too large", + "value too small", + "value is not a multiple of 4k", + "Unknown processor topology", + "Cannot open /proc/cpuinfo", + "/proc/cpuinfo", + "cpuinfo file invalid (No processor records)", + "cpuinfo file invalid (Too many processor records)", + "Cannot rewind cpuinfo file", + "cpuinfo file invalid (long line)", + "cpuinfo file contains too many entries", + "cpuinfo file missing processor field", + "cpuinfo file missing physical id field", + "cpuinfo file invalid (missing val)", + "cpuinfo file invalid (duplicate field)", + "Physical node/pkg/core/thread ids not unique", + "APIC not present", + "Invalid cpuid info", + "APIC ids not unique", + "Inconsistent cpuid info", + "Out of heap memory", + "Memory allocation failed", + "core", + "thread", + "package", + "node", + "", + "decoding legacy APIC ids", + "parsing /proc/cpuinfo", + "value is not defined", + "Effective settings:", + "User settings:", + "warning: pointers or size don't make sense", + "CPU", + "TPU", + "TPUs per package", + "HT enabled", + "HT disabled", + "decoding x2APIC ids", + "cpuid leaf 11 not supported", + "cpuid leaf 4 not supported", + "thread ids not unique", + "using pthread info", + "legacy APIC ids not unique", + "x2APIC ids not unique", + "OPENMP DISPLAY ENVIRONMENT BEGIN", + "OPENMP DISPLAY ENVIRONMENT END", + "[device]", + "[host]", + "tile", + NULL + }; + +static char const * +__kmp_i18n_default_formats[] = + { + NULL, + "OMP: Info #%1$d: %2$s\n", + "OMP: Warning #%1$d: %2$s\n", + "OMP: Error #%1$d: %2$s\n", + "OMP: System error #%1$d: %2$s\n", + "OMP: Hint %1$s\n", + "%1$s pragma (at %2$s:%3$s():%4$s)", + NULL + }; + +static char const * +__kmp_i18n_default_messages[] = + { + NULL, + "Library is \"serial\".", + "Cannot open message catalog \"%1$s\":", + "Default messages will be used.", + "%1$s: Lock is uninitialized", + "%1$s: Lock was initialized as simple, but used as nestable", + "%1$s: Lock was initialized as nestable, but used as simple", + "%1$s: Lock is already owned by requesting thread", + "%1$s: Lock is still owned by a thread", + "%1$s: Attempt to release a lock not owned by any thread", + "%1$s: Attempt to release a lock owned by another thread", + "Stack overflow detected for OpenMP thread #%1$d", + "Stack overlap detected. ", + "Assertion failure at %1$s(%2$d).", + "Unable to register a new user thread.", + "Initializing %1$s, but found %2$s already initialized.", + "Cannot open file \"%1$s\" for reading:", + "Getting environment variable \"%1$s\" failed:", + "Setting environment variable \"%1$s\" failed:", + "Getting environment failed:", + "%1$s=\"%2$s\": Wrong value, boolean expected.", + "No Helper Thread support built in this OMP library.", + "Helper thread failed to soft terminate.", + "Buffer overflow detected.", + "Real-time scheduling policy is not supported.", + "OMP application is running at maximum priority with real-time scheduling policy. ", + "Changing priority of the monitor thread failed:", + "Deadlocks are highly possible due to monitor thread starvation.", + "Unable to set monitor thread stack size to %1$lu bytes:", + "Unable to set OMP thread stack size to %1$lu bytes:", + "Thread attribute initialization failed:", + "Thread attribute destroying failed:", + "OMP thread joinable state setting failed:", + "Monitor thread joinable state setting failed:", + "System unable to allocate necessary resources for OMP thread:", + "System unable to allocate necessary resources for the monitor thread:", + "Unable to terminate OMP thread:", + "Wrong schedule type %1$d, see or file for the list of values supported.", + "Unknown scheduling type \"%1$d\".", + "%1$s value \"%2$s\" is invalid.", + "%1$s value \"%2$s\" is too small.", + "%1$s value \"%2$s\" is too large.", + "%1$s: \"%2$s\" is an invalid value; ignored.", + "%1$s release value \"%2$s\" is invalid.", + "%1$s gather value \"%2$s\" is invalid.", + "%1$s supported only on debug builds; ignored.", + "Syntax error: Usage: %1$s=[ routine= | filename= | range=: | excl_range=: ],...", + "Unbalanced quotes in %1$s.", + "Empty string specified for %1$s; ignored.", + "%1$s value is too long; ignored.", + "%1$s: Invalid clause in \"%2$s\".", + "Empty clause in %1$s.", + "%1$s value \"%2$s\" is invalid chunk size.", + "%1$s value \"%2$s\" is to large chunk size.", + "%1$s value \"%2$s\" is ignored.", + "Cannot get processor frequency, using zero KMP_ITT_PREPARE_DELAY.", + "%1$s must be set prior to first parallel region; ignored.", + "%1$s: parameter has been specified already, ignoring \"%2$s\".", + "%1$s: parameter invalid, ignoring \"%2$s\".", + "%1$s: too many integer parameters specified, ignoring \"%2$s\".", + "%1$s: too many integer parameters specified for logical or physical type, ignoring \"%2$d\".", + "%1$s: '%2$s' type does not take any integer parameters, ignoring them.", + "%1$s: proclist not specified with explicit affinity type, using \"none\".", + "%1$s: proclist specified, setting affinity type to \"explicit\".", + "%1$s: proclist specified without \"explicit\" affinity type, proclist ignored.", + "%1$s: syntax error, not using affinity.", + "%1$s: range error (zero stride), not using affinity.", + "%1$s: range error (%2$d > %3$d), not using affinity.", + "%1$s: range error (%2$d < %3$d & stride < 0), not using affinity.", + "%1$s: range error ((%2$d-%3$d)/%4$d too big), not using affinity.", + "%1$s: %2$s is defined. %3$s will be ignored.", + "%1$s: affinity not supported, using \"disabled\".", + "%1$s: affinity only supported for Intel(R) Architecture Processors.", + "%1$s: getaffinity system call not supported.", + "%1$s: setaffinity system call not supported.", + "%1$s: pthread_aff_set_np call not found.", + "%1$s: pthread_get_num_resources_np call not found.", + "%1$s: the OS kernel does not support affinity.", + "%1$s: pthread_get_num_resources_np returned %2$d.", + "%1$s: cannot determine proper affinity mask size.", + "%1$s=\"%2$s\": %3$s.", + "%1$s: extra trailing characters ignored: \"%2$s\".", + "%1$s: unknown method \"%2$s\".", + "KMP_STATS_TIMER: clock_gettime is undefined, using gettimeofday.", + "KMP_STATS_TIMER: \"%1$s\" needs additional parameter, e.g. 'clock_gettime,2'. Using gettimeofday.", + "KMP_STATS_TIMER: clock_gettime parameter \"%1$s\" is invalid, using gettimeofday.", + "KMP_STATS_TIMER: clock_gettime failed, using gettimeofday.", + "KMP_STATS_TIMER: clock function unknown (ignoring value \"%1$s\").", + "Unknown scheduling type detected.", + "Too many threads to use analytical guided scheduling - switching to iterative guided scheduling.", + "ittnotify: Lookup of \"%1$s\" function in \"%2$s\" library failed.", + "ittnotify: Loading \"%1$s\" library failed.", + "ittnotify: All itt notifications disabled.", + "ittnotify: Object state itt notifications disabled.", + "ittnotify: Mark itt notifications disabled.", + "ittnotify: Unloading \"%1$s\" library failed.", + "Cannot form a team with %1$d threads, using %2$d instead.", + "Requested number of active parallel levels \"%1$d\" is negative; ignored.", + "Requested number of active parallel levels \"%1$d\" exceeds supported limit; the following limit value will be used: \"%1$d\".", + "kmp_set_library must only be called from the top level serial thread; ignored.", + "Fatal system error detected.", + "Out of heap memory.", + "Clearing __KMP_REGISTERED_LIB env var failed.", + "Registering library with env var failed.", + "%1$s value \"%2$d\" will be used.", + "%1$s value \"%2$u\" will be used.", + "%1$s value \"%2$s\" will be used.", + "%1$s value \"%2$s\" will be used.", + "%1$s maximum value \"%2$d\" will be used.", + "%1$s minimum value \"%2$d\" will be used.", + "Memory allocation failed.", + "File name too long.", + "Lock table overflow.", + "Too many threads to use threadprivate directive.", + "%1$s: invalid mask.", + "Wrong definition.", + "Windows* OS: TLS Set Value failed.", + "Windows* OS: TLS out of indexes.", + "PDONE directive must be nested within a DO directive.", + "Cannot get number of available CPUs.", + "Assumed number of CPUs is 2.", + "Error initializing affinity - not using affinity.", + "Threads may migrate across all available OS procs (granularity setting too coarse).", + "Ignoring invalid OS proc ID %1$d.", + "No valid OS proc IDs specified - not using affinity.", + "%1$s - using \"flat\" OS <-> physical proc mapping.", + "%1$s: %2$s - using \"flat\" OS <-> physical proc mapping.", + "%1$s, line %2$d: %3$s - using \"flat\" OS <-> physical proc mapping.", + "%1$s: %2$s - exiting.", + "%1$s, line %2$d: %3$s - exiting.", + "Construct identifier invalid.", + "Thread identifier invalid.", + "runtime library not initialized.", + "Inconsistent THREADPRIVATE common block declarations are non-conforming and are unsupported. Either all threadprivate common blocks must be declared identically, or the largest instance of each threadprivate common block must be referenced first during the run.", + "Cannot set thread affinity mask.", + "Cannot set thread priority.", + "Cannot create thread.", + "Cannot create event.", + "Cannot set event.", + "Cannot close handle.", + "Unknown library type: %1$d.", + "Monitor did not reap properly.", + "Worker thread failed to join.", + "Cannot change thread affinity mask.", + "%1$s: Threads may migrate across %2$d innermost levels of machine", + "%1$s: decrease to %2$d threads", + "%1$s: increase to %2$d threads", + "%1$s: Internal thread %2$d bound to OS proc set %3$s", + "%1$s: Affinity capable, using cpuinfo file", + "%1$s: Affinity capable, using global cpuid info", + "%1$s: Affinity capable, using default \"flat\" topology", + "%1$s: Affinity not capable, using local cpuid info", + "%1$s: Affinity not capable, using cpuinfo file", + "%1$s: Affinity not capable, assumming \"flat\" topology", + "%1$s: Initial OS proc set respected: %2$s", + "%1$s: Initial OS proc set not respected: %2$s", + "%1$s: %2$d available OS procs", + "%1$s: Uniform topology", + "%1$s: Nonuniform topology", + "%1$s: %2$d packages x %3$d cores/pkg x %4$d threads/core (%5$d total cores)", + "%1$s: OS proc to physical thread map ([] => level not in map):", + "%1$s: OS proc maps to th package core 0", + "%1$s: OS proc %2$d maps to package %3$d [core %4$d] [thread %5$d]", + "%1$s: OS proc %2$d maps to [package %3$d] [core %4$d] [thread %5$d]", + "%1$s: OS proc %2$d maps to [package %3$d] [core %4$d] thread %5$d", + "%1$s: OS proc %2$d maps to [package %3$d] core %4$d [thread %5$d]", + "%1$s: OS proc %2$d maps to package %3$d [core %4$d] [thread %5$d]", + "%1$s: OS proc %2$d maps to [package %3$d] core %4$d thread %5$d", + "%1$s: OS proc %2$d maps to package %3$d core %4$d [thread %5$d]", + "%1$s: OS proc %2$d maps to package %3$d [core %4$d] thread %5$d", + "%1$s: OS proc %2$d maps to package %3$d core %4$d thread %5$d", + "%1$s: OS proc %2$d maps to %3$s", + "%1$s: Internal thread %2$d changed affinity mask from %3$s to %4$s", + "%1$s: OS proc %2$d maps to package %3$d, CPU %4$d, TPU %5$d", + "%1$s: OS proc %2$d maps to package %3$d, CPU %4$d", + "%1$s: HT enabled; %2$d packages; %3$d TPU; %4$d TPUs per package", + "%1$s: HT disabled; %2$d packages", + "Threads encountered barriers in different order. ", + "Function %1$s failed:", + "%1$s: %2$s packages x %3$d cores/pkg x %4$d threads/core (%5$d total cores)", + "Incompatible message catalog \"%1$s\": Version \"%2$s\" found, version \"%3$s\" expected.", + "%1$s: ignored because %2$s has been defined", + "%1$s: overrides %3$s specified before", + "%1$s: Tiles are only supported if KMP_TOPOLOGY_METHOD=hwloc, using granularity=package instead", + "%1$s: Tiles requested but were not detected on this HW, using granularity=package instead", + "%1$s: %2$d packages x %3$d tiles/pkg x %4$d cores/tile x %5$d threads/core (%6$d total cores)", + "%1$s: %2$d packages x %3$d nodes/pkg x %4$d cores/node x %5$d threads/core (%6$d total cores)", + "%1$s: %2$d packages x %3$d nodes/pkg x %4$d tiles/node x %5$d cores/tile x %6$d threads/core (%7$d total cores)", + "OMPT: Cannot determine workshare type; using the default (loop) instead. This issue is fixed in an up-to-date compiler.", + "Allocator %1$s is not available, will use default allocator.", + "%1$s must be bound to a work-sharing or work-queuing construct with an \"ordered\" clause", + "Detected end of %1$s without first executing a corresponding beginning.", + "Iteration range too large in %1$s.", + "%1$s must not have a loop increment that evaluates to zero.", + "Expected end of %1$s; %2$s, however, has most recently begun execution.", + "%1$s is incorrectly nested within %2$s", + "%1$s cannot be executed multiple times during execution of one parallel iteration/section of %2$s", + "%1$s is incorrectly nested within %2$s of the same name", + "%1$s is incorrectly nested within %2$s that does not have an \"ordered\" clause", + "%1$s is incorrectly nested within %2$s but not within any of its \"task\" constructs", + "One thread at %1$s while another thread is at %2$s.", + "Cannot connect to %1$s", + "Cannot connect to %1$s - Using %2$s", + "%1$s does not support %2$s. Continuing without using %2$s.", + "%1$s does not support %2$s for %3$s. Continuing without using %2$s.", + "Static %1$s does not support %2$s. Continuing without using %2$s.", + "KMP_DYNAMIC_MODE=irml cannot be used with KMP_USE_IRML=0", + "ittnotify: Unknown group \"%2$s\" specified in environment variable \"%1$s\".", + "ittnotify: Environment variable \"%1$s\" too long: Actual lengths is %2$lu, max allowed length is %3$lu.", + "%1$s: Affinity capable, using global cpuid leaf 11 info", + "%1$s: Affinity not capable, using local cpuid leaf 11 info", + "%1$s: %2$s.", + "%1$s: %2$s - %3$s.", + "%1$s: OS proc to physical thread map:", + "%1$s: using \"flat\" OS <-> physical proc mapping.", + "%1$s: parsing %2$s.", + "%1$s - exiting.", + "Incompatible %1$s library with version %2$s found.", + "ittnotify: Function %1$s failed:", + "ittnofify: Error #%1$d.", + "%1$s must be set prior to first parallel region or certain API calls; ignored.", + "Lock initialized at %1$s(%2$d) was not destroyed", + "Cannot determine machine load balance - Using %1$s", + "%1$s: Affinity not capable, using pthread info", + "%1$s: Affinity capable, using pthread info", + "Loading \"%1$s\" library failed:", + "Lookup of \"%1$s\" function failed:", + "Buffer too small.", + "Error #%1$d.", + "%1$s: Invalid symbols found. Check the value \"%2$s\".", + "%1$s: Spaces between digits are not allowed \"%2$s\".", + "%1$s: %2$s - parsing %3$s.", + "%1$s cannot be specified via kmp_set_defaults() on this machine because it has more than one processor group.", + "Cannot use affinity type \"%1$s\" with multiple Windows* OS processor groups, using \"%2$s\".", + "Cannot use affinity granularity \"%1$s\" with multiple Windows* OS processor groups, using \"%2$s\".", + "%1$s: Mapping Windows* OS processor group proc to OS proc 64*+.", + "%1$s: OS proc %2$d maps to Windows* OS processor group %3$d proc %4$d", + "%1$s: Affinity balanced is not available.", + "%1$s: granularity=core will be used.", + "%1$s must be set prior to first OMP lock call or critical section; ignored.", + "futex system call not supported; %1$s=%2$s ignored.", + "%1$s: granularity=%2$s will be used.", + "%1$s: invalid value \"%2$s\", valid format is \"N[@N][,...][,Nt] ( can be S, N, L2, C, T for Socket, NUMA Node, L2 Cache, Core, Thread)\".", + "KMP_HW_SUBSET ignored: unsupported architecture.", + "KMP_HW_SUBSET ignored: too many cores requested.", + "%1$s: syntax error, using %2$s.", + "%1$s: Adaptive locks are not supported; using queuing.", + "%1$s: Invalid symbols found. Check the value \"%2$s\".", + "%1$s: Spaces between digits are not allowed \"%2$s\".", + "%1$s: pid %2$d tid %3$d thread %4$d bound to OS proc set %5$s", + "%1$s error: parallel loop increment and condition are inconsistent.", + "libgomp cancellation is not currently supported.", + "KMP_HW_SUBSET ignored: non-uniform topology.", + "KMP_HW_SUBSET ignored: only three-level topology is supported.", + "%1$s: granularity=%2$s is not supported with KMP_TOPOLOGY_METHOD=group. Using \"granularity=fine\".", + "%1$s: granularity=group is not supported with KMP_AFFINITY=%2$s. Using \"granularity=core\".", + "KMP_HW_SUBSET ignored: too many sockets requested.", + "KMP_HW_SUBSET \"o\" offset designator deprecated, please use @ prefix for offset value.", + "%1$s: Affinity capable, using hwloc.", + "%1$s: Ignoring hwloc mechanism.", + "%1$s: Hwloc failed in %2$s. Relying on internal affinity mechanisms.", + "%1$s must be set prior to OpenMP runtime library initialization; ignored.", + "%1$s variable deprecated, please use %2$s instead.", + "KMP_FORCE_REDUCTION: %1$s method is not supported; using critical.", + "KMP_HW_SUBSET ignored: unsupported item requested for non-HWLOC topology method (KMP_TOPOLOGY_METHOD)", + "KMP_HW_SUBSET ignored: too many NUMA Nodes requested.", + "KMP_HW_SUBSET ignored: too many L2 Caches requested.", + "KMP_HW_SUBSET ignored: too many Procs requested.", + "Hierarchy ignored: unsupported level: %1$s.", + "OMP: pid %1$s tid %2$s thread %3$s bound to OS proc set {%4$s}", + NULL + }; + +static char const * +__kmp_i18n_default_hints[] = + { + NULL, + "Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see https://bugs.llvm.org/.", + "Check NLSPATH environment variable, its value is \"%1$s\".", + "Please try changing the shell stack limit or adjusting the OMP_STACKSIZE environment variable.", + "Consider unsetting KMP_DEVICE_THREAD_LIMIT (KMP_ALL_THREADS), KMP_TEAMS_THREAD_LIMIT, and OMP_THREAD_LIMIT (if any are set).", + "Consider setting KMP_ALL_THREADPRIVATE to a value larger than %1$d.", + "This could also be due to a system-related limit on the number of threads.", + "This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://openmp.llvm.org/", + "This name is specified in environment variable KMP_CPUINFO_FILE.", + "Seems application required too much memory.", + "Use \"0\", \"FALSE\". \".F.\", \"off\", \"no\" as false values, \"1\", \"TRUE\", \".T.\", \"on\", \"yes\" as true values.", + "Perhaps too many threads.", + "Decrease priority of application. This will allow the monitor thread run at higher priority than other threads.", + "Try changing KMP_MONITOR_STACKSIZE or the shell stack limit.", + "Try changing OMP_STACKSIZE and/or the shell stack limit.", + "Try increasing OMP_STACKSIZE or the shell stack limit.", + "Try decreasing OMP_STACKSIZE.", + "Try decreasing the value of OMP_NUM_THREADS.", + "Try increasing KMP_MONITOR_STACKSIZE.", + "Try decreasing KMP_MONITOR_STACKSIZE.", + "Try decreasing the number of threads in use simultaneously.", + "Will use default schedule type (%1$s).", + "It could be a result of using an older OMP library with a newer compiler or memory corruption. You may check the proper OMP library is linked to the application.", + "Check %1$s environment variable, its value is \"%2$s\".", + "You may want to use an %1$s library that supports %2$s interface with version %3$s.", + "You may want to use an %1$s library with version %2$s.", + "System error #193 is \"Bad format of EXE or DLL file\". Usually it means the file is found, but it is corrupted or a file for another architecture. Check whether \"%1$s\" is a file for %2$s architecture.", + "System-related limit on the number of threads.", + NULL + }; + +struct kmp_i18n_section { + int size; + char const ** str; +}; // struct kmp_i18n_section +typedef struct kmp_i18n_section kmp_i18n_section_t; + +static kmp_i18n_section_t +__kmp_i18n_sections[] = + { + { 0, NULL }, + { 5, __kmp_i18n_default_meta }, + { 55, __kmp_i18n_default_strings }, + { 6, __kmp_i18n_default_formats }, + { 269, __kmp_i18n_default_messages }, + { 27, __kmp_i18n_default_hints }, + { 0, NULL } + }; + +struct kmp_i18n_table { + int size; + kmp_i18n_section_t * sect; +}; // struct kmp_i18n_table +typedef struct kmp_i18n_table kmp_i18n_table_t; + +static kmp_i18n_table_t __kmp_i18n_default_table = + { + 5, + __kmp_i18n_sections + }; + +// end of file // Added: head/lib/libomp/kmp_i18n_id.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libomp/kmp_i18n_id.inc Sat Mar 16 15:01:36 2019 (r345235) @@ -0,0 +1,399 @@ +// $FreeBSD$ +// Do not edit this file! // +// The file was generated from en_US.txt by message-converter.pl on Thu Mar 14 22:26:24 2019. // + +enum kmp_i18n_id { + + // A special id for absence of message. + kmp_i18n_null = 0, + + // Set #1, meta. + kmp_i18n_prp_first = 65536, + kmp_i18n_prp_Language, + kmp_i18n_prp_Country, + kmp_i18n_prp_LangId, + kmp_i18n_prp_Version, + kmp_i18n_prp_Revision, + kmp_i18n_prp_last, + + // Set #2, strings. + kmp_i18n_str_first = 131072, + kmp_i18n_str_Error, + kmp_i18n_str_UnknownFile, + kmp_i18n_str_NotANumber, + kmp_i18n_str_BadUnit, + kmp_i18n_str_IllegalCharacters, + kmp_i18n_str_ValueTooLarge, + kmp_i18n_str_ValueTooSmall, + kmp_i18n_str_NotMultiple4K, + kmp_i18n_str_UnknownTopology, + kmp_i18n_str_CantOpenCpuinfo, + kmp_i18n_str_ProcCpuinfo, + kmp_i18n_str_NoProcRecords, + kmp_i18n_str_TooManyProcRecords, + kmp_i18n_str_CantRewindCpuinfo, + kmp_i18n_str_LongLineCpuinfo, + kmp_i18n_str_TooManyEntries, + kmp_i18n_str_MissingProcField, + kmp_i18n_str_MissingPhysicalIDField, + kmp_i18n_str_MissingValCpuinfo, + kmp_i18n_str_DuplicateFieldCpuinfo, + kmp_i18n_str_PhysicalIDsNotUnique, + kmp_i18n_str_ApicNotPresent, + kmp_i18n_str_InvalidCpuidInfo, + kmp_i18n_str_OBSOLETE1, + kmp_i18n_str_InconsistentCpuidInfo, + kmp_i18n_str_OutOfHeapMemory, + kmp_i18n_str_MemoryAllocFailed, + kmp_i18n_str_Core, + kmp_i18n_str_Thread, + kmp_i18n_str_Package, + kmp_i18n_str_Node, + kmp_i18n_str_OBSOLETE2, + kmp_i18n_str_DecodingLegacyAPIC, + kmp_i18n_str_OBSOLETE3, + kmp_i18n_str_NotDefined, + kmp_i18n_str_EffectiveSettings, + kmp_i18n_str_UserSettings, + kmp_i18n_str_StorageMapWarning, + kmp_i18n_str_OBSOLETE4, + kmp_i18n_str_OBSOLETE5, + kmp_i18n_str_OBSOLETE6, + kmp_i18n_str_OBSOLETE7, + kmp_i18n_str_OBSOLETE8, + kmp_i18n_str_Decodingx2APIC, + kmp_i18n_str_NoLeaf11Support, + kmp_i18n_str_NoLeaf4Support, + kmp_i18n_str_ThreadIDsNotUnique, + kmp_i18n_str_UsingPthread, + kmp_i18n_str_LegacyApicIDsNotUnique, + kmp_i18n_str_x2ApicIDsNotUnique, + kmp_i18n_str_DisplayEnvBegin, + kmp_i18n_str_DisplayEnvEnd, + kmp_i18n_str_Device, + kmp_i18n_str_Host, + kmp_i18n_str_Tile, + kmp_i18n_str_last, + + // Set #3, formats. + kmp_i18n_fmt_first = 196608, + kmp_i18n_fmt_Info, + kmp_i18n_fmt_Warning, + kmp_i18n_fmt_Fatal, + kmp_i18n_fmt_SysErr, + kmp_i18n_fmt_Hint, + kmp_i18n_fmt_Pragma, + kmp_i18n_fmt_last, + + // Set #4, messages. + kmp_i18n_msg_first = 262144, + kmp_i18n_msg_LibraryIsSerial, + kmp_i18n_msg_CantOpenMessageCatalog, + kmp_i18n_msg_WillUseDefaultMessages, + kmp_i18n_msg_LockIsUninitialized, + kmp_i18n_msg_LockSimpleUsedAsNestable, + kmp_i18n_msg_LockNestableUsedAsSimple, + kmp_i18n_msg_LockIsAlreadyOwned, + kmp_i18n_msg_LockStillOwned, + kmp_i18n_msg_LockUnsettingFree, + kmp_i18n_msg_LockUnsettingSetByAnother, + kmp_i18n_msg_StackOverflow, + kmp_i18n_msg_StackOverlap, + kmp_i18n_msg_AssertionFailure, + kmp_i18n_msg_CantRegisterNewThread, + kmp_i18n_msg_DuplicateLibrary, + kmp_i18n_msg_CantOpenFileForReading, + kmp_i18n_msg_CantGetEnvVar, + kmp_i18n_msg_CantSetEnvVar, + kmp_i18n_msg_CantGetEnvironment, + kmp_i18n_msg_BadBoolValue, + kmp_i18n_msg_SSPNotBuiltIn, + kmp_i18n_msg_SPPSotfTerminateFailed, + kmp_i18n_msg_BufferOverflow, + kmp_i18n_msg_RealTimeSchedNotSupported, + kmp_i18n_msg_RunningAtMaxPriority, + kmp_i18n_msg_CantChangeMonitorPriority, + kmp_i18n_msg_MonitorWillStarve, + kmp_i18n_msg_CantSetMonitorStackSize, + kmp_i18n_msg_CantSetWorkerStackSize, + kmp_i18n_msg_CantInitThreadAttrs, + kmp_i18n_msg_CantDestroyThreadAttrs, + kmp_i18n_msg_CantSetWorkerState, + kmp_i18n_msg_CantSetMonitorState, + kmp_i18n_msg_NoResourcesForWorkerThread, + kmp_i18n_msg_NoResourcesForMonitorThread, + kmp_i18n_msg_CantTerminateWorkerThread, + kmp_i18n_msg_ScheduleKindOutOfRange, + kmp_i18n_msg_UnknownSchedulingType, + kmp_i18n_msg_InvalidValue, + kmp_i18n_msg_SmallValue, + kmp_i18n_msg_LargeValue, + kmp_i18n_msg_StgInvalidValue, + kmp_i18n_msg_BarrReleaseValueInvalid, + kmp_i18n_msg_BarrGatherValueInvalid, + kmp_i18n_msg_OBSOLETE9, + kmp_i18n_msg_ParRangeSyntax, + kmp_i18n_msg_UnbalancedQuotes, + kmp_i18n_msg_EmptyString, + kmp_i18n_msg_LongValue, + kmp_i18n_msg_InvalidClause, + kmp_i18n_msg_EmptyClause, + kmp_i18n_msg_InvalidChunk, + kmp_i18n_msg_LargeChunk, + kmp_i18n_msg_IgnoreChunk, + kmp_i18n_msg_CantGetProcFreq, + kmp_i18n_msg_EnvParallelWarn, + kmp_i18n_msg_AffParamDefined, + kmp_i18n_msg_AffInvalidParam, + kmp_i18n_msg_AffManyParams, + kmp_i18n_msg_AffManyParamsForLogic, + kmp_i18n_msg_AffNoParam, + kmp_i18n_msg_AffNoProcList, + kmp_i18n_msg_AffProcListNoType, + kmp_i18n_msg_AffProcListNotExplicit, + kmp_i18n_msg_AffSyntaxError, + kmp_i18n_msg_AffZeroStride, + kmp_i18n_msg_AffStartGreaterEnd, + kmp_i18n_msg_AffStrideLessZero, + kmp_i18n_msg_AffRangeTooBig, + kmp_i18n_msg_OBSOLETE10, + kmp_i18n_msg_AffNotSupported, + kmp_i18n_msg_OBSOLETE11, + kmp_i18n_msg_GetAffSysCallNotSupported, + kmp_i18n_msg_SetAffSysCallNotSupported, + kmp_i18n_msg_OBSOLETE12, + kmp_i18n_msg_OBSOLETE13, + kmp_i18n_msg_OBSOLETE14, + kmp_i18n_msg_OBSOLETE15, + kmp_i18n_msg_AffCantGetMaskSize, + kmp_i18n_msg_ParseSizeIntWarn, + kmp_i18n_msg_ParseExtraCharsWarn, + kmp_i18n_msg_UnknownForceReduction, + kmp_i18n_msg_TimerUseGettimeofday, + kmp_i18n_msg_TimerNeedMoreParam, + kmp_i18n_msg_TimerInvalidParam, + kmp_i18n_msg_TimerGettimeFailed, + kmp_i18n_msg_TimerUnknownFunction, + kmp_i18n_msg_UnknownSchedTypeDetected, + kmp_i18n_msg_DispatchManyThreads, + kmp_i18n_msg_IttLookupFailed, + kmp_i18n_msg_IttLoadLibFailed, + kmp_i18n_msg_IttAllNotifDisabled, + kmp_i18n_msg_IttObjNotifDisabled, + kmp_i18n_msg_IttMarkNotifDisabled, + kmp_i18n_msg_IttUnloadLibFailed, + kmp_i18n_msg_CantFormThrTeam, + kmp_i18n_msg_ActiveLevelsNegative, + kmp_i18n_msg_ActiveLevelsExceedLimit, + kmp_i18n_msg_SetLibraryIncorrectCall, + kmp_i18n_msg_FatalSysError, + kmp_i18n_msg_OutOfHeapMemory, + kmp_i18n_msg_OBSOLETE16, + kmp_i18n_msg_OBSOLETE17, + kmp_i18n_msg_Using_int_Value, + kmp_i18n_msg_Using_uint_Value, + kmp_i18n_msg_Using_uint64_Value, + kmp_i18n_msg_Using_str_Value, + kmp_i18n_msg_MaxValueUsing, + kmp_i18n_msg_MinValueUsing, + kmp_i18n_msg_MemoryAllocFailed, + kmp_i18n_msg_FileNameTooLong, + kmp_i18n_msg_OBSOLETE18, + kmp_i18n_msg_ManyThreadsForTPDirective, + kmp_i18n_msg_AffinityInvalidMask, + kmp_i18n_msg_WrongDefinition, + kmp_i18n_msg_TLSSetValueFailed, + kmp_i18n_msg_TLSOutOfIndexes, + kmp_i18n_msg_OBSOLETE19, + kmp_i18n_msg_CantGetNumAvailCPU, + kmp_i18n_msg_AssumedNumCPU, + kmp_i18n_msg_ErrorInitializeAffinity, + kmp_i18n_msg_AffThreadsMayMigrate, + kmp_i18n_msg_AffIgnoreInvalidProcID, + kmp_i18n_msg_AffNoValidProcID, + kmp_i18n_msg_UsingFlatOS, + kmp_i18n_msg_UsingFlatOSFile, + kmp_i18n_msg_UsingFlatOSFileLine, + kmp_i18n_msg_FileMsgExiting, + kmp_i18n_msg_FileLineMsgExiting, + kmp_i18n_msg_ConstructIdentInvalid, + kmp_i18n_msg_ThreadIdentInvalid, + kmp_i18n_msg_RTLNotInitialized, + kmp_i18n_msg_TPCommonBlocksInconsist, + kmp_i18n_msg_CantSetThreadAffMask, + kmp_i18n_msg_CantSetThreadPriority, + kmp_i18n_msg_CantCreateThread, + kmp_i18n_msg_CantCreateEvent, + kmp_i18n_msg_CantSetEvent, + kmp_i18n_msg_CantCloseHandle, + kmp_i18n_msg_UnknownLibraryType, + kmp_i18n_msg_ReapMonitorError, + kmp_i18n_msg_ReapWorkerError, + kmp_i18n_msg_ChangeThreadAffMaskError, + kmp_i18n_msg_ThreadsMigrate, + kmp_i18n_msg_DecreaseToThreads, + kmp_i18n_msg_IncreaseToThreads, + kmp_i18n_msg_OBSOLETE20, + kmp_i18n_msg_AffCapableUseCpuinfo, + kmp_i18n_msg_AffUseGlobCpuid, + kmp_i18n_msg_AffCapableUseFlat, + kmp_i18n_msg_AffNotCapableUseLocCpuid, + kmp_i18n_msg_AffNotCapableUseCpuinfo, + kmp_i18n_msg_AffFlatTopology, + kmp_i18n_msg_InitOSProcSetRespect, + kmp_i18n_msg_InitOSProcSetNotRespect, + kmp_i18n_msg_AvailableOSProc, + kmp_i18n_msg_Uniform, + kmp_i18n_msg_NonUniform, + kmp_i18n_msg_Topology, + kmp_i18n_msg_OBSOLETE21, + kmp_i18n_msg_OSProcToPackage, + kmp_i18n_msg_OBSOLETE22, + kmp_i18n_msg_OBSOLETE23, + kmp_i18n_msg_OBSOLETE24, + kmp_i18n_msg_OBSOLETE25, + kmp_i18n_msg_OBSOLETE26, + kmp_i18n_msg_OBSOLETE27, + kmp_i18n_msg_OBSOLETE28, + kmp_i18n_msg_OBSOLETE29, + kmp_i18n_msg_OBSOLETE30, + kmp_i18n_msg_OSProcMapToPack, + kmp_i18n_msg_OBSOLETE31, + kmp_i18n_msg_OBSOLETE32, + kmp_i18n_msg_OBSOLETE33, + kmp_i18n_msg_OBSOLETE34, + kmp_i18n_msg_OBSOLETE35, + kmp_i18n_msg_BarriersInDifferentOrder, + kmp_i18n_msg_FunctionError, + kmp_i18n_msg_TopologyExtra, + kmp_i18n_msg_WrongMessageCatalog, + kmp_i18n_msg_StgIgnored, + kmp_i18n_msg_OBSOLETE36, + kmp_i18n_msg_AffTilesNoHWLOC, + kmp_i18n_msg_AffTilesNoTiles, + kmp_i18n_msg_TopologyExtraTile, + kmp_i18n_msg_TopologyExtraNode, + kmp_i18n_msg_TopologyExtraNoTi, + kmp_i18n_msg_OmptOutdatedWorkshare, + kmp_i18n_msg_OmpNoAllocator, + kmp_i18n_msg_CnsBoundToWorksharing, + kmp_i18n_msg_CnsDetectedEnd, + kmp_i18n_msg_CnsIterationRangeTooLarge, + kmp_i18n_msg_CnsLoopIncrZeroProhibited, + kmp_i18n_msg_CnsExpectedEnd, + kmp_i18n_msg_CnsInvalidNesting, + kmp_i18n_msg_CnsMultipleNesting, + kmp_i18n_msg_CnsNestingSameName, + kmp_i18n_msg_CnsNoOrderedClause, + kmp_i18n_msg_CnsNotInTaskConstruct, + kmp_i18n_msg_CnsThreadsAtBarrier, + kmp_i18n_msg_CantConnect, + kmp_i18n_msg_CantConnectUsing, + kmp_i18n_msg_LibNotSupport, + kmp_i18n_msg_LibNotSupportFor, + kmp_i18n_msg_StaticLibNotSupport, + kmp_i18n_msg_OBSOLETE37, + kmp_i18n_msg_IttUnknownGroup, + kmp_i18n_msg_IttEnvVarTooLong, + kmp_i18n_msg_AffUseGlobCpuidL11, + kmp_i18n_msg_AffNotCapableUseLocCpuidL11, + kmp_i18n_msg_AffInfoStr, + kmp_i18n_msg_AffInfoStrStr, + kmp_i18n_msg_OSProcToPhysicalThreadMap, + kmp_i18n_msg_AffUsingFlatOS, + kmp_i18n_msg_AffParseFilename, + kmp_i18n_msg_MsgExiting, + kmp_i18n_msg_IncompatibleLibrary, + kmp_i18n_msg_IttFunctionError, + kmp_i18n_msg_IttUnknownError, + kmp_i18n_msg_EnvMiddleWarn, + kmp_i18n_msg_CnsLockNotDestroyed, + kmp_i18n_msg_CantLoadBalUsing, + kmp_i18n_msg_AffNotCapableUsePthread, + kmp_i18n_msg_AffUsePthread, + kmp_i18n_msg_OBSOLETE38, + kmp_i18n_msg_OBSOLETE39, + kmp_i18n_msg_OBSOLETE40, + kmp_i18n_msg_OBSOLETE41, + kmp_i18n_msg_NthSyntaxError, + kmp_i18n_msg_NthSpacesNotAllowed, + kmp_i18n_msg_AffStrParseFilename, + kmp_i18n_msg_OBSOLETE42, + kmp_i18n_msg_AffTypeCantUseMultGroups, + kmp_i18n_msg_AffGranCantUseMultGroups, + kmp_i18n_msg_AffWindowsProcGroupMap, + kmp_i18n_msg_AffOSProcToGroup, + kmp_i18n_msg_AffBalancedNotAvail, + kmp_i18n_msg_OBSOLETE43, + kmp_i18n_msg_EnvLockWarn, + kmp_i18n_msg_FutexNotSupported, + kmp_i18n_msg_AffGranUsing, + kmp_i18n_msg_AffHWSubsetInvalid, + kmp_i18n_msg_AffHWSubsetUnsupported, + kmp_i18n_msg_AffHWSubsetManyCores, + kmp_i18n_msg_SyntaxErrorUsing, + kmp_i18n_msg_AdaptiveNotSupported, + kmp_i18n_msg_EnvSyntaxError, + kmp_i18n_msg_EnvSpacesNotAllowed, + kmp_i18n_msg_BoundToOSProcSet, + kmp_i18n_msg_CnsLoopIncrIllegal, + kmp_i18n_msg_NoGompCancellation, + kmp_i18n_msg_AffHWSubsetNonUniform, + kmp_i18n_msg_AffHWSubsetNonThreeLevel, + kmp_i18n_msg_AffGranTopGroup, + kmp_i18n_msg_AffGranGroupType, + kmp_i18n_msg_AffHWSubsetManySockets, + kmp_i18n_msg_AffHWSubsetDeprecated, + kmp_i18n_msg_AffUsingHwloc, + kmp_i18n_msg_AffIgnoringHwloc, + kmp_i18n_msg_AffHwlocErrorOccurred, + kmp_i18n_msg_EnvSerialWarn, + kmp_i18n_msg_EnvVarDeprecated, + kmp_i18n_msg_RedMethodNotSupported, + kmp_i18n_msg_AffHWSubsetNoHWLOC, + kmp_i18n_msg_AffHWSubsetManyNodes, + kmp_i18n_msg_AffHWSubsetManyTiles, + kmp_i18n_msg_AffHWSubsetManyProcs, + kmp_i18n_msg_HierSchedInvalid, + kmp_i18n_msg_AffFormatDefault, + kmp_i18n_msg_last, + + // Set #5, hints. + kmp_i18n_hnt_first = 327680, + kmp_i18n_hnt_SubmitBugReport, + kmp_i18n_hnt_OBSOLETE44, + kmp_i18n_hnt_ChangeStackLimit, + kmp_i18n_hnt_Unset_ALL_THREADS, + kmp_i18n_hnt_Set_ALL_THREADPRIVATE, + kmp_i18n_hnt_PossibleSystemLimitOnThreads, + kmp_i18n_hnt_DuplicateLibrary, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Mar 16 10:51:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CA7715173BE; Sat, 16 Mar 2019 10:51:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C1BE082ECE; Sat, 16 Mar 2019 10:51:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3D2520F18; Sat, 16 Mar 2019 10:51:11 +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 x2GApBnm012752; Sat, 16 Mar 2019 10:51:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2GApBoD012751; Sat, 16 Mar 2019 10:51:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903161051.x2GApBoD012751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 16 Mar 2019 10:51:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345224 - stable/12/usr.bin/proccontrol X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/usr.bin/proccontrol X-SVN-Commit-Revision: 345224 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C1BE082ECE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 10:51:12 -0000 Author: kib Date: Sat Mar 16 10:51:11 2019 New Revision: 345224 URL: https://svnweb.freebsd.org/changeset/base/345224 Log: MFC r345089: Some fixes for proccontrol(1) man page. Modified: stable/12/usr.bin/proccontrol/proccontrol.1 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/proccontrol/proccontrol.1 ============================================================================== --- stable/12/usr.bin/proccontrol/proccontrol.1 Sat Mar 16 10:14:03 2019 (r345223) +++ stable/12/usr.bin/proccontrol/proccontrol.1 Sat Mar 16 10:51:11 2019 (r345224) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 22, 2019 +.Dd March 13, 2019 .Dt PROCCONTROL 1 .Os .Sh NAME @@ -62,12 +62,14 @@ Control the Address Space Layout Randomization. Only applicable to the new process spawned. .It Ar trace Control the permission for debuggers to attach. +Note that process is only allowed to enable tracing for itself, +not for any other process. .It Ar trapcap Controls the signalling of capability mode access violations. .El .Pp The -Ar control +.Ar control specifies if the selected .Ar mode should be enabled or disabled. @@ -84,9 +86,13 @@ for detailed description of each mode effects and inte process control facilities. .Pp The -.Op Fl q +.Fl q switch makes the utility query and print the current setting for the selected mode. +The +.Fl q +requires the query target process specification with +.Fl p . .Sh EXIT STATUS .Ex -std .Sh EXAMPLES From owner-svn-src-all@freebsd.org Sat Mar 16 15:45:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6866C15327E6; Sat, 16 Mar 2019 15:45:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 08D1D8DB8B; Sat, 16 Mar 2019 15:45:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CCA85241CA; Sat, 16 Mar 2019 15:45:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2GFjHab070550; Sat, 16 Mar 2019 15:45:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2GFjGlU070539; Sat, 16 Mar 2019 15:45:16 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903161545.x2GFjGlU070539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 Mar 2019 15:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345236 - in head: gnu/lib lib share/man/man5 share/mk sys/sys tools/build/mk tools/build/options X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: gnu/lib lib share/man/man5 share/mk sys/sys tools/build/mk tools/build/options X-SVN-Commit-Revision: 345236 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 08D1D8DB8B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 15:45:18 -0000 Author: dim Date: Sat Mar 16 15:45:15 2019 New Revision: 345236 URL: https://svnweb.freebsd.org/changeset/base/345236 Log: Connect lib/libomp to the build. * Set MK_OPENMP to yes by default only on amd64, for now. * Bump __FreeBSD_version to signal this addition. * Ensure gcc's conflicting omp.h is not installed if MK_OPENMP is yes. * Update OptionalObsoleteFiles.inc to cope with the conflicting omp.h. * Regenerate src.conf(5) with new WITH/WITHOUT fragments. Relnotes: yes PR: 236062 MFC after: 1 month X-MFC-With: r344779 Added: head/tools/build/options/WITHOUT_OPENMP (contents, props changed) head/tools/build/options/WITH_OPENMP (contents, props changed) Modified: head/gnu/lib/Makefile head/lib/Makefile head/share/man/man5/src.conf.5 head/share/mk/src.opts.mk head/sys/sys/param.h head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/gnu/lib/Makefile ============================================================================== --- head/gnu/lib/Makefile Sat Mar 16 15:01:36 2019 (r345235) +++ head/gnu/lib/Makefile Sat Mar 16 15:45:15 2019 (r345236) @@ -4,7 +4,10 @@ SUBDIR= SUBDIR.${MK_DIALOG}+= libdialog -SUBDIR.${MK_GCC}+= libgcov libgomp +SUBDIR.${MK_GCC}+= libgcov +.if ${MK_GCC} != "no" && ${MK_OPENMP} == "no" +SUBDIR+= libgomp +.endif SUBDIR.${MK_SSP}+= libssp SUBDIR.${MK_TESTS}+= tests Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Sat Mar 16 15:01:36 2019 (r345235) +++ head/lib/Makefile Sat Mar 16 15:45:15 2019 (r345236) @@ -196,6 +196,7 @@ _libproc= libproc _librtld_db= librtld_db .endif +SUBDIR.${MK_OPENMP}+= libomp SUBDIR.${MK_OPENSSL}+= libmp SUBDIR.${MK_PMC}+= libpmc libpmcstat SUBDIR.${MK_RADIUS_SUPPORT}+= libradius Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sat Mar 16 15:01:36 2019 (r345235) +++ head/share/man/man5/src.conf.5 Sat Mar 16 15:45:15 2019 (r345236) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd March 15, 2019 +.Dd March 16, 2019 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1534,6 +1534,16 @@ Set to build the non-essential components of the Infiniband software stack, mostly examples. .It Va WITH_OPENLDAP Enable building openldap support for kerberos. +.It Va WITHOUT_OPENMP +Set to not build LLVM's OpenMP runtime. +.Pp +This is a default setting on +arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64 and sparc64/sparc64. +.It Va WITH_OPENMP +Set to build LLVM's OpenMP runtime. +.Pp +This is a default setting on +amd64/amd64. .It Va WITHOUT_OPENSSH Set to not build OpenSSH. .It Va WITHOUT_OPENSSL Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sat Mar 16 15:01:36 2019 (r345235) +++ head/share/mk/src.opts.mk Sat Mar 16 15:45:15 2019 (r345236) @@ -399,6 +399,12 @@ BROKEN_OPTIONS+=NVME BROKEN_OPTIONS+=BSD_CRTBEGIN .endif +.if ${COMPILER_FEATURES:Mc++11} && ${__T} == "amd64" +__DEFAULT_YES_OPTIONS+=OPENMP +.else +__DEFAULT_NO_OPTIONS+=OPENMP +.endif + .include # Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sat Mar 16 15:01:36 2019 (r345235) +++ head/sys/sys/param.h Sat Mar 16 15:45:15 2019 (r345236) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300015 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300016 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Mar 16 15:01:36 2019 (r345235) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Mar 16 15:45:15 2019 (r345236) @@ -2731,7 +2731,9 @@ OLD_FILES+=usr/include/gcc/4.2/altivec.h OLD_FILES+=usr/include/gcc/4.2/ppc-asm.h OLD_FILES+=usr/include/gcc/4.2/spe.h .endif +.if ${MK_OPENMP} == no OLD_FILES+=usr/include/omp.h +.endif OLD_FILES+=usr/lib/libgcov.a OLD_FILES+=usr/lib/libgomp.a OLD_FILES+=usr/lib/libgomp.so @@ -7731,6 +7733,13 @@ OLD_FILES+=usr/share/man/man8/sminfo.8.gz OLD_FILES+=usr/share/man/man8/smpdump.8.gz OLD_FILES+=usr/share/man/man8/smpquery.8.gz OLD_FILES+=usr/share/man/man8/vendstat.8.gz +.endif + +.if ${MK_OPENSSH} == no +.if ${MK_GCC} == no +OLD_FILES+=usr/include/omp.h +.endif +OLD_LIBS+=usr/lib/libomp.so .endif .if ${MK_OPENSSH} == no Added: head/tools/build/options/WITHOUT_OPENMP ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_OPENMP Sat Mar 16 15:45:15 2019 (r345236) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to not build LLVM's OpenMP runtime. Added: head/tools/build/options/WITH_OPENMP ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_OPENMP Sat Mar 16 15:45:15 2019 (r345236) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build LLVM's OpenMP runtime. From owner-svn-src-all@freebsd.org Sat Mar 16 13:45:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D765D152D65C; Sat, 16 Mar 2019 13:45:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 781CE89590; Sat, 16 Mar 2019 13:45:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C93922D7C; Sat, 16 Mar 2019 13:45:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2GDjEv3005946; Sat, 16 Mar 2019 13:45:14 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2GDjESM005945; Sat, 16 Mar 2019 13:45:14 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903161345.x2GDjESM005945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 Mar 2019 13:45:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345234 - head/contrib/openmp/runtime/src X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/openmp/runtime/src X-SVN-Commit-Revision: 345234 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 781CE89590 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 13:45:15 -0000 Author: dim Date: Sat Mar 16 13:45:14 2019 New Revision: 345234 URL: https://svnweb.freebsd.org/changeset/base/345234 Log: Add openmp __kmp_gettid() wrapper, using pthread_getthreadid_np(3). This has also been submitted upstream. PR: 236062 MFC after: 1 month X-MFC-With: r344779 Modified: head/contrib/openmp/runtime/src/kmp_wrapper_getpid.h Modified: head/contrib/openmp/runtime/src/kmp_wrapper_getpid.h ============================================================================== --- head/contrib/openmp/runtime/src/kmp_wrapper_getpid.h Sat Mar 16 13:43:07 2019 (r345233) +++ head/contrib/openmp/runtime/src/kmp_wrapper_getpid.h Sat Mar 16 13:45:14 2019 (r345234) @@ -24,6 +24,9 @@ #if KMP_OS_DARWIN // OS X #define __kmp_gettid() syscall(SYS_thread_selfid) +#elif KMP_OS_FREEBSD +#include +#define __kmp_gettid() pthread_getthreadid_np() #elif KMP_OS_NETBSD #include #define __kmp_gettid() _lwp_self() From owner-svn-src-all@freebsd.org Sat Mar 16 17:55:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5F4415371EF; Sat, 16 Mar 2019 17:55:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5415B6D5FB; Sat, 16 Mar 2019 17:55:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4721125813; Sat, 16 Mar 2019 17:55:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2GHtNRd042322; Sat, 16 Mar 2019 17:55:23 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2GHtNgM042321; Sat, 16 Mar 2019 17:55:23 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201903161755.x2GHtNgM042321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 Mar 2019 17:55:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345237 - head/lib X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/lib X-SVN-Commit-Revision: 345237 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5415B6D5FB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 17:55:23 -0000 Author: dim Date: Sat Mar 16 17:55:22 2019 New Revision: 345237 URL: https://svnweb.freebsd.org/changeset/base/345237 Log: Disable lib/libomp build for the 32-bit part of amd64 buildworld, as it is not supported for that target. Reported by: Michael Butler PR: 236062 MFC after: 1 month X-MFC-With: r344779 Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Sat Mar 16 15:45:15 2019 (r345236) +++ head/lib/Makefile Sat Mar 16 17:55:22 2019 (r345237) @@ -196,7 +196,9 @@ _libproc= libproc _librtld_db= librtld_db .endif +.if !defined(COMPAT_32BIT) SUBDIR.${MK_OPENMP}+= libomp +.endif SUBDIR.${MK_OPENSSL}+= libmp SUBDIR.${MK_PMC}+= libpmc libpmcstat SUBDIR.${MK_RADIUS_SUPPORT}+= libradius From owner-svn-src-all@freebsd.org Sat Mar 16 20:02:58 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81565153B18A; Sat, 16 Mar 2019 20:02:58 +0000 (UTC) (envelope-from wosch@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2555C72713; Sat, 16 Mar 2019 20:02:58 +0000 (UTC) (envelope-from wosch@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19D0B26E0F; Sat, 16 Mar 2019 20:02:58 +0000 (UTC) (envelope-from wosch@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2GK2vvi013276; Sat, 16 Mar 2019 20:02:57 GMT (envelope-from wosch@FreeBSD.org) Received: (from wosch@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2GK2vmA013275; Sat, 16 Mar 2019 20:02:57 GMT (envelope-from wosch@FreeBSD.org) Message-Id: <201903162002.x2GK2vmA013275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wosch set sender to wosch@FreeBSD.org using -f From: Wolfram Schneider Date: Sat, 16 Mar 2019 20:02:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345238 - head X-SVN-Group: head X-SVN-Commit-Author: wosch X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 345238 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2555C72713 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 20:02:58 -0000 Author: wosch Date: Sat Mar 16 20:02:57 2019 New Revision: 345238 URL: https://svnweb.freebsd.org/changeset/base/345238 Log: `make buildkernel' should display the build time in seconds PR: 224433 Approved by: cem Differential Revision: https://reviews.freebsd.org/D13910 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Mar 16 17:55:22 2019 (r345237) +++ head/Makefile.inc1 Sat Mar 16 20:02:57 2019 (r345238) @@ -1584,6 +1584,11 @@ _cleankernobj_fast_depend_hack: .PHONY ${WMAKE_TGTS:N_worldtmp:Nbuild${libcompat}} ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE .PHONY +# record kernel(s) build time in seconds +.if make(buildkernel) +_BUILDKERNEL_START!= date '+%s' +.endif + # # buildkernel # @@ -1640,7 +1645,12 @@ buildkernel: .MAKE .PHONY @echo "--------------------------------------------------------------" @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`" @echo "--------------------------------------------------------------" + .endfor + @seconds=$$(($$(date '+%s') - ${_BUILDKERNEL_START})); \ + echo -n ">>> Kernel(s) build for${BUILDKERNELS} in $$seconds seconds, "; \ + echo "ncpu: $$(sysctl -n hw.ncpu)${.MAKE.JOBS:S/^/, make -j/}" + @echo "--------------------------------------------------------------" NO_INSTALLEXTRAKERNELS?= yes From owner-svn-src-all@freebsd.org Sat Mar 16 22:37:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D39915402F5 for ; Sat, 16 Mar 2019 22:37:20 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA4D477A6B for ; Sat, 16 Mar 2019 22:37:19 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1552774868; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=l61qIVjaKRgjBGqIRHfmGaeuvgRrd8eo9n7pg5oFOI2alk1PeGMg/NdJ6omoGTfTkRHOdzs+91szC Mh13td9uLR7RVymAfNvV14Iq0hR9q/GQOdni+6FN963jwWvQLfAIbf/j9M6hAjbQZFLPXVktgzzzky sa4XdSoF7hOTsSvABc8Iw/RJJWugThqFHk7a2AIoqpA58pgKGTcqEPw/YuG+nSdWUVQx56UZ1zkaUH 4XvvpRABKEqmzxMjhZfQzi8zaDZ7016AlzA5l75Yf7l6r89i2197QXeuQMHq/I7u8F2p+2kEc351Lr 9JFXtzYR8R80vV3ia8yyQihMKyym4Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=OIwK3QKD/S3LLspGD7jQTCr3dbbLwTVwnwlpF0Uh3r0=; b=Vagn28PSurYRhpigbRdw1y+J/BjFWcbg8kcidHo4EhmThS2smmIfpJsLRp0/jwUbfHKjwNW7xMjD6 gEeOg+a7ZdZbyGkbccqqJAHG0LC4MF1K43lKR0mvCJwQqzpPZGeMgAWySfkpes40mw6dGqW3nF3/So 8kCk6PHDsLjR9k1gxFUazjv+rXZQBng4XytleYDtYpLRFqMWXh37GnHXDxYUgp9pHABoYqcdzIkgFS 6Q8wE4q4xv5if0FSyEL9T6zDHNxqpHog1NUZQTJ0DdKXRKIkgJkq9nG6h9Pro7qxNUH7crVIWz3i60 X5a85G/M3zowpKAbdka+1zh5qa93lAA== ARC-Authentication-Results: i=1; outbound2.eu.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=OIwK3QKD/S3LLspGD7jQTCr3dbbLwTVwnwlpF0Uh3r0=; b=WtkYrHBWtXHjs2cNizuTz07+vlgo82iRzEYL2WYwcgPbCc9ntRI88Dx2OLBjlGseALiV+5g92Uf2p OMFV3jNPpcWD2V/GP8NQwtM8IYZ22YfSmC2By9v0KSb4jXdAai+0zS7GxXG4Uy3cSTPdM4EtYgmy7N ezHCW9ws6remJ3hTNz31hnZMkjLPBfzB1WBo/AUXoPjsJ+D/zM8tZNU8QNtfSDH/yb76qHBQgB5m4p uzHayf3cVgppYth7a+FaEkMLqWYw0AW0DUIiYx6oBTXNjTD9mfGRkzXiXn+s/6RaGNmOBXM+BqmUNi paHArB/K/5jAJQxvMOeTf3xVU7BA3AA== X-MHO-RoutePath: aGlwcGll X-MHO-User: c94ec85e-4839-11e9-803b-31925da7267c X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.eu.mailhop.org (Halon) with ESMTPSA id c94ec85e-4839-11e9-803b-31925da7267c; Sat, 16 Mar 2019 22:21:05 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x2GML3bQ057912; Sat, 16 Mar 2019 16:21:03 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <0ea3a53f64016afa9dbc6f1b2d2ee25f09df00b8.camel@freebsd.org> Subject: Re: svn commit: r345238 - head From: Ian Lepore To: Wolfram Schneider , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sat, 16 Mar 2019 16:21:03 -0600 In-Reply-To: <201903162002.x2GK2vmA013275@repo.freebsd.org> References: <201903162002.x2GK2vmA013275@repo.freebsd.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: DA4D477A6B X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.993,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 22:37:20 -0000 On Sat, 2019-03-16 at 20:02 +0000, Wolfram Schneider wrote: > Author: wosch > Date: Sat Mar 16 20:02:57 2019 > New Revision: 345238 > URL: https://svnweb.freebsd.org/changeset/base/345238 > > Log: > `make buildkernel' should display the build time in seconds > > PR: 224433 > Approved by: cem > Differential Revision: https://reviews.freebsd.org/D13910 > > Modified: > head/Makefile.inc1 > > Modified: head/Makefile.inc1 > ===================================================================== > ========= > --- head/Makefile.inc1 Sat Mar 16 17:55:22 2019 (r345237) > +++ head/Makefile.inc1 Sat Mar 16 20:02:57 2019 (r345238) > @@ -1584,6 +1584,11 @@ _cleankernobj_fast_depend_hack: .PHONY > > ${WMAKE_TGTS:N_worldtmp:Nbuild${libcompat}} > ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE .PHONY > > +# record kernel(s) build time in seconds > +.if make(buildkernel) > +_BUILDKERNEL_START!= date '+%s' > +.endif > + > # > # buildkernel > # > @@ -1640,7 +1645,12 @@ buildkernel: .MAKE .PHONY > @echo "------------------------------------------------------ > --------" > @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C > date`" > @echo "------------------------------------------------------ > --------" > + > .endfor > + @seconds=$$(($$(date '+%s') - ${_BUILDKERNEL_START})); \ > + echo -n ">>> Kernel(s) build for${BUILDKERNELS} in $$seconds > seconds, "; \ > + echo "ncpu: $$(sysctl -n hw.ncpu)${.MAKE.JOBS:S/^/, make > -j/}" > + @echo "------------------------------------------------------ > --------" > > NO_INSTALLEXTRAKERNELS?= yes > > Does this really report the buildkernel time, or the time from when make starts until when the kernel portion of the make finishes? Will the result be right when you do "make buildworld buildkernel"? -- Ian