From owner-svn-src-head@freebsd.org Sun Feb 3 00:18:30 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F246414D4ADA; Sun, 3 Feb 2019 00:18:29 +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 8E301706CE; Sun, 3 Feb 2019 00:18:29 +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 7BFC1E736; Sun, 3 Feb 2019 00:18:29 +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 x130IT9A055450; Sun, 3 Feb 2019 00:18:29 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x130ITJo055449; Sun, 3 Feb 2019 00:18:29 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902030018.x130ITJo055449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 3 Feb 2019 00:18:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343690 - head/sbin/ifconfig X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sbin/ifconfig X-SVN-Commit-Revision: 343690 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8E301706CE 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.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 00:18:30 -0000 Author: avos Date: Sun Feb 3 00:18:29 2019 New Revision: 343690 URL: https://svnweb.freebsd.org/changeset/base/343690 Log: ifconfig(8): interpret VHT rates correctly for 'list roam / txparam' options They are represented via MCS rate index, not as a 'speed in MBps' * 2. MFC after: 5 days Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Sat Feb 2 22:39:29 2019 (r343689) +++ head/sbin/ifconfig/ifieee80211.c Sun Feb 3 00:18:29 2019 (r343690) @@ -4301,7 +4301,10 @@ list_roam(int s) rp = &roamparams.params[mode]; if (rp->rssi == 0 && rp->rate == 0) continue; - if (mode == IEEE80211_MODE_11NA || mode == IEEE80211_MODE_11NG) { + if (mode == IEEE80211_MODE_11NA || + mode == IEEE80211_MODE_11NG || + mode == IEEE80211_MODE_VHT_2GHZ || + mode == IEEE80211_MODE_VHT_5GHZ) { if (rp->rssi & 1) LINE_CHECK("roam:%-7.7s rssi %2u.5dBm MCS %2u ", modename[mode], rp->rssi/2, @@ -4332,7 +4335,10 @@ list_txparams(int s) tp = &txparams.params[mode]; if (tp->mgmtrate == 0 && tp->mcastrate == 0) continue; - if (mode == IEEE80211_MODE_11NA || mode == IEEE80211_MODE_11NG) { + if (mode == IEEE80211_MODE_11NA || + mode == IEEE80211_MODE_11NG || + mode == IEEE80211_MODE_VHT_2GHZ || + mode == IEEE80211_MODE_VHT_5GHZ) { if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE) LINE_CHECK("%-7.7s ucast NONE mgmt %2u MCS " "mcast %2u MCS maxretry %u", From owner-svn-src-head@freebsd.org Sun Feb 3 00:27:42 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65E4A14D4F62; Sun, 3 Feb 2019 00:27:42 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D522170C92; Sun, 3 Feb 2019 00:27:41 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf1-x42a.google.com with SMTP id w73so5079500pfk.10; Sat, 02 Feb 2019 16:27:41 -0800 (PST) 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=Awby8i07a76L3DnzigcAJu4kkMtMRIUv9+wAGw0i278=; b=tzZutrblYB9bwKVUmQtlsDEsu+Ny+Lc7qSAENxjI+ibdgaUux+IA7yw/xkMuZcksu0 CEEeVURV24PXMx6j2mtNER0hZwfeVQ8/glvbzS99dmVxiMVr2/g3FrA8cYrZv16tzGfm ZHjIBVVrbANSSUUuy+PJWnbyc0tF/RgYMIFgtHBnEGDWFnqDb/ocFUjGtSMnkzkl61sB W2fdNUT3VdnXIcUNstjOSEhIzBwtYvjgzicZnzh6bWcrn677WTeqf8bS9aFKl+qyPw2w YEgvgohKjIxI62Px1LQQHfL3da0/ZtNvLlxX4poUTBAoDJ0zPTMVEGy6IaVMF+uWL9o+ pm6w== 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=Awby8i07a76L3DnzigcAJu4kkMtMRIUv9+wAGw0i278=; b=mWo4Qd0KAm0KBQU82xmlgh6urMghBIGl+XHozbKEd84DqIX1k1RWjzV//x2uXYbqvl vK+qjxRBreiCtBxoKrqVZGcebpVuPl3UVpQP3XmsaeMqf+cs5o2sGq9eDnnCgVNkhuyS k8GrPeBrFo6OUWX5xkFS/7orzcTOBJfCwwporXJUUelU52G1de/2+B0pcqHCTpYdv2Ds sO0e08OsLye09fS0U4QsDREmzJAzXy0ByT3tY4q55dGbidNGBBrG9dNjl6rpwzrjBlYD 5ukTGi4zjLTtGqHYymjCCATcKxWuXYvVpVSLL05uenAAEVyItGld7exo3qgQxC0Hjadv 0Fyw== X-Gm-Message-State: AHQUAuam2b3N/RG0bXC+viIv8wzZdOvEtqBX5v2CxbY0nZBbWxH+yRvn 3TcI6YnZ/ez+fYc52NFs9iMksgfM X-Google-Smtp-Source: AHgI3IbanlsmZk+HVWoSKwyamVB2ll94BKDs9q46emVHxggJPJBqFP8hEF6Cb7B3Ssb1laTBvwp2Wg== X-Received: by 2002:a63:4f20:: with SMTP id d32mr7810860pgb.47.1549153659813; Sat, 02 Feb 2019 16:27:39 -0800 (PST) Received: from ?IPv6:2607:fb90:815d:5e71:193c:affb:4b67:7236? ([2607:fb90:815d:5e71:193c:affb:4b67:7236]) by smtp.gmail.com with ESMTPSA id d68sm21362879pfa.64.2019.02.02.16.27.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 02 Feb 2019 16:27:38 -0800 (PST) Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r343688 - head/sys/dev/vmware/vmxnet3 From: Enji Cooper X-Mailer: iPhone Mail (16C104) In-Reply-To: <201902022114.x12LEsE8058821@repo.freebsd.org> Date: Sat, 2 Feb 2019 16:27:36 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <7D5D3255-CF9C-4F13-A0A9-965AA2E7AE81@gmail.com> References: <201902022114.x12LEsE8058821@repo.freebsd.org> To: Patrick Kelsey X-Rspamd-Queue-Id: D522170C92 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.92 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.92)[-0.916,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] 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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 00:27:42 -0000 Hi Patrick, > On Feb 2, 2019, at 13:14, Patrick Kelsey wrote: >=20 > Author: pkelsey > Date: Sat Feb 2 21:14:53 2019 > New Revision: 343688 > URL: https://svnweb.freebsd.org/changeset/base/343688 >=20 > Log: > Fix interrupt index configuratoin when using MSI interrupts. >=20 > When in MSI mode, the device was only being configured with one > interrupt index, but it needs two - one for the actual interrupt and > one to park the tx queue at. >=20 > Also clarified comments relating to interrupt index assignment. >=20 > Reported by: Yuri Pankov > MFC after: 1 day Does this change partly fix https://bugs.freebsd.org/bugzilla/show_bug.cgi?i= d=3D203874 ? -Enji= From owner-svn-src-head@freebsd.org Sun Feb 3 00:30:40 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 726E014AA09A; Sun, 3 Feb 2019 00:30:40 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ED77670E9E; Sun, 3 Feb 2019 00:30:39 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: by mail-pg1-f181.google.com with SMTP id v28so4683155pgk.10; Sat, 02 Feb 2019 16:30:39 -0800 (PST) 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=GUEtbJNu4aySLLd+PIoU8DfJ+H9oaSz752YsuaEA/jQ=; b=HfRVzCOeXNzILgxe/owCBkmllZLysg3ktW1IJ9CJIelKpv5nhZF95/yOZRt6wH20wK 8f60J+Ly6ZxGh7s5a6XPJIW2Wy2df+epsxAHc+aGc3UZ8Dz8/502f7bOg1Az0f8EyiSy VdK7lpyonk4Z6aLOyx2KH7zP935bhS8jg2ptrBAHs6x/kNDHYZ7gQb9GeB6WGJe6Oocc YjYd9inaVaVhpeRJZlzsVOg87nXJEllH8cPPB5+SKw8+nFIdlF+6Yrcx7aoRRZ+uYX1/ 3UFNLFwGPFERzLswp36HtWRTm2WXOoCnkD6q9Vr6FEcWnxWnsE+f9GuIi8MElCnwh1Es nIQA== X-Gm-Message-State: AHQUAuaVWlpZU1HuQfWX6dzEzkeemx+g63SxGyN0RdC5Erz9R6F6hpHa DWASN7KZJQHIvJq0gg52M+hG16W5n5yis3BjYf+Tgg== X-Google-Smtp-Source: AHgI3IZNFRT0atHVZv3IeXYJkzApJXaf/RyLseQ2fPfvylmvNF9dY6/HlzXZMuBz4yVLsuKakQCEEmxiSBxY3VSCp6Q= X-Received: by 2002:a63:f74f:: with SMTP id f15mr7868325pgk.190.1549153832537; Sat, 02 Feb 2019 16:30:32 -0800 (PST) MIME-Version: 1.0 References: <201902022114.x12LEsE8058821@repo.freebsd.org> <7D5D3255-CF9C-4F13-A0A9-965AA2E7AE81@gmail.com> In-Reply-To: <7D5D3255-CF9C-4F13-A0A9-965AA2E7AE81@gmail.com> From: Patrick Kelsey Date: Sat, 2 Feb 2019 19:30:18 -0500 Message-ID: Subject: Re: svn commit: r343688 - head/sys/dev/vmware/vmxnet3 To: Enji Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: ED77670E9E 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.931,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 00:30:40 -0000 On Sat, Feb 2, 2019 at 7:27 PM Enji Cooper wrote: > Hi Patrick, > > On Feb 2, 2019, at 13:14, Patrick Kelsey wrote: > > Author: pkelsey > Date: Sat Feb 2 21:14:53 2019 > New Revision: 343688 > URL: https://svnweb.freebsd.org/changeset/base/343688 > > Log: > Fix interrupt index configuratoin when using MSI interrupts. > > When in MSI mode, the device was only being configured with one > interrupt index, but it needs two - one for the actual interrupt and > one to park the tx queue at. > > Also clarified comments relating to interrupt index assignment. > > Reported by: Yuri Pankov > MFC after: 1 day > > > Does this change partly fix > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203874 ? > No, this fixes the behavior of the iflib version of the vmx(4) driver when that bug causes its interrupt configuration code to fall into the MSI path (because MSI-X has been blacklisted). -Patrick From owner-svn-src-head@freebsd.org Sun Feb 3 01:32:04 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19DFE14AD4B8; Sun, 3 Feb 2019 01:32:04 +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 B4A8C74790; Sun, 3 Feb 2019 01:32: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 AA959F747; Sun, 3 Feb 2019 01:32:03 +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 x131W3mb096573; Sun, 3 Feb 2019 01:32:03 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x131W3B8096571; Sun, 3 Feb 2019 01:32:03 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902030132.x131W3B8096571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 3 Feb 2019 01:32:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343696 - head/sys/net80211 X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/net80211 X-SVN-Commit-Revision: 343696 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B4A8C74790 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.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 01:32:04 -0000 Author: avos Date: Sun Feb 3 01:32:02 2019 New Revision: 343696 URL: https://svnweb.freebsd.org/changeset/base/343696 Log: net80211(4): do not setup roaming parameters for unsupported modes. ifconfig(8) prints per-mode parameters if they are non-zero; since we have 13 possible modes with 3...5 typically supported this change should greatly reduce amount of information for 'ifconfig list roam' command. While here ensure that sta_roam_check() will not use roaming parameters for unsupported modes (it should not). This change effectively reverts r188776. MFC after: 2 weeks Modified: head/sys/net80211/ieee80211_scan.c head/sys/net80211/ieee80211_scan_sta.c Modified: head/sys/net80211/ieee80211_scan.c ============================================================================== --- head/sys/net80211/ieee80211_scan.c Sun Feb 3 00:45:52 2019 (r343695) +++ head/sys/net80211/ieee80211_scan.c Sun Feb 3 01:32:02 2019 (r343696) @@ -130,13 +130,21 @@ void ieee80211_scan_vattach(struct ieee80211vap *vap) { struct ieee80211com *ic = vap->iv_ic; + int m; vap->iv_bgscanidle = (IEEE80211_BGSCAN_IDLE_DEFAULT*1000)/hz; vap->iv_bgscanintvl = IEEE80211_BGSCAN_INTVAL_DEFAULT*hz; vap->iv_scanvalid = IEEE80211_SCAN_VALID_DEFAULT*hz; vap->iv_roaming = IEEE80211_ROAMING_AUTO; - memcpy(vap->iv_roamparms, defroam, sizeof(defroam)); + + memset(vap->iv_roamparms, 0, sizeof(vap->iv_roamparms)); + for (m = IEEE80211_MODE_AUTO + 1; m < IEEE80211_MODE_MAX; m++) { + if (isclr(ic->ic_modecaps, m)) + continue; + + memcpy(&vap->iv_roamparms[m], &defroam[m], sizeof(defroam[m])); + } ic->ic_scan_methods->sc_vattach(vap); } Modified: head/sys/net80211/ieee80211_scan_sta.c ============================================================================== --- head/sys/net80211/ieee80211_scan_sta.c Sun Feb 3 00:45:52 2019 (r343695) +++ head/sys/net80211/ieee80211_scan_sta.c Sun Feb 3 01:32:02 2019 (r343696) @@ -1354,6 +1354,9 @@ sta_roam_check(struct ieee80211_scan_state *ss, struct mode = ieee80211_chan2mode(ic->ic_bsschan); roamRate = vap->iv_roamparms[mode].rate; roamRssi = vap->iv_roamparms[mode].rssi; + KASSERT(roamRate != 0 && roamRssi != 0, ("iv_roamparms are not" + "initialized for %s mode!", ieee80211_phymode_name[mode])); + ucastRate = vap->iv_txparms[mode].ucastrate; /* NB: the most up to date rssi is in the node, not the scan cache */ curRssi = ic->ic_node_getrssi(ni); From owner-svn-src-head@freebsd.org Sun Feb 3 02:32:14 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84ED414B0B65; Sun, 3 Feb 2019 02:32:14 +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 2A0D476BC5; Sun, 3 Feb 2019 02:32:14 +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 20E11181A6; Sun, 3 Feb 2019 02:32:14 +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 x132WEEQ026012; Sun, 3 Feb 2019 02:32:14 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x132WEQp026011; Sun, 3 Feb 2019 02:32:14 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902030232.x132WEQp026011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 3 Feb 2019 02:32:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343697 - head/sys/net80211 X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/net80211 X-SVN-Commit-Revision: 343697 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2A0D476BC5 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.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 02:32:14 -0000 Author: avos Date: Sun Feb 3 02:32:13 2019 New Revision: 343697 URL: https://svnweb.freebsd.org/changeset/base/343697 Log: net80211(4): fix rate check when 'roaming' ifconfig(8) option is set to 'auto' Do not try to clear 'basic rate' bit from roamRate; it cannot be here and, actually, this operation clears 'MCS rate' bit instead, breaking comparison for 11n / 11ac modes. Tested with RTL8188CUS, HOSTAP mode + RTL8821AU, STA mode. MFC after: 3 days Modified: head/sys/net80211/ieee80211_scan_sta.c Modified: head/sys/net80211/ieee80211_scan_sta.c ============================================================================== --- head/sys/net80211/ieee80211_scan_sta.c Sun Feb 3 01:32:02 2019 (r343696) +++ head/sys/net80211/ieee80211_scan_sta.c Sun Feb 3 02:32:13 2019 (r343697) @@ -1362,7 +1362,6 @@ sta_roam_check(struct ieee80211_scan_state *ss, struct curRssi = ic->ic_node_getrssi(ni); if (ucastRate == IEEE80211_FIXED_RATE_NONE) { curRate = ni->ni_txrate; - roamRate &= IEEE80211_RATE_VAL; IEEE80211_DPRINTF(vap, IEEE80211_MSG_ROAM, "%s: currssi %d currate %u roamrssi %d roamrate %u\n", __func__, curRssi, curRate, roamRssi, roamRate); From owner-svn-src-head@freebsd.org Sun Feb 3 03:03:00 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B399A14B1F3B; Sun, 3 Feb 2019 03:03:00 +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 55DAC77DB9; Sun, 3 Feb 2019 03:03:00 +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 430DE1889F; Sun, 3 Feb 2019 03:03:00 +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 x13330tg044117; Sun, 3 Feb 2019 03:03:00 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x13330j6044116; Sun, 3 Feb 2019 03:03:00 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902030303.x13330j6044116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 3 Feb 2019 03:03:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343698 - head/sbin/ifconfig X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sbin/ifconfig X-SVN-Commit-Revision: 343698 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 55DAC77DB9 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 03:03:01 -0000 Author: avos Date: Sun Feb 3 03:02:59 2019 New Revision: 343698 URL: https://svnweb.freebsd.org/changeset/base/343698 Log: ifconfig(8): display management / multicast wlan(4) rates properly For 11n / 11ac we are still using non-11n rates for management and multicast traffic by default; check 'MCS rate' bit to determine how to print them correctly. PR: 161035 MFC after: 1 week Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Sun Feb 3 02:32:13 2019 (r343697) +++ head/sbin/ifconfig/ifieee80211.c Sun Feb 3 03:02:59 2019 (r343698) @@ -4324,6 +4324,13 @@ list_roam(int s) } } +/* XXX TODO: rate-to-string method... */ +static const char* +get_mcs_mbs_rate_str(uint8_t rate) +{ + return (rate & IEEE80211_RATE_MCS) ? "MCS " : "Mb/s"; +} + static void list_txparams(int s) { @@ -4340,19 +4347,23 @@ list_txparams(int s) mode == IEEE80211_MODE_VHT_2GHZ || mode == IEEE80211_MODE_VHT_5GHZ) { if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE) - LINE_CHECK("%-7.7s ucast NONE mgmt %2u MCS " - "mcast %2u MCS maxretry %u", + LINE_CHECK("%-7.7s ucast NONE mgmt %2u %s " + "mcast %2u %s maxretry %u", modename[mode], tp->mgmtrate &~ IEEE80211_RATE_MCS, + get_mcs_mbs_rate_str(tp->mgmtrate), tp->mcastrate &~ IEEE80211_RATE_MCS, + get_mcs_mbs_rate_str(tp->mcastrate), tp->maxretry); else - LINE_CHECK("%-7.7s ucast %2u MCS mgmt %2u MCS " - "mcast %2u MCS maxretry %u", + LINE_CHECK("%-7.7s ucast %2u MCS mgmt %2u %s " + "mcast %2u %s maxretry %u", modename[mode], tp->ucastrate &~ IEEE80211_RATE_MCS, tp->mgmtrate &~ IEEE80211_RATE_MCS, + get_mcs_mbs_rate_str(tp->mgmtrate), tp->mcastrate &~ IEEE80211_RATE_MCS, + get_mcs_mbs_rate_str(tp->mcastrate), tp->maxretry); } else { if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE) From owner-svn-src-head@freebsd.org Sun Feb 3 05:26:06 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 354CB14B65E7; Sun, 3 Feb 2019 05:26:06 +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 52F4483F13; Sun, 3 Feb 2019 05:26:05 +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 A329B1A0F2; Sun, 3 Feb 2019 05:26:04 +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 x135Q4HQ017796; Sun, 3 Feb 2019 05:26:04 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x135Q4lA017795; Sun, 3 Feb 2019 05:26:04 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201902030526.x135Q4lA017795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 3 Feb 2019 05:26:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343703 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 343703 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 52F4483F13 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 05:26:06 -0000 Author: cy Date: Sun Feb 3 05:26:04 2019 New Revision: 343703 URL: https://svnweb.freebsd.org/changeset/base/343703 Log: Remove a reference to HP-UX in a comment. MFC after: 1 month Modified: head/sys/contrib/ipfilter/netinet/fil.c Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Sun Feb 3 05:26:01 2019 (r343702) +++ head/sys/contrib/ipfilter/netinet/fil.c Sun Feb 3 05:26:04 2019 (r343703) @@ -2784,7 +2784,7 @@ ipf_firewall(fin, passp) /* out(I) - 0 == packet going in, 1 == packet going out */ /* mp(IO) - pointer to caller's buffer pointer that holds this */ /* IP packet. */ -/* Solaris & HP-UX ONLY : */ +/* Solaris: */ /* qpi(I) - pointer to STREAMS queue information for this */ /* interface & direction. */ /* */ From owner-svn-src-head@freebsd.org Sun Feb 3 05:25:55 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCD5314B65BA; Sun, 3 Feb 2019 05:25:54 +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 8596A83E0B; Sun, 3 Feb 2019 05:25:54 +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 63CF61A0EF; Sun, 3 Feb 2019 05:25:54 +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 x135Psgr017698; Sun, 3 Feb 2019 05:25:54 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x135PoTw017676; Sun, 3 Feb 2019 05:25:50 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201902030525.x135PoTw017676@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 3 Feb 2019 05:25:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343701 - in head: contrib/ipfilter contrib/ipfilter/ipsend contrib/ipfilter/ipsend/.OLD contrib/ipfilter/lib contrib/ipfilter/tools sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head: contrib/ipfilter contrib/ipfilter/ipsend contrib/ipfilter/ipsend/.OLD contrib/ipfilter/lib contrib/ipfilter/tools sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 343701 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8596A83E0B 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.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 05:25:55 -0000 Author: cy Date: Sun Feb 3 05:25:49 2019 New Revision: 343701 URL: https://svnweb.freebsd.org/changeset/base/343701 Log: ipfilter #ifdef cleanup. Remove #ifdefs for ancient and irrelevant operating systems from ipfilter. When ipfilter was written the UNIX and UNIX-like systems in use were diverse and plentiful. IRIX, Tru64 (OSF/1) don't exist any more. OpenBSD removed ipfilter shortly after the first time the ipfilter license terms changed in the early 2000's. ipfilter on AIX, HP/UX, and Linux never really caught on. Removal of code for operating systems that ipfilter will never run on again will simplify the code making it easier to fix bugs, complete partially implemented features, and extend ipfilter. Unsupported previous version FreeBSD code and some older NetBSD code has also been removed. What remains is supported FreeBSD, NetBSD, and illumos. FreeBSD and NetBSD have collaborated exchanging patches, while illumos has expressed willingness to have their ipfilter updated to 5.1.2, provided their zone-specific updates to their ipfilter are merged (which are of interest to FreeBSD to allow control of ipfilters in jails from the global zone). Reviewed by: glebius@ MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D19006 Modified: head/contrib/ipfilter/arc4random.c head/contrib/ipfilter/ip_dstlist.c head/contrib/ipfilter/ip_fil.c head/contrib/ipfilter/ip_fil_compat.c head/contrib/ipfilter/ipf.h head/contrib/ipfilter/ipsend/.OLD/ip_compat.h head/contrib/ipfilter/ipsend/44arp.c head/contrib/ipfilter/ipsend/arp.c head/contrib/ipfilter/ipsend/dlcommon.c head/contrib/ipfilter/ipsend/ip.c head/contrib/ipfilter/ipsend/ipresend.c head/contrib/ipfilter/ipsend/ipsend.c head/contrib/ipfilter/ipsend/ipsend.h head/contrib/ipfilter/ipsend/ipsopt.c head/contrib/ipfilter/ipsend/iptest.c head/contrib/ipfilter/ipsend/iptests.c head/contrib/ipfilter/ipsend/resend.c head/contrib/ipfilter/ipsend/sdlpi.c head/contrib/ipfilter/ipsend/sock.c head/contrib/ipfilter/lib/getifname.c head/contrib/ipfilter/lib/getproto.c head/contrib/ipfilter/lib/inet_addr.c head/contrib/ipfilter/lib/kmem.c head/contrib/ipfilter/lib/printproto.c head/contrib/ipfilter/md5.c head/contrib/ipfilter/tools/ipf.c head/contrib/ipfilter/tools/ipfs.c head/contrib/ipfilter/tools/ipfstat.c head/contrib/ipfilter/tools/ipftest.c head/contrib/ipfilter/tools/ipmon.c head/contrib/ipfilter/tools/ipnat.c head/contrib/ipfilter/tools/ipnat_y.y head/contrib/ipfilter/tools/ippool.c head/contrib/ipfilter/tools/ippool_y.y head/sys/contrib/ipfilter/netinet/fil.c head/sys/contrib/ipfilter/netinet/ip_auth.c head/sys/contrib/ipfilter/netinet/ip_compat.h head/sys/contrib/ipfilter/netinet/ip_dstlist.c head/sys/contrib/ipfilter/netinet/ip_fil.h head/sys/contrib/ipfilter/netinet/ip_frag.c head/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c head/sys/contrib/ipfilter/netinet/ip_htable.c head/sys/contrib/ipfilter/netinet/ip_irc_pxy.c head/sys/contrib/ipfilter/netinet/ip_log.c head/sys/contrib/ipfilter/netinet/ip_lookup.c head/sys/contrib/ipfilter/netinet/ip_nat.c head/sys/contrib/ipfilter/netinet/ip_nat.h head/sys/contrib/ipfilter/netinet/ip_nat6.c head/sys/contrib/ipfilter/netinet/ip_pool.c head/sys/contrib/ipfilter/netinet/ip_proxy.c head/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c head/sys/contrib/ipfilter/netinet/ip_scan.c head/sys/contrib/ipfilter/netinet/ip_state.c head/sys/contrib/ipfilter/netinet/ip_sync.c Modified: head/contrib/ipfilter/arc4random.c ============================================================================== --- head/contrib/ipfilter/arc4random.c Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/arc4random.c Sun Feb 3 05:25:49 2019 (r343701) @@ -7,7 +7,7 @@ * * Dan Moschuk */ -#if !defined(SOLARIS2) && !defined(__osf__) +#if !defined(SOLARIS2) # include #endif @@ -16,26 +16,16 @@ #ifdef __FreeBSD__ # include #endif -#if !defined(__osf__) # include -#endif #ifdef __FreeBSD__ # include #endif #include -#ifndef __osf__ # include -#endif #include -#if defined(SOLARIS2) && (SOLARIS2 < 9) -# include -#endif #include #include -#ifdef __osf__ -# include -#endif #include #include #include "netinet/ip_compat.h" Modified: head/contrib/ipfilter/ip_dstlist.c ============================================================================== --- head/contrib/ipfilter/ip_dstlist.c Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/ip_dstlist.c Sun Feb 3 05:25:49 2019 (r343701) @@ -9,9 +9,6 @@ # define KERNEL 1 # define _KERNEL 1 #endif -#if defined(__osf__) -# define _PROTO_NET_H_ -#endif #include #include #include @@ -21,9 +18,6 @@ # include # include # define _KERNEL -# ifdef __OpenBSD__ -struct file; -# endif # include # undef _KERNEL #else @@ -33,14 +27,12 @@ struct file; # endif #endif #include -#if !defined(linux) # include -#endif #include -#if defined(_KERNEL) && (!defined(__SVR4) && !defined(__svr4__)) +#if defined(_KERNEL) && !defined(__SVR4) # include #endif -#if defined(__SVR4) || defined(__svr4__) +#if defined(__SVR4) # include # include # ifdef _KERNEL @@ -49,7 +41,7 @@ struct file; # include # include #endif -#if defined(__FreeBSD_version) && (__FreeBSD_version >= 300000) +#if defined(__FreeBSD_version) # include #endif Modified: head/contrib/ipfilter/ip_fil.c ============================================================================== --- head/contrib/ipfilter/ip_fil.c Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/ip_fil.c Sun Feb 3 05:25:49 2019 (r343701) @@ -25,24 +25,10 @@ struct rtentry; static void ipf_setifpaddr __P((struct ifnet *, char *)); void init_ifp __P((void)); -#if defined(__sgi) && (IRIX < 60500) static int no_output __P((struct ifnet *, struct mbuf *, - struct sockaddr *)); -static int write_output __P((struct ifnet *, struct mbuf *, - struct sockaddr *)); -#else -# if TRU64 >= 1885 -static int no_output __P((struct ifnet *, struct mbuf *, - struct sockaddr *, struct rtentry *, char *)); -static int write_output __P((struct ifnet *, struct mbuf *, - struct sockaddr *, struct rtentry *, char *)); -# else -static int no_output __P((struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *)); static int write_output __P((struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *)); -# endif -#endif struct ifaddr { struct sockaddr_storage ifa_addr; @@ -123,17 +109,8 @@ ipf_forgetifp(softc, ifp) static int -#if defined(__sgi) && (IRIX < 60500) -no_output(ifp, m, s) -#else -# if TRU64 >= 1885 -no_output (ifp, m, s, rt, cp) - char *cp; -# else no_output(ifp, m, s, rt) -# endif struct rtentry *rt; -#endif struct ifnet *ifp; struct mbuf *m; struct sockaddr *s; @@ -143,17 +120,8 @@ no_output(ifp, m, s, rt) static int -#if defined(__sgi) && (IRIX < 60500) -write_output(ifp, m, s) -#else -# if TRU64 >= 1885 -write_output (ifp, m, s, rt, cp) - char *cp; -# else write_output(ifp, m, s, rt) -# endif struct rtentry *rt; -#endif struct ifnet *ifp; struct mbuf *m; struct sockaddr *s; @@ -167,8 +135,7 @@ write_output(ifp, m, s, rt) ip = MTOD(mb, ip_t *); #if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199606)) || \ - (defined(OpenBSD) && (OpenBSD >= 199603)) || defined(linux) || \ - (defined(__FreeBSD__) && (__FreeBSD_version >= 501113)) + defined(__FreeBSD__) sprintf(fname, "/tmp/%s", ifp->if_xname); #else sprintf(fname, "/tmp/%s%d", ifp->if_name, ifp->if_unit); @@ -189,42 +156,26 @@ ipf_setifpaddr(ifp, addr) struct ifnet *ifp; char *addr; { -#ifdef __sgi - struct in_ifaddr *ifa; -#else struct ifaddr *ifa; -#endif -#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) +#if defined(__NetBSD__) || defined(__FreeBSD__) if (ifp->if_addrlist.tqh_first != NULL) #else -# ifdef __sgi - if (ifp->in_ifaddr != NULL) -# else if (ifp->if_addrlist != NULL) -# endif #endif return; ifa = (struct ifaddr *)malloc(sizeof(*ifa)); -#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) +#if defined(__NetBSD__) || defined(__FreeBSD__) ifp->if_addrlist.tqh_first = ifa; #else -# ifdef __sgi - ifp->in_ifaddr = ifa; -# else ifp->if_addrlist = ifa; -# endif #endif if (ifa != NULL) { struct sockaddr_in *sin; -#ifdef __sgi - sin = (struct sockaddr_in *)&ifa->ia_addr; -#else sin = (struct sockaddr_in *)&ifa->ifa_addr; -#endif #ifdef USE_INET6 if (index(addr, ':') != NULL) { struct sockaddr_in6 *sin6; @@ -263,8 +214,7 @@ get_unit(name, family) struct ifnet *ifp, **ifpp, **old_ifneta; char *addr; #if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199606)) || \ - (defined(OpenBSD) && (OpenBSD >= 199603)) || defined(linux) || \ - (defined(__FreeBSD__) && (__FreeBSD_version >= 501113)) + defined(__FreeBSD__) if (!*name) return NULL; @@ -333,12 +283,11 @@ get_unit(name, family) } ifp = ifneta[nifs - 1]; -#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) +#if defined(__NetBSD__) || defined(__FreeBSD__) TAILQ_INIT(&ifp->if_addrlist); #endif #if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199606)) || \ - (defined(OpenBSD) && (OpenBSD >= 199603)) || defined(linux) || \ - (defined(__FreeBSD__) && (__FreeBSD_version >= 501113)) + defined(__FreeBSD__) (void) strncpy(ifp->if_xname, name, sizeof(ifp->if_xname)); #else s = name + strlen(name) - 1; @@ -375,8 +324,7 @@ get_ifname(ifp) { static char ifname[LIFNAMSIZ]; -#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(linux) || \ - (defined(__FreeBSD__) && (__FreeBSD_version >= 501113)) +#if defined(__NetBSD__) || defined(__FreeBSD__) sprintf(ifname, "%s", ifp->if_xname); #else if (ifp->if_unit != -1) @@ -397,8 +345,7 @@ init_ifp() int fd; #if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199606)) || \ - (defined(OpenBSD) && (OpenBSD >= 199603)) || defined(linux) || \ - (defined(__FreeBSD__) && (__FreeBSD_version >= 501113)) + defined(__FreeBSD__) for (ifpp = ifneta; ifpp && (ifp = *ifpp); ifpp++) { ifp->if_output = (void *)write_output; sprintf(fname, "/tmp/%s", ifp->if_xname); @@ -717,20 +664,12 @@ ipf_ifpaddr(softc, v, atype, ifptr, inp, inpmask) i6addr_t *inp, *inpmask; { struct ifnet *ifp = ifptr; -#ifdef __sgi - struct in_ifaddr *ifa; -#else struct ifaddr *ifa; -#endif -#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) +#if defined(__NetBSD__) || defined(__FreeBSD__) ifa = ifp->if_addrlist.tqh_first; #else -# ifdef __sgi - ifa = (struct in_ifaddr *)ifp->in_ifaddr; -# else ifa = ifp->if_addrlist; -# endif #endif if (ifa != NULL) { if (v == 4) { @@ -738,11 +677,7 @@ ipf_ifpaddr(softc, v, atype, ifptr, inp, inpmask) mask.sin_addr.s_addr = 0xffffffff; -#ifdef __sgi - sin = (struct sockaddr_in *)&ifa->ia_addr; -#else sin = (struct sockaddr_in *)&ifa->ifa_addr; -#endif return ipf_ifpfillv4addr(atype, sin, &mask, &inp->in4, &inpmask->in4); Modified: head/contrib/ipfilter/ip_fil_compat.c ============================================================================== --- head/contrib/ipfilter/ip_fil_compat.c Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/ip_fil_compat.c Sun Feb 3 05:25:49 2019 (r343701) @@ -9,15 +9,12 @@ # define KERNEL 1 # define _KERNEL 1 #endif -#if defined(__osf__) -# define _PROTO_NET_H_ -#endif #include #include #include #include #include -#if __FreeBSD_version >= 220000 && defined(_KERNEL) +#if defined(__FreeBSD_version) && defined(_KERNEL) # include # include #else @@ -26,17 +23,10 @@ #if !defined(_KERNEL) # include # define _KERNEL -# ifdef __OpenBSD__ -struct file; -# endif # include # undef _KERNEL #endif #include -#if (defined(__osf__) || defined(AIX) || defined(__hpux) || defined(__sgi)) && defined(_KERNEL) -# include "radix_ipf_local.h" -# define _RADIX_H_ -#endif #include #if defined(__FreeBSD__) # include @@ -44,7 +34,7 @@ struct file; #endif #if defined(_KERNEL) # include -# if !defined(__SVR4) && !defined(__svr4__) +# if !defined(__SVR4) # include # endif #endif @@ -348,9 +338,6 @@ typedef struct fr_info_4_1_32 { void *fin_qpi; char fin_ifname[LIFNAMSIZ]; #endif -#ifdef __sgi - void *fin_hbuf; -#endif } fr_info_4_1_32_t; typedef struct fr_info_4_1_24 { @@ -389,9 +376,6 @@ typedef struct fr_info_4_1_24 { void *fin_qpi; char fin_ifname[LIFNAMSIZ]; #endif -#ifdef __sgi - void *fin_hbuf; -#endif } fr_info_4_1_24_t; typedef struct fr_info_4_1_23 { @@ -429,9 +413,6 @@ typedef struct fr_info_4_1_23 { void *fin_qpi; char fin_ifname[LIFNAMSIZ]; #endif -#ifdef __sgi - void *fin_hbuf; -#endif } fr_info_4_1_23_t; typedef struct fr_info_4_1_11 { @@ -468,9 +449,6 @@ typedef struct fr_info_4_1_11 { void *fin_qpi; char fin_ifname[LIFNAMSIZ]; #endif -#ifdef __sgi - void *fin_hbuf; -#endif } fr_info_4_1_11_t; /* ------------------------------------------------------------------------ */ @@ -2678,9 +2656,6 @@ fr_info_4_1_32_to_current(old, current) fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif -#ifdef __sgi - fin->fin_hbuf = old->fin_hbuf; -#endif } @@ -2719,9 +2694,6 @@ fr_info_4_1_24_to_current(old, current) fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif -#ifdef __sgi - fin->fin_hbuf = old->fin_hbuf; -#endif } @@ -2759,9 +2731,6 @@ fr_info_4_1_23_to_current(old, current) fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif -#ifdef __sgi - fin->fin_hbuf = fin->fin_hbuf; -#endif } @@ -2799,9 +2768,6 @@ fr_info_4_1_11_to_current(old, current) fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif -#ifdef __sgi - fin->fin_hbuf = fin->fin_hbuf; -#endif } @@ -4078,9 +4044,6 @@ fr_info_current_to_4_1_24(current, old) old->fin_qpi = fin->fin_qpi; old->fin_ifname[0] = '\0'; #endif -#ifdef __sgi - old->fin_hbuf = fin->fin_hbuf; -#endif } @@ -4121,9 +4084,6 @@ fr_info_current_to_4_1_23(current, old) old->fin_qpi = fin->fin_qpi; old->fin_ifname[0] = '\0'; #endif -#ifdef __sgi - old->fin_hbuf = fin->fin_hbuf; -#endif } @@ -4163,9 +4123,6 @@ fr_info_current_to_4_1_11(current, old) old->fin_qfm = fin->fin_qfm; old->fin_qpi = fin->fin_qpi; old->fin_ifname[0] = '\0'; -#endif -#ifdef __sgi - old->fin_hbuf = fin->fin_hbuf; #endif } Modified: head/contrib/ipfilter/ipf.h ============================================================================== --- head/contrib/ipfilter/ipf.h Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/ipf.h Sun Feb 3 05:25:49 2019 (r343701) @@ -12,11 +12,6 @@ #ifndef __IPF_H__ #define __IPF_H__ -#if defined(__osf__) -# define radix_mask ipf_radix_mask -# define radix_node ipf_radix_node -# define radix_node_head ipf_radix_node_head -#endif #include #include @@ -31,9 +26,6 @@ # define _KERNEL # define KERNEL #endif -#ifdef __OpenBSD__ -struct file; -#endif #include #ifdef ADD_KERNEL # undef _KERNEL @@ -188,9 +180,8 @@ typedef struct proxyrule { } proxyrule_t; -#if defined(__NetBSD__) || defined(__OpenBSD__) || \ - (_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300000) || \ - SOLARIS || defined(__sgi) || defined(__osf__) || defined(linux) +#if defined(__NetBSD__) || defined(__FreeBSD_version) || \ + SOLARIS # include typedef int (* ioctlfunc_t) __P((int, ioctlcmd_t, ...)); #else @@ -199,13 +190,6 @@ typedef int (* ioctlfunc_t) __P((dev_t, ioctlcmd_t, vo typedef int (* addfunc_t) __P((int, ioctlfunc_t, void *)); typedef int (* copyfunc_t) __P((void *, void *, size_t)); - -/* - * SunOS4 - */ -#if defined(sun) && !defined(__SVR4) && !defined(__svr4__) -extern int ioctl __P((int, int, void *)); -#endif extern char thishost[]; extern char flagset[]; Modified: head/contrib/ipfilter/ipsend/.OLD/ip_compat.h ============================================================================== --- head/contrib/ipfilter/ipsend/.OLD/ip_compat.h Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/ipsend/.OLD/ip_compat.h Sun Feb 3 05:25:49 2019 (r343701) @@ -112,130 +112,12 @@ # define IPOPT_SECUR_TOPSECRET ((u_short)0x6bc5) #endif -#ifdef linux -# if LINUX < 0200 -# define icmp icmphdr -# define icmp_type type -# define icmp_code code -# endif -/* - * From /usr/include/netinet/ip_var.h - * !%@#!$@# linux... - */ -struct ipovly { - caddr_t ih_next, ih_prev; /* for protocol sequence q's */ - u_char ih_x1; /* (unused) */ - u_char ih_pr; /* protocol */ - short ih_len; /* protocol length */ - struct in_addr ih_src; /* source internet address */ - struct in_addr ih_dst; /* destination internet address */ -}; - -typedef struct { - __u16 th_sport; - __u16 th_dport; - __u32 th_seq; - __u32 th_ack; -# if defined(__i386__) || defined(__MIPSEL__) || defined(__alpha__) ||\ - defined(vax) - __u8 th_res:4; - __u8 th_off:4; -#else - __u8 th_off:4; - __u8 th_res:4; -#endif - __u8 th_flags; - __u16 th_win; - __u16 th_sum; - __u16 th_urp; -} tcphdr_t; - -typedef struct { - __u16 uh_sport; - __u16 uh_dport; - __s16 uh_ulen; - __u16 uh_sum; -} udphdr_t; - -typedef struct { -# if defined(__i386__) || defined(__MIPSEL__) || defined(__alpha__) ||\ - defined(vax) - __u8 ip_hl:4; - __u8 ip_v:4; -# else - __u8 ip_hl:4; - __u8 ip_v:4; -# endif - __u8 ip_tos; - __u16 ip_len; - __u16 ip_id; - __u16 ip_off; - __u8 ip_ttl; - __u8 ip_p; - __u16 ip_sum; - struct in_addr ip_src; - struct in_addr ip_dst; -} ip_t; - -typedef struct { - __u8 ether_dhost[6]; - __u8 ether_shost[6]; - __u16 ether_type; -} ether_header_t; - -typedef struct icmp { - u_char icmp_type; /* type of message, see below */ - u_char icmp_code; /* type sub code */ - u_short icmp_cksum; /* ones complement cksum of struct */ - union { - u_char ih_pptr; /* ICMP_PARAMPROB */ - struct in_addr ih_gwaddr; /* ICMP_REDIRECT */ - struct ih_idseq { - n_short icd_id; - n_short icd_seq; - } ih_idseq; - int ih_void; - } icmp_hun; -#define icmp_pptr icmp_hun.ih_pptr -#define icmp_gwaddr icmp_hun.ih_gwaddr -#define icmp_id icmp_hun.ih_idseq.icd_id -#define icmp_seq icmp_hun.ih_idseq.icd_seq -#define icmp_void icmp_hun.ih_void - union { - struct id_ts { - n_time its_otime; - n_time its_rtime; - n_time its_ttime; - } id_ts; - struct id_ip { - ip_t idi_ip; - /* options and then 64 bits of data */ - } id_ip; - u_long id_mask; - char id_data[1]; - } icmp_dun; -#define icmp_otime icmp_dun.id_ts.its_otime -#define icmp_rtime icmp_dun.id_ts.its_rtime -#define icmp_ttime icmp_dun.id_ts.its_ttime -#define icmp_ip icmp_dun.id_ip.idi_ip -#define icmp_mask icmp_dun.id_mask -#define icmp_data icmp_dun.id_data -} icmphdr_t; - -# define bcopy(a,b,c) memmove(b,a,c) -# define bcmp(a,b,c) memcmp(a,b,c) - -# define ifnet device - -#else - typedef struct udphdr udphdr_t; typedef struct tcphdr tcphdr_t; typedef struct ip ip_t; typedef struct ether_header ether_header_t; -#endif #if defined(__SVR4) || defined(__svr4__) # define bcopy(a,b,c) memmove(b,a,c) Modified: head/contrib/ipfilter/ipsend/44arp.c ============================================================================== --- head/contrib/ipfilter/ipsend/44arp.c Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/ipsend/44arp.c Sun Feb 3 05:25:49 2019 (r343701) @@ -10,9 +10,7 @@ #include #include #include -#ifndef __osf__ # include -#endif #include #include #include Modified: head/contrib/ipfilter/ipsend/arp.c ============================================================================== --- head/contrib/ipfilter/ipsend/arp.c Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/ipsend/arp.c Sun Feb 3 05:25:49 2019 (r343701) @@ -88,7 +88,6 @@ int arp(ip, ether) sin = (struct sockaddr_in *)&ar.arp_pa; sin->sin_family = AF_INET; bcopy(ip, (char *)&sin->sin_addr.s_addr, 4); -#ifndef hpux if ((hp = gethostbyaddr(ip, 4, AF_INET))) # if SOLARIS && (SOLARIS2 >= 10) if (!(ether_hostton(hp->h_name, (struct ether_addr *)ether))) @@ -96,7 +95,6 @@ int arp(ip, ether) if (!(ether_hostton(hp->h_name, ether))) # endif goto savearp; -#endif if (sfd == -1) if ((sfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) Modified: head/contrib/ipfilter/ipsend/dlcommon.c ============================================================================== --- head/contrib/ipfilter/ipsend/dlcommon.c Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/ipsend/dlcommon.c Sun Feb 3 05:25:49 2019 (r343701) @@ -20,11 +20,7 @@ typedef unsigned long ulong; #include #include #include -#ifdef __osf__ -# include -#else # include -#endif #include #include #include Modified: head/contrib/ipfilter/ipsend/ip.c ============================================================================== --- head/contrib/ipfilter/ipsend/ip.c Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/ipsend/ip.c Sun Feb 3 05:25:49 2019 (r343701) @@ -17,11 +17,9 @@ static const char rcsid[] = "@(#)$Id$"; #include #include #include -#ifndef linux # include # include # include -#endif #include #include #include Modified: head/contrib/ipfilter/ipsend/ipresend.c ============================================================================== --- head/contrib/ipfilter/ipsend/ipresend.c Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/ipsend/ipresend.c Sun Feb 3 05:25:49 2019 (r343701) @@ -18,9 +18,7 @@ static const char rcsid[] = "@(#)$Id$"; #include #include #include -#ifndef linux #include -#endif #include #include #include @@ -37,9 +35,6 @@ extern struct ipread pcap, iphex, iptext; int opts = 0; #ifndef DEFAULT_DEVICE -# ifdef linux -char default_device[] = "eth0"; -# else # ifdef sun char default_device[] = "le0"; # else @@ -49,15 +44,10 @@ char default_device[] = "ln0"; # ifdef __bsdi__ char default_device[] = "ef0"; # else -# ifdef __sgi -char default_device[] = "ec0"; -# else char default_device[] = "lan0"; -# endif # endif # endif # endif -# endif #else char default_device[] = DEFAULT_DEVICE; #endif Modified: head/contrib/ipfilter/ipsend/ipsend.c ============================================================================== --- head/contrib/ipfilter/ipsend/ipsend.c Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/ipsend/ipsend.c Sun Feb 3 05:25:49 2019 (r343701) @@ -21,14 +21,10 @@ static const char rcsid[] = "@(#)$Id$"; #include #include #include -#ifndef linux # include -#endif #include "ipsend.h" #include "ipf.h" -#ifndef linux # include -#endif extern char *optarg; @@ -37,27 +33,15 @@ extern void iplang __P((FILE *)); char options[68]; int opts; -#ifdef linux -char default_device[] = "eth0"; -#else # ifdef ultrix char default_device[] = "ln0"; # else # ifdef __bsdi__ char default_device[] = "ef0"; # else -# ifdef __sgi -char default_device[] = "ec0"; -# else -# ifdef __hpux -char default_device[] = "lan0"; -# else char default_device[] = "le0"; -# endif /* __hpux */ -# endif /* __sgi */ # endif /* __bsdi__ */ # endif /* ultrix */ -#endif /* linux */ static void usage __P((char *)); Modified: head/contrib/ipfilter/ipsend/ipsend.h ============================================================================== --- head/contrib/ipfilter/ipsend/ipsend.h Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/ipsend/ipsend.h Sun Feb 3 05:25:49 2019 (r343701) @@ -26,9 +26,6 @@ #include #include "ipf.h" -#ifdef linux -#include -#endif /* XXX: The following is needed by tcpip.h */ #include #include "netinet/tcpip.h" @@ -49,11 +46,7 @@ extern u_32_t buildopts __P((char *, char *, int)); extern int addipopt __P((char *, struct ipopt_names *, int, char *)); extern int initdevice __P((char *, int)); extern int sendip __P((int, char *, int)); -#ifdef linux -extern struct sock *find_tcp __P((int, struct tcpiphdr *)); -#else extern struct tcpcb *find_tcp __P((int, struct tcpiphdr *)); -#endif extern int ip_resend __P((char *, int, struct ipread *, struct in_addr, char *)); extern void ip_test1 __P((char *, int, ip_t *, struct in_addr, int)); Modified: head/contrib/ipfilter/ipsend/ipsopt.c ============================================================================== --- head/contrib/ipfilter/ipsend/ipsopt.c Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/ipsend/ipsopt.c Sun Feb 3 05:25:49 2019 (r343701) @@ -20,9 +20,7 @@ static const char rcsid[] = "@(#)$Id$"; #include #include #include -#ifndef linux #include -#endif #include #include #include "ipsend.h" Modified: head/contrib/ipfilter/ipsend/iptest.c ============================================================================== --- head/contrib/ipfilter/ipsend/iptest.c Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/ipsend/iptest.c Sun Feb 3 05:25:49 2019 (r343701) @@ -18,12 +18,7 @@ static const char rcsid[] = "@(#)$Id$"; #include #include #include -#ifndef linux #include -#endif -#ifdef linux -#include -#endif #include #include #include @@ -36,9 +31,6 @@ extern char *optarg; extern int optind; char options[68]; -#ifdef linux -char default_device[] = "eth0"; -#else # ifdef sun char default_device[] = "le0"; # else @@ -48,15 +40,10 @@ char default_device[] = "ln0"; # ifdef __bsdi__ char default_device[] = "ef0"; # else -# ifdef __sgi -char default_device[] = "ec0"; -# else char default_device[] = "lan0"; -# endif # endif # endif # endif -#endif static void usage __P((char *)); int main __P((int, char **)); Modified: head/contrib/ipfilter/ipsend/iptests.c ============================================================================== --- head/contrib/ipfilter/ipsend/iptests.c Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/ipsend/iptests.c Sun Feb 3 05:25:49 2019 (r343701) @@ -21,7 +21,6 @@ static const char rcsid[] = "@(#)$Id$"; typedef int boolean_t; #endif #include -#if !defined(__osf__) # ifdef __NetBSD__ # include # include @@ -37,7 +36,6 @@ typedef int boolean_t; # endif # undef _KERNEL # undef KERNEL -#endif #if !defined(solaris) && !defined(linux) && !defined(__sgi) # include # include @@ -66,24 +64,13 @@ typedef int boolean_t; #endif #include #include -#ifdef __hpux -# define _NET_ROUTE_INCLUDED -#endif #include -#if defined(linux) && (LINUX >= 0200) -# include -#endif -#if !defined(linux) # if defined(__FreeBSD__) # include "radix_ipf.h" # endif # if !defined(solaris) # include # endif -#else -# define __KERNEL__ /* because there's a macro not wrapped by this */ -# include /* in this file :-/ */ -#endif #include #include #include @@ -94,20 +81,13 @@ typedef int boolean_t; #include #include #include -#ifdef __hpux -# undef _NET_ROUTE_INCLUDED -#endif -#if !defined(linux) # include # if !defined(__hpux) && !defined(solaris) # include # endif -#endif #include "ipsend.h" -#if !defined(linux) && !defined(__hpux) # include # include -#endif #if defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106000000) # define USE_NANOSLEEP #endif @@ -951,9 +931,7 @@ void ip_test5(dev, mtu, ip, gwip, ptest) int nfd, i; t = (tcphdr_t *)((char *)ip + (IP_HL(ip) << 2)); -#if !defined(linux) && !defined(__osf__) t->th_x2 = 0; -#endif TCP_OFF_A(t, 0); t->th_sport = htons(1); t->th_dport = htons(1); Modified: head/contrib/ipfilter/ipsend/resend.c ============================================================================== --- head/contrib/ipfilter/ipsend/resend.c Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/ipsend/resend.c Sun Feb 3 05:25:49 2019 (r343701) @@ -19,10 +19,8 @@ static const char rcsid[] = "@(#)$Id$"; #include #include #include -#ifndef linux # include # include -#endif #include #include #include Modified: head/contrib/ipfilter/ipsend/sdlpi.c ============================================================================== --- head/contrib/ipfilter/ipsend/sdlpi.c Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/ipsend/sdlpi.c Sun Feb 3 05:25:49 2019 (r343701) @@ -25,14 +25,7 @@ # include # include #endif -#ifdef __osf__ -# include -#else # include -#endif -#ifdef __hpux -# include -#endif #include #include Modified: head/contrib/ipfilter/ipsend/sock.c ============================================================================== --- head/contrib/ipfilter/ipsend/sock.c Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/ipsend/sock.c Sun Feb 3 05:25:49 2019 (r343701) @@ -29,7 +29,6 @@ typedef int boolean_t; #else # include #endif -#if !defined(__osf__) # ifdef __NetBSD__ # include # endif @@ -50,7 +49,6 @@ typedef int boolean_t; # undef _KERNEL # undef KERNEL # endif -#endif #include #include #include @@ -74,9 +72,7 @@ typedef int boolean_t; #include #include #include -#ifndef __osf__ # include -#endif #include #define _WANT_INPCB #include Modified: head/contrib/ipfilter/lib/getifname.c ============================================================================== --- head/contrib/ipfilter/lib/getifname.c Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/lib/getifname.c Sun Feb 3 05:25:49 2019 (r343701) @@ -25,9 +25,6 @@ char *getifname(ptr) # include # include # endif -# ifdef __hpux -# include "compat.h" -# endif # include "../pfil/qif.h" char *ifname; qif_t qif; Modified: head/contrib/ipfilter/lib/getproto.c ============================================================================== --- head/contrib/ipfilter/lib/getproto.c Sun Feb 3 04:41:00 2019 (r343700) +++ head/contrib/ipfilter/lib/getproto.c Sun Feb 3 05:25:49 2019 (r343701) @@ -23,14 +23,6 @@ int getproto(name) if (*s == '\0') return atoi(name); -#ifdef _AIX51 - /* - * For some bogus reason, "ip" is 252 in /etc/protocols on AIX 5 - * The IANA has doubled up on the definition of 0 - it is now also - * used for IPv6 hop-opts, so we can no longer rely on /etc/protocols - * providing the correct name->number mapping - */ -#endif if (!strcasecmp(name, "ip")) return 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sun Feb 3 05:26:18 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DCE914B662A; Sun, 3 Feb 2019 05:26:18 +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 847AF8401A; Sun, 3 Feb 2019 05:26:14 +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 ABF1E1A0F4; Sun, 3 Feb 2019 05:26:10 +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 x135QAh8017888; Sun, 3 Feb 2019 05:26:10 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x135QApN017887; Sun, 3 Feb 2019 05:26:10 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201902030526.x135QApN017887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 3 Feb 2019 05:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343705 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 343705 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 847AF8401A 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 05:26:18 -0000 Author: cy Date: Sun Feb 3 05:26:10 2019 New Revision: 343705 URL: https://svnweb.freebsd.org/changeset/base/343705 Log: new_kmem_alloc(9) is a Solaris/illumos malloc(9). FreeBSD and NetBSD never get here, however a test for SOLARIS, as redundant as this test is, serves to document that this is the illumos definition. This should help those who come after me to follow the code more easily. MFC after: 1 month Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_compat.h Sun Feb 3 05:26:07 2019 (r343704) +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Sun Feb 3 05:26:10 2019 (r343705) @@ -590,7 +590,7 @@ MALLOC_DECLARE(M_IPFILTER); # define COPYOUT(a,b,c) (bcopy((caddr_t)(a), (caddr_t)(b), (c)), 0) # endif -# ifndef KMALLOC +# if SOLARIS && !defined(KMALLOC) # define KMALLOC(a,b) (a) = (b)new_kmem_alloc(sizeof(*(a)), \ KMEM_NOSLEEP) # define KMALLOCS(a,b,c) (a) = (b)new_kmem_alloc((c), KMEM_NOSLEEP) From owner-svn-src-head@freebsd.org Sun Feb 3 04:31:51 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EE9014B4A31; Sun, 3 Feb 2019 04:31:51 +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 E5B9E8268C; Sun, 3 Feb 2019 04:31:50 +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 DB4C01981D; Sun, 3 Feb 2019 04:31:50 +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 x134VoQq091655; Sun, 3 Feb 2019 04:31:50 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x134VoY4091654; Sun, 3 Feb 2019 04:31:50 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902030431.x134VoY4091654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 3 Feb 2019 04:31:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343699 - head/sys/net80211 X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/net80211 X-SVN-Commit-Revision: 343699 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E5B9E8268C 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 04:31:51 -0000 Author: avos Date: Sun Feb 3 04:31:50 2019 New Revision: 343699 URL: https://svnweb.freebsd.org/changeset/base/343699 Log: net80211(4): do not setup Tx parameters for unsupported modes. That should shorten 'ifconfig list txparam' output since unsupported modes will not be shown. Checked with RTL8188EE, STA mode. MFC after: 2 weeks Modified: head/sys/net80211/ieee80211_proto.c head/sys/net80211/ieee80211_tdma.c Modified: head/sys/net80211/ieee80211_proto.c ============================================================================== --- head/sys/net80211/ieee80211_proto.c Sun Feb 3 03:02:59 2019 (r343698) +++ head/sys/net80211/ieee80211_proto.c Sun Feb 3 04:31:50 2019 (r343699) @@ -347,6 +347,9 @@ ieee80211_proto_vattach(struct ieee80211vap *vap) * driver and/or user applications. */ for (i = IEEE80211_MODE_11A; i < IEEE80211_MODE_MAX; i++) { + if (isclr(ic->ic_modecaps, i)) + continue; + const struct ieee80211_rateset *rs = &ic->ic_sup_rates[i]; vap->iv_txparms[i].ucastrate = IEEE80211_FIXED_RATE_NONE; Modified: head/sys/net80211/ieee80211_tdma.c ============================================================================== --- head/sys/net80211/ieee80211_tdma.c Sun Feb 3 03:02:59 2019 (r343698) +++ head/sys/net80211/ieee80211_tdma.c Sun Feb 3 04:31:50 2019 (r343699) @@ -127,6 +127,9 @@ static int tdma_process_params(struct ieee80211_node * static void settxparms(struct ieee80211vap *vap, enum ieee80211_phymode mode, int rate) { + if (isclr(vap->iv_ic->ic_modecaps, mode)) + return; + vap->iv_txparms[mode].ucastrate = rate; vap->iv_txparms[mode].mcastrate = rate; } From owner-svn-src-head@freebsd.org Sun Feb 3 04:41:01 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E73F14B4E2A; Sun, 3 Feb 2019 04:41:01 +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 1469382902; Sun, 3 Feb 2019 04:41:01 +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 087BE19885; Sun, 3 Feb 2019 04:41:01 +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 x134f0nU092820; Sun, 3 Feb 2019 04:41:00 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x134f0W9092819; Sun, 3 Feb 2019 04:41:00 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902030441.x134f0W9092819@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 3 Feb 2019 04:41:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343700 - head/sbin/ifconfig X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sbin/ifconfig X-SVN-Commit-Revision: 343700 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1469382902 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.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 04:41:01 -0000 Author: avos Date: Sun Feb 3 04:41:00 2019 New Revision: 343700 URL: https://svnweb.freebsd.org/changeset/base/343700 Log: ifconfig(8): actually, non-11n rates should be divided by 2... MFC after: 1 week MFC with: 343698 Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Sun Feb 3 04:31:50 2019 (r343699) +++ head/sbin/ifconfig/ifieee80211.c Sun Feb 3 04:41:00 2019 (r343700) @@ -4331,6 +4331,14 @@ get_mcs_mbs_rate_str(uint8_t rate) return (rate & IEEE80211_RATE_MCS) ? "MCS " : "Mb/s"; } +static uint8_t +get_rate_value(uint8_t rate) +{ + if (rate & IEEE80211_RATE_MCS) + return (rate &~ IEEE80211_RATE_MCS); + return (rate / 2); +} + static void list_txparams(int s) { @@ -4350,9 +4358,9 @@ list_txparams(int s) LINE_CHECK("%-7.7s ucast NONE mgmt %2u %s " "mcast %2u %s maxretry %u", modename[mode], - tp->mgmtrate &~ IEEE80211_RATE_MCS, + get_rate_value(tp->mgmtrate), get_mcs_mbs_rate_str(tp->mgmtrate), - tp->mcastrate &~ IEEE80211_RATE_MCS, + get_rate_value(tp->mcastrate), get_mcs_mbs_rate_str(tp->mcastrate), tp->maxretry); else @@ -4360,9 +4368,9 @@ list_txparams(int s) "mcast %2u %s maxretry %u", modename[mode], tp->ucastrate &~ IEEE80211_RATE_MCS, - tp->mgmtrate &~ IEEE80211_RATE_MCS, + get_rate_value(tp->mgmtrate), get_mcs_mbs_rate_str(tp->mgmtrate), - tp->mcastrate &~ IEEE80211_RATE_MCS, + get_rate_value(tp->mcastrate), get_mcs_mbs_rate_str(tp->mcastrate), tp->maxretry); } else { From owner-svn-src-head@freebsd.org Sun Feb 3 05:26:06 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18B1814B65E5; Sun, 3 Feb 2019 05:26:06 +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 5276A83F12; Sun, 3 Feb 2019 05:26:05 +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 A806B1A0F1; Sun, 3 Feb 2019 05:26:01 +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 x135Q11v017748; Sun, 3 Feb 2019 05:26:01 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x135Q1V4017747; Sun, 3 Feb 2019 05:26:01 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201902030526.x135Q1V4017747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 3 Feb 2019 05:26:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343702 - head/contrib/ipfilter/ipsend/.OLD X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/ipfilter/ipsend/.OLD X-SVN-Commit-Revision: 343702 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5276A83F12 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 05:26:06 -0000 Author: cy Date: Sun Feb 3 05:26:01 2019 New Revision: 343702 URL: https://svnweb.freebsd.org/changeset/base/343702 Log: Remove a redundant ip_compat.h, originally merged from upstream. MFC after: 1 month Deleted: head/contrib/ipfilter/ipsend/.OLD/ip_compat.h From owner-svn-src-head@freebsd.org Sun Feb 3 05:26:15 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2EEE14B65F7; Sun, 3 Feb 2019 05:26:14 +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 CD40E83F5F; Sun, 3 Feb 2019 05:26:08 +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 811DC1A0F3; Sun, 3 Feb 2019 05:26:07 +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 x135Q7sP017840; Sun, 3 Feb 2019 05:26:07 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x135Q78O017839; Sun, 3 Feb 2019 05:26:07 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201902030526.x135Q78O017839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 3 Feb 2019 05:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343704 - head/contrib/ipfilter X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/ipfilter X-SVN-Commit-Revision: 343704 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CD40E83F5F 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 05:26:15 -0000 Author: cy Date: Sun Feb 3 05:26:07 2019 New Revision: 343704 URL: https://svnweb.freebsd.org/changeset/base/343704 Log: Kernel module shim sources have no business being in the userland build directory, especially those for other operating systems. The kernel module shims for other operating systems are hereby removed. The kernel module shim for FreeBSD, mlfk_ipl.c, is already in sys/contrib/ipfilter/netinet. The one here is never used and should not be in the userland build directory either. mlfk_rule.c isn't used either however we will keep it in case someone wishes to use this shim to load rules via a kernel module, handy for embedded. In that case it should be copied to sys/contrib/ipfilter/netinet and a Makefile created to employ it. (Probably a useful documentation project when time permits.) MFC after: 1 month Deleted: head/contrib/ipfilter/ml_ipl.c head/contrib/ipfilter/mlf_ipl.c head/contrib/ipfilter/mlf_rule.c head/contrib/ipfilter/mlfk_ipl.c head/contrib/ipfilter/mlh_rule.c head/contrib/ipfilter/mln_ipl.c head/contrib/ipfilter/mln_rule.c head/contrib/ipfilter/mlo_ipl.c head/contrib/ipfilter/mlo_rule.c head/contrib/ipfilter/mls_ipl.c head/contrib/ipfilter/mls_rule.c head/contrib/ipfilter/mlso_rule.c From owner-svn-src-head@freebsd.org Sun Feb 3 08:28:02 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCE4614BC9C0; Sun, 3 Feb 2019 08:28:02 +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 83896891F7; Sun, 3 Feb 2019 08:28:02 +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 78B321BF6B; Sun, 3 Feb 2019 08:28:02 +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 x138S2FL011225; Sun, 3 Feb 2019 08:28:02 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x138S2CO011224; Sun, 3 Feb 2019 08:28:02 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201902030828.x138S2CO011224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 3 Feb 2019 08:28:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343707 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 343707 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 83896891F7 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 08:28:03 -0000 Author: glebius Date: Sun Feb 3 08:28:02 2019 New Revision: 343707 URL: https://svnweb.freebsd.org/changeset/base/343707 Log: Teach pfil_ioctl() about VIMAGE. Submitted by: gallatin Modified: head/sys/net/pfil.c Modified: head/sys/net/pfil.c ============================================================================== --- head/sys/net/pfil.c Sun Feb 3 08:15:26 2019 (r343706) +++ head/sys/net/pfil.c Sun Feb 3 08:28:02 2019 (r343707) @@ -46,6 +46,8 @@ #include #include #include +#include +#include #include #include @@ -495,6 +497,7 @@ pfil_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, { int error; + CURVNET_SET(TD_TO_VNET(td)); error = 0; switch (cmd) { case PFILIOC_LISTHEADS: @@ -507,9 +510,10 @@ pfil_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, error = pfilioc_link((struct pfilioc_link *)addr); break; default: - return (EINVAL); + error = EINVAL; + break; } - + CURVNET_RESTORE(); return (error); } From owner-svn-src-head@freebsd.org Sun Feb 3 08:15:27 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68B1414BC21B; Sun, 3 Feb 2019 08:15:27 +0000 (UTC) (envelope-from dfr@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 0D61088BBC; Sun, 3 Feb 2019 08:15:27 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 011B41BDA1; Sun, 3 Feb 2019 08:15:27 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x138FQYO005737; Sun, 3 Feb 2019 08:15:26 GMT (envelope-from dfr@FreeBSD.org) Received: (from dfr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x138FQiw005736; Sun, 3 Feb 2019 08:15:26 GMT (envelope-from dfr@FreeBSD.org) Message-Id: <201902030815.x138FQiw005736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dfr set sender to dfr@FreeBSD.org using -f From: Doug Rabson Date: Sun, 3 Feb 2019 08:15:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343706 - head/usr.sbin/rpc.statd X-SVN-Group: head X-SVN-Commit-Author: dfr X-SVN-Commit-Paths: head/usr.sbin/rpc.statd X-SVN-Commit-Revision: 343706 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0D61088BBC 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 08:15:27 -0000 Author: dfr Date: Sun Feb 3 08:15:26 2019 New Revision: 343706 URL: https://svnweb.freebsd.org/changeset/base/343706 Log: Reduce log spam from rpc.statd This only reports failed attempts to contact hosts on the first attempt. Modified: head/usr.sbin/rpc.statd/file.c Modified: head/usr.sbin/rpc.statd/file.c ============================================================================== --- head/usr.sbin/rpc.statd/file.c Sun Feb 3 05:26:10 2019 (r343705) +++ head/usr.sbin/rpc.statd/file.c Sun Feb 3 08:15:26 2019 (r343706) @@ -248,9 +248,12 @@ void init_file(const char *filename) /* Purpose: Perform SM_NOTIFY procedure at specified host Returns: TRUE if success, FALSE if failed. + Notes: Only report failure if verbose is non-zero. Caller will + only set verbose to non-zero for the first attempt to + contact the host. */ -static int notify_one_host(char *hostname) +static int notify_one_host(char *hostname, int verbose) { struct timeval timeout = { 20, 0 }; /* 20 secs timeout */ CLIENT *cli; @@ -277,7 +280,8 @@ static int notify_one_host(char *hostname) (xdrproc_t)xdr_void, &dummy, timeout) != RPC_SUCCESS) { - syslog(LOG_ERR, "Failed to contact rpc.statd at host %s", hostname); + if (verbose) + syslog(LOG_ERR, "Failed to contact rpc.statd at host %s", hostname); clnt_destroy(cli); return (FALSE); } @@ -346,7 +350,7 @@ void notify_hosts(void) { if (hp->notifyReqd) { - if (notify_one_host(hp->hostname)) + if (notify_one_host(hp->hostname, attempts == 0)) { hp->notifyReqd = FALSE; sync_file(); From owner-svn-src-head@freebsd.org Sun Feb 3 12:46:28 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A02414C877E; Sun, 3 Feb 2019 12:46:28 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 0CBA96CAA2; Sun, 3 Feb 2019 12:46:28 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EAB3D1EC85; Sun, 3 Feb 2019 12:46:27 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x13CkRTb049233; Sun, 3 Feb 2019 12:46:27 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x13CkRY5049231; Sun, 3 Feb 2019 12:46:27 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201902031246.x13CkRY5049231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 3 Feb 2019 12:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343713 - in head/sys: amd64/conf arm64/conf X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys: amd64/conf arm64/conf X-SVN-Commit-Revision: 343713 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0CBA96CAA2 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.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 12:46:28 -0000 Author: andrew Date: Sun Feb 3 12:46:27 2019 New Revision: 343713 URL: https://svnweb.freebsd.org/changeset/base/343713 Log: Enable COVERAGE and KCOV by default on arm64 and amd64. This allows userspace to trace the kernel using the coverage sanitizer found in clang. It will also allow other coverage tools to be built as modules and attach into the same framework. Sponsored by: DARPA, AFRL Modified: head/sys/amd64/conf/GENERIC head/sys/arm64/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Sun Feb 3 11:41:43 2019 (r343712) +++ head/sys/amd64/conf/GENERIC Sun Feb 3 12:46:27 2019 (r343713) @@ -102,8 +102,8 @@ options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Kernel Sanitizers -#options COVERAGE # Generic kernel coverage. Used by KCOV -#options KCOV # Kernel Coverage Sanitizer +options COVERAGE # Generic kernel coverage. Used by KCOV +options KCOV # Kernel Coverage Sanitizer # Warning: KUBSAN can result in a kernel too large for loader to load #options KUBSAN # Kernel Undefined Behavior Sanitizer Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Sun Feb 3 11:41:43 2019 (r343712) +++ head/sys/arm64/conf/GENERIC Sun Feb 3 12:46:27 2019 (r343713) @@ -94,8 +94,8 @@ options USB_DEBUG # enable debug msgs options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Kernel Sanitizers -#options COVERAGE # Generic kernel coverage. Used by KCOV -#options KCOV # Kernel Coverage Sanitizer +options COVERAGE # Generic kernel coverage. Used by KCOV +options KCOV # Kernel Coverage Sanitizer # Warning: KUBSAN can result in a kernel too large for loader to load #options KUBSAN # Kernel Undefined Behavior Sanitizer From owner-svn-src-head@freebsd.org Sun Feb 3 18:38:59 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA85014AE51E; Sun, 3 Feb 2019 18:38:59 +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 7F139813E7; Sun, 3 Feb 2019 18:38:59 +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 748DE2280A; Sun, 3 Feb 2019 18:38:59 +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 x13Icxsd035886; Sun, 3 Feb 2019 18:38:59 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x13IcxQN035885; Sun, 3 Feb 2019 18:38:59 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201902031838.x13IcxQN035885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 3 Feb 2019 18:38:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343719 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 343719 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7F139813E7 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 18:39:00 -0000 Author: markj Date: Sun Feb 3 18:38:58 2019 New Revision: 343719 URL: https://svnweb.freebsd.org/changeset/base/343719 Log: Fix a race in vm_page_dequeue_deferred(). To detect the case where the page is already marked for a deferred dequeue, we must read the "queue" and "aflags" fields in a precise order. Otherwise, a race with a concurrent vm_page_dequeue_complete() could leave the page with PGA_DEQUEUE set despite it already having been dequeued. Fix the problem by using vm_page_queue() to check the queue state, which correctly handles the race. Reviewed by: kib Tested by: pho MFC after: 3 days Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D19039 Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sun Feb 3 15:34:09 2019 (r343718) +++ head/sys/vm/vm_page.c Sun Feb 3 18:38:58 2019 (r343719) @@ -3279,18 +3279,13 @@ vm_page_dequeue_complete(vm_page_t m) void vm_page_dequeue_deferred(vm_page_t m) { - int queue; + uint8_t queue; vm_page_assert_locked(m); - queue = atomic_load_8(&m->queue); - if (queue == PQ_NONE) { - KASSERT((m->aflags & PGA_QUEUE_STATE_MASK) == 0, - ("page %p has queue state", m)); + if ((queue = vm_page_queue(m)) == PQ_NONE) return; - } - if ((m->aflags & PGA_DEQUEUE) == 0) - vm_page_aflag_set(m, PGA_DEQUEUE); + vm_page_aflag_set(m, PGA_DEQUEUE); vm_pqbatch_submit_page(m, queue); } @@ -3386,7 +3381,7 @@ vm_page_requeue(vm_page_t m) { vm_page_assert_locked(m); - KASSERT(m->queue != PQ_NONE, + KASSERT(vm_page_queue(m) != PQ_NONE, ("%s: page %p is not logically enqueued", __func__, m)); if ((m->aflags & PGA_REQUEUE) == 0) From owner-svn-src-head@freebsd.org Sun Feb 3 18:43:21 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80CBD14AE940; Sun, 3 Feb 2019 18:43:21 +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 2009B818D4; Sun, 3 Feb 2019 18:43:21 +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 14011229B1; Sun, 3 Feb 2019 18:43:21 +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 x13IhKo4040608; Sun, 3 Feb 2019 18:43:20 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x13IhK0Y040606; Sun, 3 Feb 2019 18:43:20 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201902031843.x13IhK0Y040606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 3 Feb 2019 18:43:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343720 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 343720 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2009B818D4 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.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 18:43:21 -0000 Author: markj Date: Sun Feb 3 18:43:20 2019 New Revision: 343720 URL: https://svnweb.freebsd.org/changeset/base/343720 Log: Allow vm_page_free_prep() to dequeue pages without the page lock. This is a step towards being able to free pages without the page lock held. The approach is simply to add an implementation of vm_page_dequeue_deferred() which does not assert that the page lock is held. Formally, the page lock is required to set PGA_DEQUEUE, but in the case of vm_page_free_prep() we get the same mutual exclusion for free by virtue of the fact that no other references to the page may exist. No functional change intended. Reviewed by: kib (previous version) MFC after: 2 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D19065 Modified: head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sun Feb 3 18:38:58 2019 (r343719) +++ head/sys/vm/vm_page.c Sun Feb 3 18:43:20 2019 (r343720) @@ -3175,7 +3175,11 @@ vm_pqbatch_submit_page(vm_page_t m, uint8_t queue) struct vm_pagequeue *pq; int domain; - vm_page_assert_locked(m); + KASSERT((m->oflags & VPO_UNMANAGED) == 0, + ("page %p is unmanaged", m)); + KASSERT(mtx_owned(vm_page_lockptr(m)) || + (m->object == NULL && (m->aflags & PGA_DEQUEUE) != 0), + ("missing synchronization for page %p", m)); KASSERT(queue < PQ_COUNT, ("invalid queue %d", queue)); domain = vm_phys_domain(m); @@ -3197,8 +3201,9 @@ vm_pqbatch_submit_page(vm_page_t m, uint8_t queue) /* * The page may have been logically dequeued before we acquired the - * page queue lock. In this case, the page lock prevents the page - * from being logically enqueued elsewhere. + * page queue lock. In this case, since we either hold the page lock + * or the page is being freed, a different thread cannot be concurrently + * enqueuing the page. */ if (__predict_true(m->queue == queue)) vm_pqbatch_process_page(pq, m); @@ -3290,6 +3295,30 @@ vm_page_dequeue_deferred(vm_page_t m) } /* + * A variant of vm_page_dequeue_deferred() that does not assert the page + * lock and is only to be called from vm_page_free_prep(). It is just an + * open-coded implementation of vm_page_dequeue_deferred(). Because the + * page is being freed, we can assume that nothing else is scheduling queue + * operations on this page, so we get for free the mutual exclusion that + * is otherwise provided by the page lock. + */ +static void +vm_page_dequeue_deferred_free(vm_page_t m) +{ + uint8_t queue; + + KASSERT(m->object == NULL, ("page %p has an object reference", m)); + + if ((m->aflags & PGA_DEQUEUE) != 0) + return; + atomic_thread_fence_acq(); + if ((queue = m->queue) == PQ_NONE) + return; + vm_page_aflag_set(m, PGA_DEQUEUE); + vm_pqbatch_submit_page(m, queue); +} + +/* * vm_page_dequeue: * * Remove the page from whichever page queue it's in, if any. @@ -3474,7 +3503,7 @@ vm_page_free_prep(vm_page_t m) * dequeue. */ if ((m->oflags & VPO_UNMANAGED) == 0) - vm_page_dequeue_deferred(m); + vm_page_dequeue_deferred_free(m); m->valid = 0; vm_page_undirty(m); Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Sun Feb 3 18:38:58 2019 (r343719) +++ head/sys/vm/vm_page.h Sun Feb 3 18:43:20 2019 (r343720) @@ -351,8 +351,10 @@ extern struct mtx_padalign pa_lock[]; * queue, and cleared when the dequeue request is processed. A page may * have PGA_DEQUEUE set and PGA_ENQUEUED cleared, for instance if a dequeue * is requested after the page is scheduled to be enqueued but before it is - * actually inserted into the page queue. The page lock must be held to set - * this flag, and the queue lock for the page must be held to clear it. + * actually inserted into the page queue. For allocated pages, the page lock + * must be held to set this flag, but it may be set by vm_page_free_prep() + * without the page lock held. The page queue lock must be held to clear the + * PGA_DEQUEUE flag. * * PGA_REQUEUE is set when the page is scheduled to be enqueued or requeued * in its page queue. The page lock must be held to set this flag, and the From owner-svn-src-head@freebsd.org Sun Feb 3 21:28:59 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 936BD14B4015; Sun, 3 Feb 2019 21:28:59 +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 33C3287ABA; Sun, 3 Feb 2019 21:28:59 +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 1FECD244F8; Sun, 3 Feb 2019 21:28:59 +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 x13LSwi9026691; Sun, 3 Feb 2019 21:28:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x13LSwWC026690; Sun, 3 Feb 2019 21:28:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902032128.x13LSwWC026690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 3 Feb 2019 21:28:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343723 - head/sys/i386/include X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/i386/include X-SVN-Commit-Revision: 343723 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 33C3287ABA 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.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 21:28:59 -0000 Author: kib Date: Sun Feb 3 21:28:58 2019 New Revision: 343723 URL: https://svnweb.freebsd.org/changeset/base/343723 Log: i386: Do not ever store to other-CPU counter64 slot. On CPUs supporting cmpxchg8b, fetch is performed by cmpxchg8b on corresponding CPU slot, which unconditionally write to the slot. If for that slot, the owner CPU increments it, then both CPUs might run the cmpxchg8b instruction concurrently and this might race and override the incremental write. So the counter update would be lost. Fix it by implementing fetch as IPI and accumulation of result. It is acceptable for rare counter64 fetch operation to be more expensive. Diagnosed and tested by: Andreas Longwitz Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/i386/include/counter.h Modified: head/sys/i386/include/counter.h ============================================================================== --- head/sys/i386/include/counter.h Sun Feb 3 21:18:46 2019 (r343722) +++ head/sys/i386/include/counter.h Sun Feb 3 21:28:58 2019 (r343723) @@ -72,7 +72,12 @@ counter_64_inc_8b(uint64_t *p, int64_t inc) } #ifdef IN_SUBR_COUNTER_C -static inline uint64_t +struct counter_u64_fetch_cx8_arg { + uint64_t res; + uint64_t *p; +}; + +static uint64_t counter_u64_read_one_8b(uint64_t *p) { uint32_t res_lo, res_high; @@ -87,9 +92,22 @@ counter_u64_read_one_8b(uint64_t *p) return (res_lo + ((uint64_t)res_high << 32)); } +static void +counter_u64_fetch_cx8_one(void *arg1) +{ + struct counter_u64_fetch_cx8_arg *arg; + uint64_t val; + + arg = arg1; + val = counter_u64_read_one_8b((uint64_t *)((char *)arg->p + + UMA_PCPU_ALLOC_SIZE * PCPU_GET(cpuid))); + atomic_add_64(&arg->res, val); +} + static inline uint64_t counter_u64_fetch_inline(uint64_t *p) { + struct counter_u64_fetch_cx8_arg arg; uint64_t res; int i; @@ -108,9 +126,10 @@ counter_u64_fetch_inline(uint64_t *p) } critical_exit(); } else { - CPU_FOREACH(i) - res += counter_u64_read_one_8b((uint64_t *)((char *)p + - UMA_PCPU_ALLOC_SIZE * i)); + arg.p = p; + arg.res = 0; + smp_rendezvous(NULL, counter_u64_fetch_cx8_one, NULL, &arg); + res = arg.res; } return (res); } From owner-svn-src-head@freebsd.org Sun Feb 3 21:31:41 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 885D314B412D; Sun, 3 Feb 2019 21:31:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 2DB9887DA1; Sun, 3 Feb 2019 21:31:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 20D4D2454F; Sun, 3 Feb 2019 21:31:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x13LVeCf029219; Sun, 3 Feb 2019 21:31:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x13LVeab029218; Sun, 3 Feb 2019 21:31:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902032131.x13LVeab029218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 3 Feb 2019 21:31:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343724 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 343724 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2DB9887DA1 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 21:31:41 -0000 Author: kib Date: Sun Feb 3 21:31:40 2019 New Revision: 343724 URL: https://svnweb.freebsd.org/changeset/base/343724 Log: Do not call PHOLD() while owning the allproc_lock sx. Otherwise the lock might recurse in faultin() if the process is swapped out. Reported by: zeising Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sun Feb 3 21:28:58 2019 (r343723) +++ head/sys/kern/kern_proc.c Sun Feb 3 21:31:40 2019 (r343724) @@ -3112,8 +3112,8 @@ allproc_loop: PROC_UNLOCK(p); continue; } - _PHOLD(p); sx_xunlock(&allproc_lock); + _PHOLD(p); r = thread_single(p, SINGLE_ALLPROC); if (r != 0) restart = true; From owner-svn-src-head@freebsd.org Mon Feb 4 01:20:57 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A85E914B9C88; Mon, 4 Feb 2019 01:20:57 +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 4DBBD8E470; Mon, 4 Feb 2019 01:20: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 3F69D26CF1; Mon, 4 Feb 2019 01:20: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 x141Kvop047549; Mon, 4 Feb 2019 01:20:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x141KvSe047548; Mon, 4 Feb 2019 01:20:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201902040120.x141KvSe047548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 4 Feb 2019 01:20:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343727 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 343727 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4DBBD8E470 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 01:20:58 -0000 Author: mav Date: Mon Feb 4 01:20:56 2019 New Revision: 343727 URL: https://svnweb.freebsd.org/changeset/base/343727 Log: Use switch instead of chained if/else to improve readability. Submitted by: Ryan Moeller MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D19051 Modified: head/sys/cam/scsi/scsi_enc_ses.c Modified: head/sys/cam/scsi/scsi_enc_ses.c ============================================================================== --- head/sys/cam/scsi/scsi_enc_ses.c Sun Feb 3 22:49:01 2019 (r343726) +++ head/sys/cam/scsi/scsi_enc_ses.c Mon Feb 4 01:20:56 2019 (r343727) @@ -2729,13 +2729,13 @@ ses_handle_string(enc_softc_t *enc, encioc_string_t *s if (sstr->bufsiz > 0xffff) return (EINVAL); /* buffer size too large */ - if (ioc == ENCIOC_SETSTRING) { + switch (ioc) { + case ENCIOC_SETSTRING: payload = sstr->bufsiz + 4; /* header for SEND DIAGNOSTIC */ amt = 0 - payload; buf = ENC_MALLOC(payload); if (buf == NULL) - return ENOMEM; - + return (ENOMEM); ses_page_cdb(cdb, payload, 0, CAM_DIR_OUT); /* Construct the page request */ buf[0] = SesStringOut; @@ -2743,12 +2743,14 @@ ses_handle_string(enc_softc_t *enc, encioc_string_t *s buf[2] = sstr->bufsiz >> 8; buf[3] = sstr->bufsiz & 0xff; memcpy(&buf[4], sstr->buf, sstr->bufsiz); - } else if (ioc == ENCIOC_GETSTRING) { + break; + case ENCIOC_GETSTRING: payload = sstr->bufsiz; amt = payload; ses_page_cdb(cdb, payload, SesStringIn, CAM_DIR_IN); buf = sstr->buf; - } else if (ioc == ENCIOC_GETENCNAME) { + break; + case ENCIOC_GETENCNAME: if (ses_cache->ses_nsubencs < 1) return (ENODEV); enc_desc = ses_cache->subencs[0]; @@ -2768,7 +2770,7 @@ ses_handle_string(enc_softc_t *enc, encioc_string_t *s size = sstr->bufsiz; copyout(str, sstr->buf, size); return (size == rsize ? 0 : ENOMEM); - } else if (ioc == ENCIOC_GETENCID) { + case ENCIOC_GETENCID: if (ses_cache->ses_nsubencs < 1) return (ENODEV); enc_desc = ses_cache->subencs[0]; @@ -2782,13 +2784,13 @@ ses_handle_string(enc_softc_t *enc, encioc_string_t *s size = sstr->bufsiz; copyout(str, sstr->buf, size); return (size == rsize ? 0 : ENOMEM); - } else - return EINVAL; - + default: + return (EINVAL); + } ret = enc_runcmd(enc, cdb, 6, buf, &amt); if (ioc == ENCIOC_SETSTRING) ENC_FREE(buf); - return ret; + return (ret); } /** From owner-svn-src-head@freebsd.org Mon Feb 4 01:24:11 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72A2914B9F83; Mon, 4 Feb 2019 01:24: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 12F6C8E853; Mon, 4 Feb 2019 01:24: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 F2BE226D6D; Mon, 4 Feb 2019 01:24: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 x141OAUF052450; Mon, 4 Feb 2019 01:24:10 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x141OAWw052449; Mon, 4 Feb 2019 01:24:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201902040124.x141OAWw052449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 4 Feb 2019 01:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343728 - head/usr.sbin/sesutil X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/usr.sbin/sesutil X-SVN-Commit-Revision: 343728 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 12F6C8E853 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.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 01:24:11 -0000 Author: mav Date: Mon Feb 4 01:24:10 2019 New Revision: 343728 URL: https://svnweb.freebsd.org/changeset/base/343728 Log: Check element type before setting LEDs. With r319610, sesutil started twiddling the bits of every SES device. Not everything is a disk slot, there are also fan controllers, temperature sensors, even power supplies, among other things controlled by SES. Add a type check to make sure we are only operating on device slot and array device slot elements. Other type elements will be skipped, but it would be simple to add additional cases for controlling the ident LEDs of other element types (which are not necessarily the same bits). Rather than doing raw bit manipulation of an unstructured byte array using unnamed numeric constants, leverage existing code abstractions. Submitted by: Ryan Moeller MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D19052 Modified: head/usr.sbin/sesutil/sesutil.c Modified: head/usr.sbin/sesutil/sesutil.c ============================================================================== --- head/usr.sbin/sesutil/sesutil.c Mon Feb 4 01:20:56 2019 (r343727) +++ head/usr.sbin/sesutil/sesutil.c Mon Feb 4 01:24:10 2019 (r343728) @@ -112,28 +112,30 @@ usage(FILE *out, const char *subcmd) } static void -do_led(int fd, unsigned int idx, bool onoff, bool setfault) +do_led(int fd, unsigned int idx, elm_type_t type, bool onoff, bool setfault) { + int state = onoff ? 1 : 0; encioc_elm_status_t o; + struct ses_ctrl_dev_slot *slot; o.elm_idx = idx; if (ioctl(fd, ENCIOC_GETELMSTAT, (caddr_t) &o) < 0) { close(fd); xo_err(EXIT_FAILURE, "ENCIOC_GETELMSTAT"); } - o.cstat[0] |= 0x80; - if (setfault) { - if (onoff) - o.cstat[3] |= 0x20; + slot = (struct ses_ctrl_dev_slot *) &o.cstat[0]; + switch (type) { + case ELMTYP_DEVICE: + case ELMTYP_ARRAY_DEV: + ses_ctrl_common_set_select(&slot->common, 1); + if (setfault) + ses_ctrl_dev_slot_set_rqst_fault(slot, state); else - o.cstat[3] &= 0xdf; - } else { - if (onoff) - o.cstat[2] |= 0x02; - else - o.cstat[2] &= 0xfd; + ses_ctrl_dev_slot_set_rqst_ident(slot, state); + break; + default: + return; } - if (ioctl(fd, ENCIOC_SETELMSTAT, (caddr_t) &o) < 0) { close(fd); xo_err(EXIT_FAILURE, "ENCIOC_SETELMSTAT"); @@ -250,14 +252,15 @@ sesled(int argc, char **argv, bool setfault) xo_errx(EXIT_FAILURE, "Requested SES ID does not exist"); } - do_led(fd, sesid, onoff, setfault); + do_led(fd, sesid, objp[sesid].elm_type, onoff, setfault); ndisks++; close(fd); break; } for (j = 0; j < nobj; j++) { if (all) { - do_led(fd, objp[j].elm_idx, onoff, setfault); + do_led(fd, objp[j].elm_idx, objp[j].elm_type, + onoff, setfault); continue; } memset(&objdn, 0, sizeof(objdn)); @@ -274,7 +277,7 @@ sesled(int argc, char **argv, bool setfault) } if (objdn.elm_names_len > 0) { if (disk_match(objdn.elm_devnames, disk, len)) { - do_led(fd, objdn.elm_idx, + do_led(fd, objdn.elm_idx, objp[j].elm_type, onoff, setfault); ndisks++; break; From owner-svn-src-head@freebsd.org Mon Feb 4 02:18:28 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00D2114BAE02; Mon, 4 Feb 2019 02:18:28 +0000 (UTC) (envelope-from gshapiro@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 974198F9B0; Mon, 4 Feb 2019 02:18:27 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A0FB275C6; Mon, 4 Feb 2019 02:18:27 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x142IR33078263; Mon, 4 Feb 2019 02:18:27 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x142IR9f078262; Mon, 4 Feb 2019 02:18:27 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201902040218.x142IR9f078262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Mon, 4 Feb 2019 02:18:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343729 - head/etc/mail X-SVN-Group: head X-SVN-Commit-Author: gshapiro X-SVN-Commit-Paths: head/etc/mail X-SVN-Commit-Revision: 343729 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 974198F9B0 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_SHORT(-0.95)[-0.946,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 02:18:28 -0000 Author: gshapiro Date: Mon Feb 4 02:18:27 2019 New Revision: 343729 URL: https://svnweb.freebsd.org/changeset/base/343729 Log: Add support for the authinfo map Submitted by: keramida Modified: head/etc/mail/Makefile Modified: head/etc/mail/Makefile ============================================================================== --- head/etc/mail/Makefile Mon Feb 4 01:24:10 2019 (r343728) +++ head/etc/mail/Makefile Mon Feb 4 02:18:27 2019 (r343729) @@ -60,8 +60,8 @@ # ------------------------------------------------------------------------ # # The Makefile knows about the following maps: -# access, bitdomain, domaintable, genericstable, mailertable, userdb, -# uucpdomain, virtusertable +# access, authinfo, bitdomain, domaintable, genericstable, mailertable, +# userdb, uucpdomain, virtusertable # .ifndef SENDMAIL_MC @@ -125,7 +125,7 @@ SENDMAIL_MAP_PERMS?= 0640 # type to use when calling makemap. # SENDMAIL_MAP_SRC+= mailertable domaintable bitdomain uucpdomain \ - genericstable virtusertable access + genericstable virtusertable access authinfo SENDMAIL_MAP_OBJ= SENDMAIL_MAP_TYPE?= hash From owner-svn-src-head@freebsd.org Mon Feb 4 05:37:10 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D48314BF38A; Mon, 4 Feb 2019 05:37:10 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-yw1-f52.google.com (mail-yw1-f52.google.com [209.85.161.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8FAB36E5F6; Mon, 4 Feb 2019 05:37:09 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-yw1-f52.google.com with SMTP id g194so5214002ywe.7; Sun, 03 Feb 2019 21:37:09 -0800 (PST) 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=9LWaY4w0XosidCoGvm68+CNrKmnY4PJgPLNXgHe0ako=; b=D9LDUOhUHBHmZgFberxRRtkRm8lgR1UaYX+76YFLaPzeKwvQiiRmi0wAjIc/W0UryD yIu8LUNK+Bkz+X9+OSvN0TuMdpIqTsC/UG72CGMq0oPGMCouyr9VrXa+93oyfgyrSqHH 0X2SSHiXiCyqAnHBJtIfHWhRgUkemyhC0xgpiQWg1OUKtlYteV+IW/I8ohhS0Ee7klhh ih/5c/J0nBOYEX2fO6VE8+dD3OygBQKUPDnMGJvxiwitSalCR+Q05tWI7AdlkBYaS5tf 2LpIpl+v5jp5p594fidswECWpCACh+s8a/dR5A4hreotH0+vguTcA2og7TgwwVcFZOQa JCYw== X-Gm-Message-State: AHQUAuaOfJzzIh3tC6cX59j3WJ+XBMcutH1l5cma/XZhJ3yKUm/ruHsF EACb1Jvog/LzerkDk0B8YeEBmPw57RsvbZiXXtZHe5DQ X-Google-Smtp-Source: AHgI3IZVT8oGuTdPvReba4WHKhn21TFNhJ+UeFNFw7Z0Qy43HFTlrDSJXLDWei5pUzflK2dCXrpRAR+LYnVBTxYyiJw= X-Received: by 2002:a81:5f07:: with SMTP id t7mr1152535ywb.320.1549258150342; Sun, 03 Feb 2019 21:29:10 -0800 (PST) MIME-Version: 1.0 References: <201902031246.x13CkRY5049231@repo.freebsd.org> In-Reply-To: <201902031246.x13CkRY5049231@repo.freebsd.org> From: Li-Wen Hsu Date: Mon, 4 Feb 2019 13:28:58 +0800 Message-ID: Subject: Re: svn commit: r343713 - in head/sys: amd64/conf arm64/conf To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 8FAB36E5F6 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)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 05:37:10 -0000 On Sun, Feb 3, 2019 at 8:46 PM Andrew Turner wrote: > > Author: andrew > Date: Sun Feb 3 12:46:27 2019 > New Revision: 343713 > URL: https://svnweb.freebsd.org/changeset/base/343713 > > Log: > Enable COVERAGE and KCOV by default on arm64 and amd64. > > This allows userspace to trace the kernel using the coverage sanitizer > found in clang. It will also allow other coverage tools to be built as > modules and attach into the same framework. > > Sponsored by: DARPA, AFRL > > Modified: > head/sys/amd64/conf/GENERIC > head/sys/arm64/conf/GENERIC > > Modified: head/sys/amd64/conf/GENERIC > ============================================================================== > --- head/sys/amd64/conf/GENERIC Sun Feb 3 11:41:43 2019 (r343712) > +++ head/sys/amd64/conf/GENERIC Sun Feb 3 12:46:27 2019 (r343713) > @@ -102,8 +102,8 @@ options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) > options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default > > # Kernel Sanitizers > -#options COVERAGE # Generic kernel coverage. Used by KCOV > -#options KCOV # Kernel Coverage Sanitizer > +options COVERAGE # Generic kernel coverage. Used by KCOV > +options KCOV # Kernel Coverage Sanitizer > # Warning: KUBSAN can result in a kernel too large for loader to load > #options KUBSAN # Kernel Undefined Behavior Sanitizer > > > Modified: head/sys/arm64/conf/GENERIC > ============================================================================== > --- head/sys/arm64/conf/GENERIC Sun Feb 3 11:41:43 2019 (r343712) > +++ head/sys/arm64/conf/GENERIC Sun Feb 3 12:46:27 2019 (r343713) > @@ -94,8 +94,8 @@ options USB_DEBUG # enable debug msgs > options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default > > # Kernel Sanitizers > -#options COVERAGE # Generic kernel coverage. Used by KCOV > -#options KCOV # Kernel Coverage Sanitizer > +options COVERAGE # Generic kernel coverage. Used by KCOV > +options KCOV # Kernel Coverage Sanitizer > # Warning: KUBSAN can result in a kernel too large for loader to load > #options KUBSAN # Kernel Undefined Behavior Sanitizer This breaks gcc build: https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/8781/console : x86_64-unknown-freebsd12.0-gcc: error: unrecognized command line option '-fsanitize-coverage=trace-pc,trace-cmp'; did you mean '-fsanitize-coverage=trace-pc'? We probably need to adjust arguments passed to gcc. Li-Wen From owner-svn-src-head@freebsd.org Mon Feb 4 05:37:21 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECD6514BF3BA; Mon, 4 Feb 2019 05:37:20 +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 6E0C06E6D6; Mon, 4 Feb 2019 05:37:20 +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 85EC61869; Mon, 4 Feb 2019 05:37:16 +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 x145bGs7081954; Mon, 4 Feb 2019 05:37:16 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x145bGP7081953; Mon, 4 Feb 2019 05:37:16 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201902040537.x145bGP7081953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 4 Feb 2019 05:37:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343732 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 343732 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6E0C06E6D6 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 05:37:21 -0000 Author: cy Date: Mon Feb 4 05:37:16 2019 New Revision: 343732 URL: https://svnweb.freebsd.org/changeset/base/343732 Log: Remove two more #ifdefs missed in r343701. MFC after: 1 month X-MFC with: r343701 Modified: head/sys/contrib/ipfilter/netinet/fil.c Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Mon Feb 4 03:52:04 2019 (r343731) +++ head/sys/contrib/ipfilter/netinet/fil.c Mon Feb 4 05:37:16 2019 (r343732) @@ -6119,9 +6119,7 @@ ipf_getifname(ifp, buffer) char *buffer; { static char namebuf[LIFNAMSIZ]; -# if defined(MENTAT) || defined(__FreeBSD__) || defined(__osf__) || \ - defined(__sgi) || defined(linux) || defined(_AIX51) || \ - (defined(sun) && !defined(__SVR4) && !defined(__svr4__)) +# if defined(MENTAT) || defined(__FreeBSD__) int unit, space; char temp[20]; char *s; @@ -6131,9 +6129,7 @@ ipf_getifname(ifp, buffer) buffer = namebuf; (void) strncpy(buffer, ifp->if_name, LIFNAMSIZ); buffer[LIFNAMSIZ - 1] = '\0'; -# if defined(MENTAT) || defined(__FreeBSD__) || defined(__osf__) || \ - defined(__sgi) || defined(_AIX51) || \ - (defined(sun) && !defined(__SVR4) && !defined(__svr4__)) +# if defined(MENTAT) || defined(__FreeBSD__) for (s = buffer; *s; s++) ; unit = ifp->if_unit; From owner-svn-src-head@freebsd.org Mon Feb 4 06:31:21 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B539F14C0367; Mon, 4 Feb 2019 06:31:21 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B21F56FD71; Mon, 4 Feb 2019 06:31:20 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wm1-x331.google.com with SMTP id y185so9254030wmd.1; Sun, 03 Feb 2019 22:31:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:reply-to:subject:to:references:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=sC/SLg2pUnbyoBMshbaFsh0dxktRrbThG+5kAAH++2g=; b=d/UCCOjCKVNSGGW+TAJ5vaOpnirIExdVlEeEg1MQjXhPu/R4KJnLjzITdfPpjNr7Gz KOqKBCyIq9uU3Xbly6ThEf8DtbTSEjKLmulUCkFBwU+qn8ubkPMJElEVJoh0Ilgv94Cr 7et7YagcJYDY4NieZCtSQHyR4HfwNZ3rUEtsn2jyVUbN8oSDonYsjjY2wFBnd2tULuqG WR5DfAN7D7DwIQuD2j9zlFxdCsELPr3XcZehg14HSKWARCrMS0j3aHFCLfdXbhbD5jjy 3yOgbXVapTUlPsOpoHd6Extgm7rfAqRT+kMdR5poYjh7ZXaV6OaOrdoDe4qF8cx9yuIv SRoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:reply-to:subject:to:references :openpgp:autocrypt:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=sC/SLg2pUnbyoBMshbaFsh0dxktRrbThG+5kAAH++2g=; b=VET9HF1/ksUbTR5wSPbRv9DIJFqyXbp2o1Z52KrD3/KL7I9eBmvux+IgGIGFpmMdPr OGiIrXYs9MdN+EZcnDFHPD/EkimFDKNY4p/E/aNuWjNXIMiDCo7+hpTAC0WmRG85r1kt aV+4IQjkvjlHLp5SjGwU1VE+voyoampwyXuWJYnCabUJxyvXxPilX1n1chqzifuHHXww mVqB3Io6Czoo+C/L9+o2DY88u3YFlRE12URO/xZfapFcHl+rOgNqw+6aEpUl3WF4sDXl AFk5VgVnc+Ck/nvmtcbCDXs3SIK/tv4XBRCS6U5Jr3/IqHRfVZ7yrYpv75kqO3UG9ekD cblw== X-Gm-Message-State: AHQUAuYNtxiXaX128wQy8/nFb9yg690ghl7W+KpoQIsHWErAdGdGpaQf OL/v75SwHEtEEQiLza3baWqCovqe X-Google-Smtp-Source: AHgI3IYa5PRQnW8uuRLpEzLY6Uqc3teXMrOuZ0MwSExIdHcd4rDT9awmj2R498r7AY9O8/26z5Z8xg== X-Received: by 2002:a1c:f707:: with SMTP id v7mr12149855wmh.18.1549261879163; Sun, 03 Feb 2019 22:31:19 -0800 (PST) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id g67sm16429897wmd.38.2019.02.03.22.31.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Feb 2019 22:31:18 -0800 (PST) Sender: Michal Meloun From: Michal Meloun X-Google-Original-From: Michal Meloun Reply-To: mmel@freebsd.org Subject: Re: svn commit: r343566 - in head/lib/libthr: . thread To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201901292246.x0TMkjQH074121@repo.freebsd.org> Openpgp: preference=signencrypt Autocrypt: addr=mmel@freebsd.org; prefer-encrypt=mutual; keydata= mQENBFYuVRkBCADZiwLCCne3wG9b9k+R2Neo5zVo2bLaZRfNNY/v9kg283i0sb1Da4EdEiNT 15El5UyozhphUIbIR/zrVpxF1TvvFdoCyzx6a68bNY2d9dBrDcNDZC+XnyDdHQoobN87DWT1 mRVkmbg9LHZ/SVUOkGYuWyE+8UYeDAcUizuXwSK5zFWmeTyIoWNa68ifrWLfQe0p4x5jC/AI VURCi17p360vU4fhgwoMvEEhrRBWCr4DYHToFjIt2WdBy3GR1qoO0+Xkd6G+OoBULo+XDfgu L2WdPvh0K69F9/LgHkMmG5Il7SCe62QGpG2vaCgRV7BQhLX+kxlvM+WrdRatWRml4Y/3ABEB AAG0IE1pY2hhbCBNZWxvdW4gPG1tZWxAZnJlZWJzZC5vcmc+iQFXBBMBCgBBAhsDBQsJCAcD BRUKCQgLBRYDAgEAAh4BAheAAhkBFiEEAN1KEEuAn+Apg413aR6ya17FqqoFAlw3aO8FCQ9v FVYACgkQaR6ya17FqqrIFwf/V/NRuAutw1cZ/HRCwfp00KY+8g730KwOaAMhPYvq8tqf8krD whFRWt9s4DSVTVJUC2dRZa5g1MS77iQL/WWzBUhJj7rW4uMpcKpi7UXi060sKrnE+1ZBvanG 8YCMTHKxQgQDD0cBqsyOAfrSA+Pyya3/HyAh1vvjQZfu5vWxA1X5NX5l5KtonprJ+ybVacwO W34yfWSX+ncx089JpUknenGdI+gVoKfa6uh/8YiCZTI5poxBttrOB8NGfylTsTTTbw2pkire Vkc87qq++I9bBNtTqWOZjB/3KBUd4q1veEUa4MS63TWtAvcEcsxHiBv4AH6npPO/iPycuGGh qldT1LkBDQRWLlUZAQgAuqBGR9LbUP86pYT2Zd+HZsiOun24LxPQwK6KZuysB0so02isa7ac T6t5uBfyfmdgzfvsc6dqU8bI65e8JtDwwVVF1Y4fF6cmNcmJqU10Gw5/bAu9re9JJWx2g/OJ tYMhwmqEE5DcS6GwgvJZI+9hgoSLL3mZ+GsO25NM4BhVH1o1AE4Q3O0HZMMnIzH+pma0augZ Xc3Qep17/Occ+1A7xEbn8VAYx8cwjkYUy7JyvVx4ecuj+i+uoCXhNhX5QdIcn4UMT1233Bcd yVZtZsLTI26ByFmrquGjkmN+/hra/s+nKfcegOKeHWVY/uFgDRk0TEYd6QuddZWo7+XMZLps wQARAQABiQElBBgBCgAPAhsMBQJZjBHDBQkHICOqAAoJEGkesmtexaqquysH/iDgRIrlMvFT GLyktZws/K/C03gWZ/tWwJV5+SFqRoasM+Z+9+cb44XA3rReqieLsYF5qSXTXHBPhEg1+9V9 KEPLpwektLtAv8zynN+6VVffwyRWQ4PIZmHCMT6PJP+Rk0DU6VrDc3ch58erduuyRDsbh32g 96nYMNvDsLhDvq44GPHLfglUHRY6wHo3IxAH2HosaWNC10R13JSrCdFnPMeIa+nSE+11hAdB mWpuPgVX2VNErtrwSBr7LsyCZ4yLO0bN5fKM0/Tavc9EcI9qDBrnts/EfZoCHhDtTMEFnQZM ybsMso20I/nxYPFuWuuFn7uQeoYrwWxt15SkN0RgtV2JATwEGAEKACYCGwwWIQQA3UoQS4Cf 4CmDjXdpHrJrXsWqqgUCXDdpmwUJD28WAgAKCRBpHrJrXsWqqtOrB/9Okk/dm2/mAs3tbA6l lKOZAwfUwBonwG7YhK9dOb5No/bJoY8G9s2IVXqwWKqCDv1qKC4M8pMXPD9fVsfNPG8GA1GZ rpZoZxHFteXZHoE1grpWypE0T3hp1W0hQNWXKv0MSuEMRVKU1m/iyLa10X7q8BaKtEDs35Xf DCh7eVg1vqiKtWyFn1u+y9Gy1Ztc/SKTs8mQvMYNUdBZuV6vN0VSz3I6wD9HVfo6Eo3M7cVp qqQ+KhrrGiCCYQPfZwpFAJSSgV3bR5O0BlNaGKJOoVTV1yexRbVEStswiFP8JFQp6U+S3nqE FFob7daQBLxi80oUVRn6eEdzR8tBhIy7sbeD Message-ID: Date: Mon, 4 Feb 2019 07:31:19 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <201901292246.x0TMkjQH074121@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: B21F56FD71 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=d/UCCOjC; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of melounmichal@gmail.com designates 2a00:1450:4864:20::331 as permitted sender) smtp.mailfrom=melounmichal@gmail.com X-Spamd-Result: default: False [-5.69 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[mmel@freebsd.org]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.97)[-0.966,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:2a00:1450::/32, country:US]; TAGGED_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]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; MID_RHS_MATCH_TO(1.00)[]; IP_SCORE(-2.71)[ip: (-9.27), ipnet: 2a00:1450::/32(-2.30), asn: 15169(-1.93), country: US(-0.07)]; RCVD_IN_DNSWL_NONE(0.00)[1.3.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 06:31:22 -0000 On 29.01.2019 23:46, Konstantin Belousov wrote: > Author: kib > Date: Tue Jan 29 22:46:44 2019 > New Revision: 343566 > URL: https://svnweb.freebsd.org/changeset/base/343566 > > Log: > Untangle jemalloc and mutexes initialization. > > The need to use libc malloc(3) from some places in libthr always > caused issues. For instance, per-thread key allocation was switched to > use plain mmap(2) to get storage, because some third party mallocs > used keys for implementation of calloc(3). > > Even more important, libthr calls calloc(3) during initialization of > pthread mutexes, and jemalloc uses pthread mutexes. Jemalloc provides > some way to both postpone the initialization, and to make > initialization to use specialized allocator, but this is very fragile > and often breaks. See the referenced PR for another example. > > Add the small malloc implementation used by rtld, to libthr. Use it in > thr_spec.c and for mutexes initialization. This avoids the issues with > mutual dependencies between malloc and libthr in principle. The > drawback is that some more allocations are not interceptable for > alternate malloc implementations. There should be not too much memory > use from this allocator, and the alternative, direct use of mmap(2) is > obviously worse. > > PR: 235211 > MFC after: 2 weeks > Sponsored by: The FreeBSD Foundation > Differential revision: https://reviews.freebsd.org/D18988 > This broke ARM static binaries (at least rescue/rescue). From first look it seems that __pthread_mutex_init() invoked by atomic_init() is called before curthread is set (before _thread_init_hack()). root@tegra124:/usr/src # gdb --args /usr/obj/usr/src/arm.armv7/rescue/rescue/rescue sh ... Reading symbols from /usr/obj/usr/src/arm.armv7/rescue/rescue/rescue...done. (gdb) b _thread_init_hack Breakpoint 1 at 0x67cad0: file /usr/src/lib/libthr/thread/thr_init.c, line 296. (gdb) r Starting program: /usr/obj/usr/src/arm.armv7/rescue/rescue/rescue sh Program received signal SIGSEGV, Segmentation fault. __thr_calloc (num=1, size=) at /usr/src/lib/libthr/thread/thr_malloc.c:82 82 thr_malloc_lock(curthread); (gdb) bt #0 __thr_calloc (num=1, size=) at /usr/src/lib/libthr/thread/thr_malloc.c:82 #1 0x00676e1c in mutex_init (mutex=, mutex_attr=, calloc_cb=) at /usr/src/lib/libthr/thread/thr_mutex.c:294 #2 __pthread_mutex_init (mutex=0xc6e948 , mutex_attr=) at /usr/src/lib/libthr/thread/thr_mutex.c:393 #3 0x001d41f0 in handle_static_init (argc=2, argv=, env=) at /usr/src/lib/csu/common/ignore_init.c:124 #4 0x001d40e8 in __start (argc=2, argv=, env=, ps_strings=, obj=0x0, cleanup=0x0) at /usr/src/lib/csu/arm/crt1.c:112 #5 0x001d4000 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) (gdb) f 3 #3 0x001d41f0 in handle_static_init (argc=2, argv=, env=) at /usr/src/lib/csu/common/ignore_init.c:124 124 fn(argc, argv, env); (gdb) list 119 _init(); 120 array_size = __init_array_end - __init_array_start; 121 for (n = 0; n < array_size; n++) { 122 fn = __init_array_start[n]; 123 if ((uintptr_t)fn != 0 && (uintptr_t)fn != 1) 124 fn(argc, argv, env); 125 } 126 } (gdb) p n $1 = 20 (gdb) p fn $6 = (void (*)(int, char **, char **)) 0x63f21c (gdb) p (void *)&__init_array_start $19 = (void *) 0xa7ab60 (gdb) p (void *)&__init_array_end $20 = (void *) 0xa7abc0 (gdb) x/24a &__init_array_start 0xa7ab60: 0x1d4270 0x2d926c <_$$hide$$ ifconfig.lo ifconfig_ctor> 0x2d98e0 <_$$hide$$ ifconfig.lo link_ctor> 0x2d9cb4 <_$$hide$$ ifconfig.lo inet_ctor> 0xa7ab70: 0x2da2e0 <_$$hide$$ ifconfig.lo inet6_ctor> 0x2db790 <_$$hide$$ ifconfig.lo clone_ctor> 0x2dbb8c <_$$hide$$ ifconfig.lo mac_ctor> 0x2dbe70 <_$$hide$$ ifconfig.lo ifmedia_ctor> 0xa7ab80: 0x2dced0 <_$$hide$$ ifconfig.lo fib_ctor> 0x2dd118 <_$$hide$$ ifconfig.lo vlan_ctor> 0x2dd668 <_$$hide$$ ifconfig.lo vxlan_ctor> 0x2df45c <_$$hide$$ ifconfig.lo gre_ctor> 0xa7ab90: 0x2df6d8 <_$$hide$$ ifconfig.lo gif_ctor> 0x2df874 <_$$hide$$ ifconfig.lo ipsec_ctor> 0x2e2144 <_$$hide$$ ifconfig.lo ieee80211_ctor> 0x2f0a10 <_$$hide$$ ifconfig.lo carp_ctor> 0xa7aba0: 0x2f0e6c <_$$hide$$ ifconfig.lo group_ctor> 0x2f199c <_$$hide$$ ifconfig.lo pfsync_ctor> 0x2f1a04 <_$$hide$$ ifconfig.lo bridge_ctor> 0x2f35dc <_$$hide$$ ifconfig.lo lagg_ctor> 0xa7abb0: 0x63f21c 0x67cad0 <_thread_init_hack> 0x90e5b4 0x9a6b98 So it's clear that order of static constructors is invalid (moreover, I thing that we are inside undefined area here). Any idea/hint how to fix this. Thanks, Michal > Added: > head/lib/libthr/thread/thr_malloc.c (contents, props changed) > Modified: > head/lib/libthr/Makefile > head/lib/libthr/thread/Makefile.inc > head/lib/libthr/thread/thr_fork.c > head/lib/libthr/thread/thr_init.c > head/lib/libthr/thread/thr_mutex.c > head/lib/libthr/thread/thr_private.h > head/lib/libthr/thread/thr_spec.c > > Modified: head/lib/libthr/Makefile > ============================================================================== > --- head/lib/libthr/Makefile Tue Jan 29 22:45:24 2019 (r343565) > +++ head/lib/libthr/Makefile Tue Jan 29 22:46:44 2019 (r343566) > @@ -27,6 +27,7 @@ CFLAGS+=-I${SRCTOP}/lib/libthread_db > CFLAGS+=-Winline > > CFLAGS.thr_stack.c+= -Wno-cast-align > +CFLAGS.malloc.c+= -Wno-cast-align > .include > .if !(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 40300) > CFLAGS.thr_symbols.c+= -Wno-missing-variable-declarations > @@ -50,12 +51,14 @@ CFLAGS+=-D_PTHREADS_INVARIANTS > PRECIOUSLIB= > > .PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} > +.PATH: ${SRCTOP}/libexec/rtld-elf > > .if exists(${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc) > .include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc" > .endif > .include "${.CURDIR}/sys/Makefile.inc" > .include "${.CURDIR}/thread/Makefile.inc" > +SRCS+= malloc.c > > .if ${MK_INSTALLLIB} != "no" > SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a > > Modified: head/lib/libthr/thread/Makefile.inc > ============================================================================== > --- head/lib/libthr/thread/Makefile.inc Tue Jan 29 22:45:24 2019 (r343565) > +++ head/lib/libthr/thread/Makefile.inc Tue Jan 29 22:46:44 2019 (r343566) > @@ -31,6 +31,7 @@ SRCS+= \ > thr_kern.c \ > thr_kill.c \ > thr_main_np.c \ > + thr_malloc.c \ > thr_multi_np.c \ > thr_mutex.c \ > thr_mutexattr.c \ > > Modified: head/lib/libthr/thread/thr_fork.c > ============================================================================== > --- head/lib/libthr/thread/thr_fork.c Tue Jan 29 22:45:24 2019 (r343565) > +++ head/lib/libthr/thread/thr_fork.c Tue Jan 29 22:46:44 2019 (r343566) > @@ -170,6 +170,7 @@ __thr_fork(void) > */ > if (_thr_isthreaded() != 0) { > was_threaded = 1; > + __thr_malloc_prefork(curthread); > _malloc_prefork(); > __thr_pshared_atfork_pre(); > _rtld_atfork_pre(rtld_locks); > @@ -197,6 +198,10 @@ __thr_fork(void) > */ > curthread->tlflags &= ~TLFLAGS_IN_TDLIST; > > + /* before thr_self() */ > + if (was_threaded) > + __thr_malloc_postfork(curthread); > + > /* child is a new kernel thread. */ > thr_self(&curthread->tid); > > @@ -241,6 +246,7 @@ __thr_fork(void) > _thr_signal_postfork(); > > if (was_threaded) { > + __thr_malloc_postfork(curthread); > _rtld_atfork_post(rtld_locks); > __thr_pshared_atfork_post(); > _malloc_postfork(); > > Modified: head/lib/libthr/thread/thr_init.c > ============================================================================== > --- head/lib/libthr/thread/thr_init.c Tue Jan 29 22:45:24 2019 (r343565) > +++ head/lib/libthr/thread/thr_init.c Tue Jan 29 22:46:44 2019 (r343566) > @@ -461,6 +461,7 @@ init_private(void) > */ > if (init_once == 0) { > __thr_pshared_init(); > + __thr_malloc_init(); > /* Find the stack top */ > mib[0] = CTL_KERN; > mib[1] = KERN_USRSTACK; > > Added: head/lib/libthr/thread/thr_malloc.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/lib/libthr/thread/thr_malloc.c Tue Jan 29 22:46:44 2019 (r343566) > @@ -0,0 +1,137 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2019 The FreeBSD Foundation > + * All rights reserved. > + * > + * This software was 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. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > +#include > +#include > +#include "thr_private.h" > + > +int npagesizes; > +size_t *pagesizes; > +static size_t pagesizes_d[2]; > +static struct umutex thr_malloc_umtx; > + > +void > +__thr_malloc_init(void) > +{ > + > + npagesizes = getpagesizes(pagesizes_d, nitems(pagesizes_d)); > + if (npagesizes == -1) { > + npagesizes = 1; > + pagesizes_d[0] = PAGE_SIZE; > + } > + pagesizes = pagesizes_d; > + _thr_umutex_init(&thr_malloc_umtx); > +} > + > +static void > +thr_malloc_lock(struct pthread *curthread) > +{ > + > + curthread->locklevel++; > + _thr_umutex_lock(&thr_malloc_umtx, TID(curthread)); > +} > + > +static void > +thr_malloc_unlock(struct pthread *curthread) > +{ > + > + _thr_umutex_unlock(&thr_malloc_umtx, TID(curthread)); > + curthread->locklevel--; > + _thr_ast(curthread); > +} > + > +void * > +__thr_calloc(size_t num, size_t size) > +{ > + struct pthread *curthread; > + void *res; > + > + curthread = _get_curthread(); > + thr_malloc_lock(curthread); > + res = __crt_calloc(num, size); > + thr_malloc_unlock(curthread); > + return (res); > +} > + > +void > +__thr_free(void *cp) > +{ > + struct pthread *curthread; > + > + curthread = _get_curthread(); > + thr_malloc_lock(curthread); > + __crt_free(cp); > + thr_malloc_unlock(curthread); > +} > + > +void * > +__thr_malloc(size_t nbytes) > +{ > + struct pthread *curthread; > + void *res; > + > + curthread = _get_curthread(); > + thr_malloc_lock(curthread); > + res = __crt_malloc(nbytes); > + thr_malloc_unlock(curthread); > + return (res); > +} > + > +void * > +__thr_realloc(void *cp, size_t nbytes) > +{ > + struct pthread *curthread; > + void *res; > + > + curthread = _get_curthread(); > + thr_malloc_lock(curthread); > + res = __crt_realloc(cp, nbytes); > + thr_malloc_unlock(curthread); > + return (res); > +} > + > +void > +__thr_malloc_prefork(struct pthread *curthread) > +{ > + > + _thr_umutex_lock(&thr_malloc_umtx, TID(curthread)); > +} > + > +void > +__thr_malloc_postfork(struct pthread *curthread) > +{ > + > + _thr_umutex_unlock(&thr_malloc_umtx, TID(curthread)); > +} > > Modified: head/lib/libthr/thread/thr_mutex.c > ============================================================================== > --- head/lib/libthr/thread/thr_mutex.c Tue Jan 29 22:45:24 2019 (r343565) > +++ head/lib/libthr/thread/thr_mutex.c Tue Jan 29 22:46:44 2019 (r343566) > @@ -306,10 +306,11 @@ init_static(struct pthread *thread, pthread_mutex_t *m > THR_LOCK_ACQUIRE(thread, &_mutex_static_lock); > > if (*mutex == THR_MUTEX_INITIALIZER) > - ret = mutex_init(mutex, &_pthread_mutexattr_default, calloc); > + ret = mutex_init(mutex, &_pthread_mutexattr_default, > + __thr_calloc); > else if (*mutex == THR_ADAPTIVE_MUTEX_INITIALIZER) > ret = mutex_init(mutex, &_pthread_mutexattr_adaptive_default, > - calloc); > + __thr_calloc); > else > ret = 0; > THR_LOCK_RELEASE(thread, &_mutex_static_lock); > @@ -390,7 +391,7 @@ __pthread_mutex_init(pthread_mutex_t * __restrict mute > if (mutex_attr == NULL || > (*mutex_attr)->m_pshared == PTHREAD_PROCESS_PRIVATE) { > return (mutex_init(mutex, mutex_attr ? *mutex_attr : NULL, > - calloc)); > + __thr_calloc)); > } > pmtx = __thr_pshared_offpage(__DECONST(void *, mutex), 1); > if (pmtx == NULL) > @@ -483,7 +484,7 @@ _pthread_mutex_destroy(pthread_mutex_t *mutex) > } else { > *mutex = THR_MUTEX_DESTROYED; > mutex_assert_not_owned(_get_curthread(), m); > - free(m); > + __thr_free(m); > ret = 0; > } > } > > Modified: head/lib/libthr/thread/thr_private.h > ============================================================================== > --- head/lib/libthr/thread/thr_private.h Tue Jan 29 22:45:24 2019 (r343565) > +++ head/lib/libthr/thread/thr_private.h Tue Jan 29 22:46:44 2019 (r343566) > @@ -1003,6 +1003,14 @@ void __thr_pshared_destroy(void *key) __hidden; > void __thr_pshared_atfork_pre(void) __hidden; > void __thr_pshared_atfork_post(void) __hidden; > > +void *__thr_calloc(size_t num, size_t size); > +void __thr_free(void *cp); > +void *__thr_malloc(size_t nbytes); > +void *__thr_realloc(void *cp, size_t nbytes); > +void __thr_malloc_init(void); > +void __thr_malloc_prefork(struct pthread *curthread); > +void __thr_malloc_postfork(struct pthread *curthread); > + > __END_DECLS > __NULLABILITY_PRAGMA_POP > > > Modified: head/lib/libthr/thread/thr_spec.c > ============================================================================== > --- head/lib/libthr/thread/thr_spec.c Tue Jan 29 22:45:24 2019 (r343565) > +++ head/lib/libthr/thread/thr_spec.c Tue Jan 29 22:46:44 2019 (r343566) > @@ -155,8 +155,7 @@ _thread_cleanupspecific(void) > } > } > THR_LOCK_RELEASE(curthread, &_keytable_lock); > - munmap(curthread->specific, PTHREAD_KEYS_MAX * sizeof(struct > - pthread_specific_elem)); > + __thr_free(curthread->specific); > curthread->specific = NULL; > if (curthread->specific_data_count > 0) { > stderr_debug("Thread %p has exited with leftover " > @@ -179,10 +178,9 @@ _pthread_setspecific(pthread_key_t userkey, const void > > pthread = _get_curthread(); > if (pthread->specific == NULL) { > - tmp = mmap(NULL, PTHREAD_KEYS_MAX * > - sizeof(struct pthread_specific_elem), > - PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); > - if (tmp == MAP_FAILED) > + tmp = __thr_calloc(PTHREAD_KEYS_MAX, > + sizeof(struct pthread_specific_elem)); > + if (tmp == NULL) > return (ENOMEM); > pthread->specific = tmp; > } > From owner-svn-src-head@freebsd.org Mon Feb 4 07:00:25 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCAEB14C1256; Mon, 4 Feb 2019 07:00:25 +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 3766E70C6B; Mon, 4 Feb 2019 07:00:25 +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 x1470Hmt000889 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 4 Feb 2019 09:00:20 +0200 (EET) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x1470Hmt000889 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x1470HTU000888; Mon, 4 Feb 2019 09:00:17 +0200 (EET) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Mon, 4 Feb 2019 09:00:17 +0200 From: Konstantin Belousov To: mmel@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343566 - in head/lib/libthr: . thread Message-ID: <20190204070017.GO24863@kib.kiev.ua> References: <201901292246.x0TMkjQH074121@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.2 (2019-01-07) 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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 07:00:26 -0000 On Mon, Feb 04, 2019 at 07:31:19AM +0100, Michal Meloun wrote: > On 29.01.2019 23:46, Konstantin Belousov wrote: > > Author: kib > > Date: Tue Jan 29 22:46:44 2019 > > New Revision: 343566 > > URL: https://svnweb.freebsd.org/changeset/base/343566 > > > > Log: > > Untangle jemalloc and mutexes initialization. > > > > The need to use libc malloc(3) from some places in libthr always > > caused issues. For instance, per-thread key allocation was switched to > > use plain mmap(2) to get storage, because some third party mallocs > > used keys for implementation of calloc(3). > > > > Even more important, libthr calls calloc(3) during initialization of > > pthread mutexes, and jemalloc uses pthread mutexes. Jemalloc provides > > some way to both postpone the initialization, and to make > > initialization to use specialized allocator, but this is very fragile > > and often breaks. See the referenced PR for another example. > > > > Add the small malloc implementation used by rtld, to libthr. Use it in > > thr_spec.c and for mutexes initialization. This avoids the issues with > > mutual dependencies between malloc and libthr in principle. The > > drawback is that some more allocations are not interceptable for > > alternate malloc implementations. There should be not too much memory > > use from this allocator, and the alternative, direct use of mmap(2) is > > obviously worse. > > > > PR: 235211 > > MFC after: 2 weeks > > Sponsored by: The FreeBSD Foundation > > Differential revision: https://reviews.freebsd.org/D18988 > > > This broke ARM static binaries (at least rescue/rescue). From first > look it seems that __pthread_mutex_init() invoked by atomic_init() is > called before curthread is set (before _thread_init_hack()). > > > root@tegra124:/usr/src # gdb --args > /usr/obj/usr/src/arm.armv7/rescue/rescue/rescue sh > ... > Reading symbols from /usr/obj/usr/src/arm.armv7/rescue/rescue/rescue...done. > (gdb) b _thread_init_hack > Breakpoint 1 at 0x67cad0: file /usr/src/lib/libthr/thread/thr_init.c, > line 296. > (gdb) r > Starting program: /usr/obj/usr/src/arm.armv7/rescue/rescue/rescue sh > > Program received signal SIGSEGV, Segmentation fault. > __thr_calloc (num=1, size=) at > /usr/src/lib/libthr/thread/thr_malloc.c:82 > 82 thr_malloc_lock(curthread); > (gdb) bt > #0 __thr_calloc (num=1, size=) at > /usr/src/lib/libthr/thread/thr_malloc.c:82 > #1 0x00676e1c in mutex_init (mutex=, > mutex_attr=, calloc_cb=) > at /usr/src/lib/libthr/thread/thr_mutex.c:294 > #2 __pthread_mutex_init (mutex=0xc6e948 , > mutex_attr=) at /usr/src/lib/libthr/thread/thr_mutex.c:393 > #3 0x001d41f0 in handle_static_init (argc=2, argv=, > env=) at /usr/src/lib/csu/common/ignore_init.c:124 > #4 0x001d40e8 in __start (argc=2, argv=, env= out>, ps_strings=, obj=0x0, cleanup=0x0) > at /usr/src/lib/csu/arm/crt1.c:112 > #5 0x001d4000 in ?? () > Backtrace stopped: previous frame identical to this frame (corrupt stack?) > (gdb) f 3 > #3 0x001d41f0 in handle_static_init (argc=2, argv=, > env=) at /usr/src/lib/csu/common/ignore_init.c:124 > 124 fn(argc, argv, env); > (gdb) list > 119 _init(); > 120 array_size = __init_array_end - __init_array_start; > 121 for (n = 0; n < array_size; n++) { > 122 fn = __init_array_start[n]; > 123 if ((uintptr_t)fn != 0 && (uintptr_t)fn != 1) > 124 fn(argc, argv, env); > 125 } > 126 } > (gdb) p n > $1 = 20 > (gdb) p fn > $6 = (void (*)(int, char **, char **)) 0x63f21c > (gdb) p (void *)&__init_array_start > $19 = (void *) 0xa7ab60 > (gdb) p (void *)&__init_array_end > $20 = (void *) 0xa7abc0 > (gdb) x/24a &__init_array_start > 0xa7ab60: 0x1d4270 > 0x2d926c <_$$hide$$ ifconfig.lo ifconfig_ctor> > 0x2d98e0 <_$$hide$$ ifconfig.lo link_ctor> > 0x2d9cb4 <_$$hide$$ ifconfig.lo inet_ctor> > 0xa7ab70: 0x2da2e0 <_$$hide$$ ifconfig.lo inet6_ctor> > 0x2db790 <_$$hide$$ ifconfig.lo clone_ctor> > 0x2dbb8c <_$$hide$$ ifconfig.lo mac_ctor> > 0x2dbe70 <_$$hide$$ ifconfig.lo ifmedia_ctor> > 0xa7ab80: 0x2dced0 <_$$hide$$ ifconfig.lo fib_ctor> > 0x2dd118 <_$$hide$$ ifconfig.lo vlan_ctor> > 0x2dd668 <_$$hide$$ ifconfig.lo vxlan_ctor> > 0x2df45c <_$$hide$$ ifconfig.lo gre_ctor> > 0xa7ab90: 0x2df6d8 <_$$hide$$ ifconfig.lo gif_ctor> > 0x2df874 <_$$hide$$ ifconfig.lo ipsec_ctor> > 0x2e2144 <_$$hide$$ ifconfig.lo ieee80211_ctor> > 0x2f0a10 <_$$hide$$ ifconfig.lo carp_ctor> > 0xa7aba0: 0x2f0e6c <_$$hide$$ ifconfig.lo group_ctor> > 0x2f199c <_$$hide$$ ifconfig.lo pfsync_ctor> > 0x2f1a04 <_$$hide$$ ifconfig.lo bridge_ctor> > 0x2f35dc <_$$hide$$ ifconfig.lo lagg_ctor> > 0xa7abb0: 0x63f21c > 0x67cad0 <_thread_init_hack> > 0x90e5b4 > 0x9a6b98 > > So it's clear that order of static constructors is invalid (moreover, I > thing that we are inside undefined area here). > Any idea/hint how to fix this. Try the following (I did not even compiled). It might require additional handling of NULL curthread in thr_malloc.c, in which case the locking should be elided. diff --git a/lib/libthr/thread/thr_malloc.c b/lib/libthr/thread/thr_malloc.c index 157c72f10d6..8b72a1840f7 100644 --- a/lib/libthr/thread/thr_malloc.c +++ b/lib/libthr/thread/thr_malloc.c @@ -46,6 +46,8 @@ void __thr_malloc_init(void) { + if (npagesizes != 0) + return; npagesizes = getpagesizes(pagesizes_d, nitems(pagesizes_d)); if (npagesizes == -1) { npagesizes = 1; diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c index f6f37c1264e..4db65384331 100644 --- a/lib/libthr/thread/thr_mutex.c +++ b/lib/libthr/thread/thr_mutex.c @@ -390,6 +390,7 @@ __pthread_mutex_init(pthread_mutex_t * __restrict mutex, } if (mutex_attr == NULL || (*mutex_attr)->m_pshared == PTHREAD_PROCESS_PRIVATE) { + __thr_malloc_init(); return (mutex_init(mutex, mutex_attr ? *mutex_attr : NULL, __thr_calloc)); } From owner-svn-src-head@freebsd.org Mon Feb 4 08:10:20 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE78414C2B6D; Mon, 4 Feb 2019 08:10:19 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 18E1972792; Mon, 4 Feb 2019 08:10:19 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wm1-x344.google.com with SMTP id t200so12376760wmt.0; Mon, 04 Feb 2019 00:10:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:reply-to:subject:to:cc:references:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language; bh=AOIaRjvSiujimDdLxR7bJ78wUB+WV7aWHfuybW8yeAo=; b=cNPCTmxV8W965ycyfVtszHOMKtUQRADLIWJL+uQyuBg647pSzyTrh/Xzl2Qh7188tg luPqlyF026zqxd5gMM9gKuPSlfi2AVegG6sSdmmKZDYZl+s9AwEnmXloAmRvkFboZx4t FO9ZoHultJTVgn9AGTZUaHY1dOlPhdlfy6+um7HumGno1l+zW6Pix4PetfndgYNQazIM +mJ87j3zPwTI0HlBayMr1AURO1eT5HmN0KuZlo4E3jXNEp4zJ/j8R/LeV/dywQsKXfeu z1cOAmrFQ1CyN1dgjG7ldKmcIPJmmGmWB5R0BTiPsklguaUkoQZcd8KqXstXPwEh+F78 MhvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:reply-to:subject:to:cc:references :openpgp:autocrypt:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=AOIaRjvSiujimDdLxR7bJ78wUB+WV7aWHfuybW8yeAo=; b=AxkkSV9i9IG6zYHtyADhp4VWagofkfOn268Mk1BqYHjb2YTq6KEdDQ/rJaQlob7iOg 9M434IKyekdk4Iml7erwzub+5PQNzuQxfgK8BTWsG1BD7x3IBuA4yHl3PXAVHbGSezH3 YKz8yHZMtghhbB8ow02misTSOm/4p0D+7FsYa/vrTKiefFtCU7+/qcnRlHYABmIwEaa0 plIJfxDi7jPEmzUSvV2SGVBlE3KQxqPlfBFk+zmP/4k+/+VQ/63YF+vDiDxqiUWQgv3x 5AfMtBc7ZqrB4zKwuPCPZ16PI5IE4zIVDYUTWQvHq/nM9MJbSjhMyNc1+Fpfr+kYxyKJ KmDw== X-Gm-Message-State: AHQUAuZUt6TnSP/X5IQ3ExZkAKN4vz/IZG6HE/nW3xNKj+zuhxK68ZZX p7ASSDxzat6GTCv9IXITyhwVTibJ X-Google-Smtp-Source: AHgI3IZFEXcTaQB1YEOdW1FX422HjU/dVQaItyZBxMnh0SQpX1wUDihdiQL/lEjfjcn+B5jINVn21w== X-Received: by 2002:a1c:cec1:: with SMTP id e184mr12609091wmg.75.1549267817658; Mon, 04 Feb 2019 00:10:17 -0800 (PST) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id m4sm10266168wmi.3.2019.02.04.00.10.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Feb 2019 00:10:16 -0800 (PST) Sender: Michal Meloun From: Michal Meloun X-Google-Original-From: Michal Meloun Reply-To: mmel@freebsd.org Subject: Re: svn commit: r343566 - in head/lib/libthr: . thread To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201901292246.x0TMkjQH074121@repo.freebsd.org> <20190204070017.GO24863@kib.kiev.ua> Openpgp: preference=signencrypt Autocrypt: addr=mmel@freebsd.org; prefer-encrypt=mutual; keydata= mQENBFYuVRkBCADZiwLCCne3wG9b9k+R2Neo5zVo2bLaZRfNNY/v9kg283i0sb1Da4EdEiNT 15El5UyozhphUIbIR/zrVpxF1TvvFdoCyzx6a68bNY2d9dBrDcNDZC+XnyDdHQoobN87DWT1 mRVkmbg9LHZ/SVUOkGYuWyE+8UYeDAcUizuXwSK5zFWmeTyIoWNa68ifrWLfQe0p4x5jC/AI VURCi17p360vU4fhgwoMvEEhrRBWCr4DYHToFjIt2WdBy3GR1qoO0+Xkd6G+OoBULo+XDfgu L2WdPvh0K69F9/LgHkMmG5Il7SCe62QGpG2vaCgRV7BQhLX+kxlvM+WrdRatWRml4Y/3ABEB AAG0IE1pY2hhbCBNZWxvdW4gPG1tZWxAZnJlZWJzZC5vcmc+iQFXBBMBCgBBAhsDBQsJCAcD BRUKCQgLBRYDAgEAAh4BAheAAhkBFiEEAN1KEEuAn+Apg413aR6ya17FqqoFAlw3aO8FCQ9v FVYACgkQaR6ya17FqqrIFwf/V/NRuAutw1cZ/HRCwfp00KY+8g730KwOaAMhPYvq8tqf8krD whFRWt9s4DSVTVJUC2dRZa5g1MS77iQL/WWzBUhJj7rW4uMpcKpi7UXi060sKrnE+1ZBvanG 8YCMTHKxQgQDD0cBqsyOAfrSA+Pyya3/HyAh1vvjQZfu5vWxA1X5NX5l5KtonprJ+ybVacwO W34yfWSX+ncx089JpUknenGdI+gVoKfa6uh/8YiCZTI5poxBttrOB8NGfylTsTTTbw2pkire Vkc87qq++I9bBNtTqWOZjB/3KBUd4q1veEUa4MS63TWtAvcEcsxHiBv4AH6npPO/iPycuGGh qldT1LkBDQRWLlUZAQgAuqBGR9LbUP86pYT2Zd+HZsiOun24LxPQwK6KZuysB0so02isa7ac T6t5uBfyfmdgzfvsc6dqU8bI65e8JtDwwVVF1Y4fF6cmNcmJqU10Gw5/bAu9re9JJWx2g/OJ tYMhwmqEE5DcS6GwgvJZI+9hgoSLL3mZ+GsO25NM4BhVH1o1AE4Q3O0HZMMnIzH+pma0augZ Xc3Qep17/Occ+1A7xEbn8VAYx8cwjkYUy7JyvVx4ecuj+i+uoCXhNhX5QdIcn4UMT1233Bcd yVZtZsLTI26ByFmrquGjkmN+/hra/s+nKfcegOKeHWVY/uFgDRk0TEYd6QuddZWo7+XMZLps wQARAQABiQElBBgBCgAPAhsMBQJZjBHDBQkHICOqAAoJEGkesmtexaqquysH/iDgRIrlMvFT GLyktZws/K/C03gWZ/tWwJV5+SFqRoasM+Z+9+cb44XA3rReqieLsYF5qSXTXHBPhEg1+9V9 KEPLpwektLtAv8zynN+6VVffwyRWQ4PIZmHCMT6PJP+Rk0DU6VrDc3ch58erduuyRDsbh32g 96nYMNvDsLhDvq44GPHLfglUHRY6wHo3IxAH2HosaWNC10R13JSrCdFnPMeIa+nSE+11hAdB mWpuPgVX2VNErtrwSBr7LsyCZ4yLO0bN5fKM0/Tavc9EcI9qDBrnts/EfZoCHhDtTMEFnQZM ybsMso20I/nxYPFuWuuFn7uQeoYrwWxt15SkN0RgtV2JATwEGAEKACYCGwwWIQQA3UoQS4Cf 4CmDjXdpHrJrXsWqqgUCXDdpmwUJD28WAgAKCRBpHrJrXsWqqtOrB/9Okk/dm2/mAs3tbA6l lKOZAwfUwBonwG7YhK9dOb5No/bJoY8G9s2IVXqwWKqCDv1qKC4M8pMXPD9fVsfNPG8GA1GZ rpZoZxHFteXZHoE1grpWypE0T3hp1W0hQNWXKv0MSuEMRVKU1m/iyLa10X7q8BaKtEDs35Xf DCh7eVg1vqiKtWyFn1u+y9Gy1Ztc/SKTs8mQvMYNUdBZuV6vN0VSz3I6wD9HVfo6Eo3M7cVp qqQ+KhrrGiCCYQPfZwpFAJSSgV3bR5O0BlNaGKJOoVTV1yexRbVEStswiFP8JFQp6U+S3nqE FFob7daQBLxi80oUVRn6eEdzR8tBhIy7sbeD Message-ID: <420b91ef-b318-100b-a0b3-99f29d03cea8@freebsd.org> Date: Mon, 4 Feb 2019 09:10:17 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190204070017.GO24863@kib.kiev.ua> Content-Type: multipart/mixed; boundary="------------98DC485539ACAB25B79005DB" Content-Language: en-US X-Rspamd-Queue-Id: 18E1972792 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.967,0]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 08:10:20 -0000 This is a multi-part message in MIME format. --------------98DC485539ACAB25B79005DB Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 04.02.2019 8:00, Konstantin Belousov wrote: > On Mon, Feb 04, 2019 at 07:31:19AM +0100, Michal Meloun wrote: >> On 29.01.2019 23:46, Konstantin Belousov wrote: >>> Author: kib >>> Date: Tue Jan 29 22:46:44 2019 >>> New Revision: 343566 >>> URL: https://svnweb.freebsd.org/changeset/base/343566 >>> >>> Log: >>> Untangle jemalloc and mutexes initialization. >>> >>> The need to use libc malloc(3) from some places in libthr always >>> caused issues. For instance, per-thread key allocation was switched to >>> use plain mmap(2) to get storage, because some third party mallocs >>> used keys for implementation of calloc(3). >>> >>> Even more important, libthr calls calloc(3) during initialization of >>> pthread mutexes, and jemalloc uses pthread mutexes. Jemalloc provides >>> some way to both postpone the initialization, and to make >>> initialization to use specialized allocator, but this is very fragile >>> and often breaks. See the referenced PR for another example. >>> >>> Add the small malloc implementation used by rtld, to libthr. Use it in >>> thr_spec.c and for mutexes initialization. This avoids the issues with >>> mutual dependencies between malloc and libthr in principle. The >>> drawback is that some more allocations are not interceptable for >>> alternate malloc implementations. There should be not too much memory >>> use from this allocator, and the alternative, direct use of mmap(2) is >>> obviously worse. >>> >>> PR: 235211 >>> MFC after: 2 weeks >>> Sponsored by: The FreeBSD Foundation >>> Differential revision: https://reviews.freebsd.org/D18988 >>> >> This broke ARM static binaries (at least rescue/rescue). From first >> look it seems that __pthread_mutex_init() invoked by atomic_init() is >> called before curthread is set (before _thread_init_hack()). >> >> >> root@tegra124:/usr/src # gdb --args >> /usr/obj/usr/src/arm.armv7/rescue/rescue/rescue sh >> ... >> Reading symbols from /usr/obj/usr/src/arm.armv7/rescue/rescue/rescue...done. >> (gdb) b _thread_init_hack >> Breakpoint 1 at 0x67cad0: file /usr/src/lib/libthr/thread/thr_init.c, >> line 296. >> (gdb) r >> Starting program: /usr/obj/usr/src/arm.armv7/rescue/rescue/rescue sh >> >> Program received signal SIGSEGV, Segmentation fault. >> __thr_calloc (num=1, size=) at >> /usr/src/lib/libthr/thread/thr_malloc.c:82 >> 82 thr_malloc_lock(curthread); >> (gdb) bt >> #0 __thr_calloc (num=1, size=) at >> /usr/src/lib/libthr/thread/thr_malloc.c:82 >> #1 0x00676e1c in mutex_init (mutex=, >> mutex_attr=, calloc_cb=) >> at /usr/src/lib/libthr/thread/thr_mutex.c:294 >> #2 __pthread_mutex_init (mutex=0xc6e948 , >> mutex_attr=) at /usr/src/lib/libthr/thread/thr_mutex.c:393 >> #3 0x001d41f0 in handle_static_init (argc=2, argv=, >> env=) at /usr/src/lib/csu/common/ignore_init.c:124 >> #4 0x001d40e8 in __start (argc=2, argv=, env=> out>, ps_strings=, obj=0x0, cleanup=0x0) >> at /usr/src/lib/csu/arm/crt1.c:112 >> #5 0x001d4000 in ?? () >> Backtrace stopped: previous frame identical to this frame (corrupt stack?) >> (gdb) f 3 >> #3 0x001d41f0 in handle_static_init (argc=2, argv=, >> env=) at /usr/src/lib/csu/common/ignore_init.c:124 >> 124 fn(argc, argv, env); >> (gdb) list >> 119 _init(); >> 120 array_size = __init_array_end - __init_array_start; >> 121 for (n = 0; n < array_size; n++) { >> 122 fn = __init_array_start[n]; >> 123 if ((uintptr_t)fn != 0 && (uintptr_t)fn != 1) >> 124 fn(argc, argv, env); >> 125 } >> 126 } >> (gdb) p n >> $1 = 20 >> (gdb) p fn >> $6 = (void (*)(int, char **, char **)) 0x63f21c >> (gdb) p (void *)&__init_array_start >> $19 = (void *) 0xa7ab60 >> (gdb) p (void *)&__init_array_end >> $20 = (void *) 0xa7abc0 >> (gdb) x/24a &__init_array_start >> 0xa7ab60: 0x1d4270 >> 0x2d926c <_$$hide$$ ifconfig.lo ifconfig_ctor> >> 0x2d98e0 <_$$hide$$ ifconfig.lo link_ctor> >> 0x2d9cb4 <_$$hide$$ ifconfig.lo inet_ctor> >> 0xa7ab70: 0x2da2e0 <_$$hide$$ ifconfig.lo inet6_ctor> >> 0x2db790 <_$$hide$$ ifconfig.lo clone_ctor> >> 0x2dbb8c <_$$hide$$ ifconfig.lo mac_ctor> >> 0x2dbe70 <_$$hide$$ ifconfig.lo ifmedia_ctor> >> 0xa7ab80: 0x2dced0 <_$$hide$$ ifconfig.lo fib_ctor> >> 0x2dd118 <_$$hide$$ ifconfig.lo vlan_ctor> >> 0x2dd668 <_$$hide$$ ifconfig.lo vxlan_ctor> >> 0x2df45c <_$$hide$$ ifconfig.lo gre_ctor> >> 0xa7ab90: 0x2df6d8 <_$$hide$$ ifconfig.lo gif_ctor> >> 0x2df874 <_$$hide$$ ifconfig.lo ipsec_ctor> >> 0x2e2144 <_$$hide$$ ifconfig.lo ieee80211_ctor> >> 0x2f0a10 <_$$hide$$ ifconfig.lo carp_ctor> >> 0xa7aba0: 0x2f0e6c <_$$hide$$ ifconfig.lo group_ctor> >> 0x2f199c <_$$hide$$ ifconfig.lo pfsync_ctor> >> 0x2f1a04 <_$$hide$$ ifconfig.lo bridge_ctor> >> 0x2f35dc <_$$hide$$ ifconfig.lo lagg_ctor> >> 0xa7abb0: 0x63f21c >> 0x67cad0 <_thread_init_hack> >> 0x90e5b4 >> 0x9a6b98 >> >> So it's clear that order of static constructors is invalid (moreover, I >> thing that we are inside undefined area here). >> Any idea/hint how to fix this. > > Try the following (I did not even compiled). It might require additional > handling of NULL curthread in thr_malloc.c, in which case the locking > should be elided. > > diff --git a/lib/libthr/thread/thr_malloc.c b/lib/libthr/thread/thr_malloc.c > index 157c72f10d6..8b72a1840f7 100644 > --- a/lib/libthr/thread/thr_malloc.c > +++ b/lib/libthr/thread/thr_malloc.c > @@ -46,6 +46,8 @@ void > __thr_malloc_init(void) > { > > + if (npagesizes != 0) > + return; > npagesizes = getpagesizes(pagesizes_d, nitems(pagesizes_d)); > if (npagesizes == -1) { > npagesizes = 1; > diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c > index f6f37c1264e..4db65384331 100644 > --- a/lib/libthr/thread/thr_mutex.c > +++ b/lib/libthr/thread/thr_mutex.c > @@ -390,6 +390,7 @@ __pthread_mutex_init(pthread_mutex_t * __restrict mutex, > } > if (mutex_attr == NULL || > (*mutex_attr)->m_pshared == PTHREAD_PROCESS_PRIVATE) { > + __thr_malloc_init(); > return (mutex_init(mutex, mutex_attr ? *mutex_attr : NULL, > __thr_calloc)); > } > Thanks for fast response. It works, but yes, additional handling of NULL curthread is required. The following patch fixes this issue for me (tested only on ARMv7). Can you, please, check it and eventually commit it? Thanks, Michal --------------98DC485539ACAB25B79005DB Content-Type: text/plain; charset=UTF-8; name="thread.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="thread.diff" SW5kZXg6IGxpYi9saWJ0aHIvdGhyZWFkL3Rocl9tYWxsb2MuYwo9PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0t LSBsaWIvbGlidGhyL3RocmVhZC90aHJfbWFsbG9jLmMJKHJldmlzaW9uIDM0MzczMikKKysr IGxpYi9saWJ0aHIvdGhyZWFkL3Rocl9tYWxsb2MuYwkod29ya2luZyBjb3B5KQpAQCAtNDUs NiArNDUsOCBAQAogdm9pZAogX190aHJfbWFsbG9jX2luaXQodm9pZCkKIHsKKwlpZiAobnBh Z2VzaXplcyAhPSAwKQorCQlyZXR1cm47CiAKIAlucGFnZXNpemVzID0gZ2V0cGFnZXNpemVz KHBhZ2VzaXplc19kLCBuaXRlbXMocGFnZXNpemVzX2QpKTsKIAlpZiAobnBhZ2VzaXplcyA9 PSAtMSkgewpAQCAtNTksNiArNjEsOCBAQAogdGhyX21hbGxvY19sb2NrKHN0cnVjdCBwdGhy ZWFkICpjdXJ0aHJlYWQpCiB7CiAKKwlpZiAoY3VydGhyZWFkID09IE5VTEwpCisJCXJldHVy bjsKIAljdXJ0aHJlYWQtPmxvY2tsZXZlbCsrOwogCV90aHJfdW11dGV4X2xvY2soJnRocl9t YWxsb2NfdW10eCwgVElEKGN1cnRocmVhZCkpOwogfQpAQCAtNjcsNiArNzEsOCBAQAogdGhy X21hbGxvY191bmxvY2soc3RydWN0IHB0aHJlYWQgKmN1cnRocmVhZCkKIHsKIAorCWlmIChj dXJ0aHJlYWQgPT0gTlVMTCkKKwkJcmV0dXJuOwogCV90aHJfdW11dGV4X3VubG9jaygmdGhy X21hbGxvY191bXR4LCBUSUQoY3VydGhyZWFkKSk7CiAJY3VydGhyZWFkLT5sb2NrbGV2ZWwt LTsKIAlfdGhyX2FzdChjdXJ0aHJlYWQpOwpJbmRleDogbGliL2xpYnRoci90aHJlYWQvdGhy X211dGV4LmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PQotLS0gbGliL2xpYnRoci90aHJlYWQvdGhyX211dGV4 LmMJKHJldmlzaW9uIDM0MzczMikKKysrIGxpYi9saWJ0aHIvdGhyZWFkL3Rocl9tdXRleC5j CSh3b3JraW5nIGNvcHkpCkBAIC0zOTAsNiArMzkwLDcgQEAKIAl9CiAJaWYgKG11dGV4X2F0 dHIgPT0gTlVMTCB8fAogCSAgICAoKm11dGV4X2F0dHIpLT5tX3BzaGFyZWQgPT0gUFRIUkVB RF9QUk9DRVNTX1BSSVZBVEUpIHsKKwkJX190aHJfbWFsbG9jX2luaXQoKTsKIAkJcmV0dXJu IChtdXRleF9pbml0KG11dGV4LCBtdXRleF9hdHRyID8gKm11dGV4X2F0dHIgOiBOVUxMLAog CQkgICAgX190aHJfY2FsbG9jKSk7CiAJfQo= --------------98DC485539ACAB25B79005DB-- From owner-svn-src-head@freebsd.org Mon Feb 4 13:30:48 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAB6E14D04E5; Mon, 4 Feb 2019 13:30:47 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 8CDA786D6C; Mon, 4 Feb 2019 13:30:47 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7BA656A29; Mon, 4 Feb 2019 13:30:47 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x14DUlFs029643; Mon, 4 Feb 2019 13:30:47 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x14DUl4B029642; Mon, 4 Feb 2019 13:30:47 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201902041330.x14DUl4B029642@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 4 Feb 2019 13:30:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343742 - head/lib/libsysdecode X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/lib/libsysdecode X-SVN-Commit-Revision: 343742 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8CDA786D6C 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.955,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 13:30:48 -0000 Author: tuexen Date: Mon Feb 4 13:30:47 2019 New Revision: 343742 URL: https://svnweb.freebsd.org/changeset/base/343742 Log: Add missing SCTP_EOR entry. MFC after: 3 days Modified: head/lib/libsysdecode/flags.c Modified: head/lib/libsysdecode/flags.c ============================================================================== --- head/lib/libsysdecode/flags.c Mon Feb 4 10:25:29 2019 (r343741) +++ head/lib/libsysdecode/flags.c Mon Feb 4 13:30:47 2019 (r343742) @@ -1208,7 +1208,7 @@ sysdecode_sctp_pr_policy(int policy) static struct name_table sctpsndflags[] = { X(SCTP_EOF) X(SCTP_ABORT) X(SCTP_UNORDERED) X(SCTP_ADDR_OVER) - X(SCTP_SENDALL) X(SCTP_SACK_IMMEDIATELY) XEND + X(SCTP_SENDALL) X(SCTP_EOR) X(SCTP_SACK_IMMEDIATELY) XEND }; bool From owner-svn-src-head@freebsd.org Mon Feb 4 16:02:05 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D65C14D3E4B; Mon, 4 Feb 2019 16:02:05 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 ED53C8C900; Mon, 4 Feb 2019 16:02:04 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C5F0B83D1; Mon, 4 Feb 2019 16:02:04 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x14G240Y015068; Mon, 4 Feb 2019 16:02:04 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x14G24bU015064; Mon, 4 Feb 2019 16:02:04 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201902041602.x14G24bU015064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Mon, 4 Feb 2019 16:02:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343744 - head/sys/powerpc/aim X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/powerpc/aim X-SVN-Commit-Revision: 343744 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ED53C8C900 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.967,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 16:02:05 -0000 Author: luporl Date: Mon Feb 4 16:02:03 2019 New Revision: 343744 URL: https://svnweb.freebsd.org/changeset/base/343744 Log: powerpc64: Add a trap stack area Currently, the trap code switches to the the temporary stack in the dbtrap section. It works in most cases, but in the beginning of the execution, the temp stack is being used, as starting in the powerpc_init() code. In this current scenario, the stack is being overwritten, which causes the return of breakpoint() to take abnormal execution. This current patchset create a small stack to use by the dbtrap: codepath avoiding the corruption of the temporary stack. PR: 224872 Submitted by: breno.leitao_gmail.com Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D14484 Modified: head/sys/powerpc/aim/locore32.S head/sys/powerpc/aim/locore64.S head/sys/powerpc/aim/trap_subr32.S head/sys/powerpc/aim/trap_subr64.S Modified: head/sys/powerpc/aim/locore32.S ============================================================================== --- head/sys/powerpc/aim/locore32.S Mon Feb 4 14:10:31 2019 (r343743) +++ head/sys/powerpc/aim/locore32.S Mon Feb 4 16:02:03 2019 (r343744) @@ -60,6 +60,12 @@ GLOBAL(__endkernel) GLOBAL(tmpstk) .space TMPSTKSZ +#ifdef KDB +#define TRAPSTKSZ 4096 /* 4k trap stack */ +GLOBAL(trapstk) + .space TRAPSTKSZ +#endif + .text .globl btext btext: Modified: head/sys/powerpc/aim/locore64.S ============================================================================== --- head/sys/powerpc/aim/locore64.S Mon Feb 4 14:10:31 2019 (r343743) +++ head/sys/powerpc/aim/locore64.S Mon Feb 4 16:02:03 2019 (r343744) @@ -65,6 +65,14 @@ GLOBAL(tmpstk) TOC_ENTRY(tmpstk) TOC_ENTRY(can_wakeup) +#ifdef KDB +#define TRAPSTKSZ 4096 /* 4k trap stack */ +GLOBAL(trapstk) + .space TRAPSTKSZ +TOC_ENTRY(trapstk) +#endif + + /* * Entry point for bootloaders that do not fully implement ELF and start * at the beginning of the image (kexec, notably). In its own section so Modified: head/sys/powerpc/aim/trap_subr32.S ============================================================================== --- head/sys/powerpc/aim/trap_subr32.S Mon Feb 4 14:10:31 2019 (r343743) +++ head/sys/powerpc/aim/trap_subr32.S Mon Feb 4 16:02:03 2019 (r343744) @@ -864,8 +864,8 @@ dbtrap: mtsprg3 %r1 lwz %r1,TRAP_TOCBASE(0) /* get new SP */ - lwz %r1,tmpstk@got(%r1) - addi %r1,%r1,TMPSTKSZ-16 + lwz %r1,trapstk@got(%r1) + addi %r1,%r1,TRAPSTKSZ-16 FRAME_SETUP(PC_DBSAVE) /* Call C trap code: */ Modified: head/sys/powerpc/aim/trap_subr64.S ============================================================================== --- head/sys/powerpc/aim/trap_subr64.S Mon Feb 4 14:10:31 2019 (r343743) +++ head/sys/powerpc/aim/trap_subr64.S Mon Feb 4 16:02:03 2019 (r343744) @@ -897,8 +897,8 @@ dbtrap: mtsprg3 %r1 GET_TOCBASE(%r1) /* get new SP */ - ld %r1,TOC_REF(tmpstk)(%r1) - addi %r1,%r1,(TMPSTKSZ-48) + ld %r1,TOC_REF(trapstk)(%r1) + addi %r1,%r1,(TRAPSTKSZ-48) FRAME_SETUP(PC_DBSAVE) /* Call C trap code: */ From owner-svn-src-head@freebsd.org Mon Feb 4 16:13:42 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B3B414D44B5; Mon, 4 Feb 2019 16:13:42 +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 271098D0ED; Mon, 4 Feb 2019 16:13:42 +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 1740586B0; Mon, 4 Feb 2019 16:13:42 +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 x14GDf4r022903; Mon, 4 Feb 2019 16:13:41 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x14GDf4k022902; Mon, 4 Feb 2019 16:13:41 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201902041613.x14GDf4k022902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 4 Feb 2019 16:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343745 - 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: 343745 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 271098D0ED 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.966,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 16:13:42 -0000 Author: mav Date: Mon Feb 4 16:13:41 2019 New Revision: 343745 URL: https://svnweb.freebsd.org/changeset/base/343745 Log: Add missed tunables/sysctls for some new vdev variables. While there, make few existing sysctls writeable, since there is no reason not to. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Feb 4 16:02:03 2019 (r343744) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Feb 4 16:13:41 2019 (r343745) @@ -165,29 +165,38 @@ static vdev_ops_t *vdev_ops_table[] = { /* target number of metaslabs per top-level vdev */ int vdev_max_ms_count = 200; -SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, max_ms_count, CTLFLAG_RDTUN, +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, max_ms_count, CTLFLAG_RWTUN, &vdev_max_ms_count, 0, - "Maximum number of metaslabs per top-level vdev"); + "Target number of metaslabs per top-level vdev"); /* minimum number of metaslabs per top-level vdev */ int vdev_min_ms_count = 16; -SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, min_ms_count, CTLFLAG_RDTUN, +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, min_ms_count, CTLFLAG_RWTUN, &vdev_min_ms_count, 0, "Minimum number of metaslabs per top-level vdev"); /* practical upper limit of total metaslabs per top-level vdev */ int vdev_ms_count_limit = 1ULL << 17; +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, max_ms_count_limit, CTLFLAG_RWTUN, + &vdev_ms_count_limit, 0, + "Maximum number of metaslabs per top-level vdev"); /* lower limit for metaslab size (512M) */ int vdev_default_ms_shift = 29; -SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, default_ms_shift, CTLFLAG_RDTUN, +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, default_ms_shift, CTLFLAG_RWTUN, &vdev_default_ms_shift, 0, - "Shift between vdev size and number of metaslabs"); + "Default shift between vdev size and number of metaslabs"); /* upper limit for metaslab size (256G) */ int vdev_max_ms_shift = 38; +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, max_ms_shift, CTLFLAG_RWTUN, + &vdev_max_ms_shift, 0, + "Maximal shift between vdev size and number of metaslabs"); boolean_t vdev_validate_skip = B_FALSE; +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, validate_skip, CTLFLAG_RWTUN, + &vdev_validate_skip, 0, + "Bypass vdev validation"); /* * Since the DTL space map of a vdev is not expected to have a lot of From owner-svn-src-head@freebsd.org Mon Feb 4 16:51:22 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB7D714D515A for ; Mon, 4 Feb 2019 16:51:22 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 153AA8E3E2 for ; Mon, 4 Feb 2019 16:51:22 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by mail-ed1-x534.google.com with SMTP id p6so488135eds.0 for ; Mon, 04 Feb 2019 08:51:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=OOuUnDf3sV4HXUipUZ4dYaU6gi6ZI49TFia3TefTgLw=; b=JSN48QOW4aT1kKIpYfTBmwf02c8rwa3fzPczXzHJVzor87PhjIxa7S0JVOSgG+yLk0 xh87zShFn62QZNINiggtGtX6npMCiOJ2LvyaQkIhNiJUUEaCAsE571qeBkqvdGUJC8Wy t0P/UyuwCb8mm2mRx2WRa7Y9rriNFz5kacU3tM28lDGd5uMZsIPfdtCMEUIYTfH1QAOj rCYFj3daVxd8stYtgtGrEC85RBHFwNw9qecXayW2l9/JJ0Ok2WVy9PsY24K1davimpYD f5VBn+7b6gjht/ESOKmeQpDH8wby3LeKvXVqhb3s8a/+iQR41OOezCFaYE98JRuCEeUx 823Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=OOuUnDf3sV4HXUipUZ4dYaU6gi6ZI49TFia3TefTgLw=; b=h0VG3VHnPNrO5wcIWi1j+/4P3jEfixLlPcCEZbwDJQknsDiz7u6/jTsQ6HuL3mVUyy NMxF7W94pZy1ysFBW5QCeSZ5WMGTz9VyKh3/GDVP1pRjxfMKjuCUjgUnnug6nisoIVxk MRKWI/5tj9r71m7T/VqZ5xrpQEnf9mbsFYzjbfXMS1Y/coAgFkCvJYUqMa2o0kvhzYx/ 8hLbJUyDoxUfYUW80VvZbErSqzDfM4lMO6uVcU5C3O73foZmtc3SRBrTbwP0c6thhe3c 1eN6XfK9+oOtPpddQaCjeThuI329IbCuwbomgYWm3ih2GeSJZwn5OLeU250Ei6J1O6pq QEtQ== X-Gm-Message-State: AHQUAubDptqCncrz3g9LMFCUcNJNKpR2ajJGJUMsPX1QZE+5W6yOO4ay 22+p1sSFaoiko1nMBVYWp9EYfI24f9INkQ== X-Google-Smtp-Source: AHgI3IZZqPoCZ1eciS9tmcJUfWUmIp/VK6dRbmp88wCJMCPIoG68TG6DAyqIkU4FC6XmT+cXigEBUg== X-Received: by 2002:a17:906:8249:: with SMTP id f9mr251754ejx.134.1549299080205; Mon, 04 Feb 2019 08:51:20 -0800 (PST) Received: from [10.44.128.75] ([161.12.40.153]) by smtp.gmail.com with ESMTPSA id l51sm4435903edb.36.2019.02.04.08.51.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Feb 2019 08:51:18 -0800 (PST) Subject: Re: svn commit: r343745 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs To: Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201902041613.x14GDf4k022902@repo.freebsd.org> From: Steven Hartland Message-ID: Date: Mon, 4 Feb 2019 16:51:20 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <201902041613.x14GDf4k022902@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 153AA8E3E2 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.983,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 16:51:22 -0000 On 04/02/2019 16:13, Alexander Motin wrote: > Author: mav > Date: Mon Feb 4 16:13:41 2019 > New Revision: 343745 > URL: https://svnweb.freebsd.org/changeset/base/343745 > > Log: > Add missed tunables/sysctls for some new vdev variables. > > While there, make few existing sysctls writeable, since there is no reason > not to. > > MFC after: 1 week > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Feb 4 16:02:03 2019 (r343744) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Feb 4 16:13:41 2019 (r343745) > @@ -165,29 +165,38 @@ static vdev_ops_t *vdev_ops_table[] = { > > /* target number of metaslabs per top-level vdev */ > int vdev_max_ms_count = 200; > -SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, max_ms_count, CTLFLAG_RDTUN, > +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, max_ms_count, CTLFLAG_RWTUN, > &vdev_max_ms_count, 0, > - "Maximum number of metaslabs per top-level vdev"); > + "Target number of metaslabs per top-level vdev"); > > /* minimum number of metaslabs per top-level vdev */ > int vdev_min_ms_count = 16; > -SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, min_ms_count, CTLFLAG_RDTUN, > +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, min_ms_count, CTLFLAG_RWTUN, > &vdev_min_ms_count, 0, > "Minimum number of metaslabs per top-level vdev"); > > /* practical upper limit of total metaslabs per top-level vdev */ > int vdev_ms_count_limit = 1ULL << 17; > +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, max_ms_count_limit, CTLFLAG_RWTUN, > + &vdev_ms_count_limit, 0, > + "Maximum number of metaslabs per top-level vdev"); > > /* lower limit for metaslab size (512M) */ > int vdev_default_ms_shift = 29; > -SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, default_ms_shift, CTLFLAG_RDTUN, > +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, default_ms_shift, CTLFLAG_RWTUN, > &vdev_default_ms_shift, 0, > - "Shift between vdev size and number of metaslabs"); > + "Default shift between vdev size and number of metaslabs"); > > /* upper limit for metaslab size (256G) */ > int vdev_max_ms_shift = 38; > +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, max_ms_shift, CTLFLAG_RWTUN, > + &vdev_max_ms_shift, 0, > + "Maximal shift between vdev size and number of metaslabs"); It's a just a nit but I believe this should Maximum, like the others, instead of Maximal. > > boolean_t vdev_validate_skip = B_FALSE; > +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, validate_skip, CTLFLAG_RWTUN, > + &vdev_validate_skip, 0, > + "Bypass vdev validation"); > > /* > * Since the DTL space map of a vdev is not expected to have a lot of > From owner-svn-src-head@freebsd.org Mon Feb 4 16:55:25 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BB9C14D52D0; Mon, 4 Feb 2019 16:55:25 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 21B438E725; Mon, 4 Feb 2019 16:55:25 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0602D8D74; Mon, 4 Feb 2019 16:55:25 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x14GtOAf046074; Mon, 4 Feb 2019 16:55:24 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x14GtOIr046072; Mon, 4 Feb 2019 16:55:24 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201902041655.x14GtOIr046072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 4 Feb 2019 16:55:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343746 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 343746 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 21B438E725 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]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 16:55:25 -0000 Author: andrew Date: Mon Feb 4 16:55:24 2019 New Revision: 343746 URL: https://svnweb.freebsd.org/changeset/base/343746 Log: Only enable trace-cmp on Clang and modern GCC. It's was only added to GCC 8.1 so don't try to enable it for earlier releases. Reported by: lwhsu Sponsored by: DARPA, AFRL Modified: head/sys/conf/files head/sys/conf/kern.pre.mk Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Feb 4 16:13:41 2019 (r343745) +++ head/sys/conf/files Mon Feb 4 16:55:24 2019 (r343746) @@ -3808,7 +3808,7 @@ kern/kern_idle.c standard kern/kern_intr.c standard kern/kern_jail.c standard kern/kern_kcov.c optional kcov \ - compile-with "${NORMAL_C} -fno-sanitize-coverage=trace-pc,trace-cmp" + compile-with "${NORMAL_C} -fno-sanitize=all" kern/kern_khelp.c standard kern/kern_kthread.c standard kern/kern_ktr.c optional ktr Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Mon Feb 4 16:13:41 2019 (r343745) +++ head/sys/conf/kern.pre.mk Mon Feb 4 16:55:24 2019 (r343746) @@ -120,7 +120,12 @@ SAN_CFLAGS+= -fsanitize=undefined COVERAGE_ENABLED!= grep COVERAGE opt_global.h || true ; echo .if !empty(COVERAGE_ENABLED) +.if ${COMPILER_TYPE} == "clang" || \ + (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 80100) SAN_CFLAGS+= -fsanitize-coverage=trace-pc,trace-cmp +.else +SAN_CFLAGS+= -fsanitize-coverage=trace-pc +.endif .endif CFLAGS+= ${SAN_CFLAGS} From owner-svn-src-head@freebsd.org Mon Feb 4 16:56:21 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FFDC14D532D; Mon, 4 Feb 2019 16:56:21 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id 3A86A8E886; Mon, 4 Feb 2019 16:56:21 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from [IPv6:2001:630:212:2a8:fd2e:3743:2e77:56f4] (unknown [IPv6:2001:630:212:2a8:fd2e:3743:2e77:56f4]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id 897114E691; Mon, 4 Feb 2019 16:55:41 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) Subject: Re: svn commit: r343713 - in head/sys: amd64/conf arm64/conf From: Andrew Turner In-Reply-To: Date: Mon, 4 Feb 2019 16:55:40 +0000 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <078B413A-80B9-4467-8E32-3D0DB7EDE32B@freebsd.org> References: <201902031246.x13CkRY5049231@repo.freebsd.org> To: Li-Wen Hsu X-Mailer: Apple Mail (2.3445.100.39) X-Rspamd-Queue-Id: 3A86A8E886 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.91 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.91)[-0.909,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 16:56:21 -0000 This should be fixed in r343746. Andrew > On 4 Feb 2019, at 05:28, Li-Wen Hsu wrote: >=20 > On Sun, Feb 3, 2019 at 8:46 PM Andrew Turner = wrote: >>=20 >> Author: andrew >> Date: Sun Feb 3 12:46:27 2019 >> New Revision: 343713 >> URL: https://svnweb.freebsd.org/changeset/base/343713 >>=20 >> Log: >> Enable COVERAGE and KCOV by default on arm64 and amd64. >>=20 >> This allows userspace to trace the kernel using the coverage = sanitizer >> found in clang. It will also allow other coverage tools to be built = as >> modules and attach into the same framework. >>=20 >> Sponsored by: DARPA, AFRL >>=20 >> Modified: >> head/sys/amd64/conf/GENERIC >> head/sys/arm64/conf/GENERIC >>=20 >> Modified: head/sys/amd64/conf/GENERIC >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/amd64/conf/GENERIC Sun Feb 3 11:41:43 2019 = (r343712) >> +++ head/sys/amd64/conf/GENERIC Sun Feb 3 12:46:27 2019 = (r343713) >> @@ -102,8 +102,8 @@ options MALLOC_DEBUG_MAXZONES=3D8 # Separate = malloc(9) >> options VERBOSE_SYSINIT=3D0 # Support = debug.verbose_sysinit, off by default >>=20 >> # Kernel Sanitizers >> -#options COVERAGE # Generic kernel coverage. = Used by KCOV >> -#options KCOV # Kernel Coverage Sanitizer >> +options COVERAGE # Generic kernel coverage. = Used by KCOV >> +options KCOV # Kernel Coverage Sanitizer >> # Warning: KUBSAN can result in a kernel too large for loader to load >> #options KUBSAN # Kernel Undefined Behavior = Sanitizer >>=20 >>=20 >> Modified: head/sys/arm64/conf/GENERIC >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/arm64/conf/GENERIC Sun Feb 3 11:41:43 2019 = (r343712) >> +++ head/sys/arm64/conf/GENERIC Sun Feb 3 12:46:27 2019 = (r343713) >> @@ -94,8 +94,8 @@ options USB_DEBUG # enable = debug msgs >> options VERBOSE_SYSINIT=3D0 # Support = debug.verbose_sysinit, off by default >>=20 >> # Kernel Sanitizers >> -#options COVERAGE # Generic kernel coverage. = Used by KCOV >> -#options KCOV # Kernel Coverage Sanitizer >> +options COVERAGE # Generic kernel coverage. = Used by KCOV >> +options KCOV # Kernel Coverage Sanitizer >> # Warning: KUBSAN can result in a kernel too large for loader to load >> #options KUBSAN # Kernel Undefined Behavior = Sanitizer >=20 > This breaks gcc build: > https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/8781/console : >=20 > x86_64-unknown-freebsd12.0-gcc: error: unrecognized command line > option '-fsanitize-coverage=3Dtrace-pc,trace-cmp'; did you mean > '-fsanitize-coverage=3Dtrace-pc'? >=20 > We probably need to adjust arguments passed to gcc. >=20 > Li-Wen >=20 From owner-svn-src-head@freebsd.org Mon Feb 4 18:07:04 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 576A614ABA84; Mon, 4 Feb 2019 18:07:04 +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 EDA096AFC5; Mon, 4 Feb 2019 18:07:03 +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 D95319972; Mon, 4 Feb 2019 18:07:03 +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 x14I73wh083459; Mon, 4 Feb 2019 18:07:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x14I73Ig083458; Mon, 4 Feb 2019 18:07:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201902041807.x14I73Ig083458@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 4 Feb 2019 18:07:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343748 - head/sys/i386/i386 X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/sys/i386/i386 X-SVN-Commit-Revision: 343748 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EDA096AFC5 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)[-0.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 18:07:04 -0000 Author: dim Date: Mon Feb 4 18:07:03 2019 New Revision: 343748 URL: https://svnweb.freebsd.org/changeset/base/343748 Log: Use NLDT to get number of LDTs on i386 Compiling a GENERIC kernel for i386 with clang 8.0 results in the following warning: /usr/src/sys/i386/i386/sys_machdep.c:542:40: error: 'sizeof ((ldt))' will return the size of the pointer, not the array itself [-Werror,-Wsizeof-pointer-div] nldt = pldt != NULL ? pldt->ldt_len : nitems(ldt); ^~~~~~~~~~~ /usr/src/sys/sys/param.h:299:32: note: expanded from macro 'nitems' #define nitems(x) (sizeof((x)) / sizeof((x)[0])) ~~~~~~~~~~~ ^ Indeed, 'ldt' is declared as 'union descriptor *', so nitems() is not the right way to determine the number of LDTs. Instead, the NLDT define from sys/x86/include/segments.h should be used. Reviewed by: kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D19074 Modified: head/sys/i386/i386/sys_machdep.c Modified: head/sys/i386/i386/sys_machdep.c ============================================================================== --- head/sys/i386/i386/sys_machdep.c Mon Feb 4 17:53:29 2019 (r343747) +++ head/sys/i386/i386/sys_machdep.c Mon Feb 4 18:07:03 2019 (r343748) @@ -539,7 +539,7 @@ i386_get_ldt(struct thread *td, struct i386_ldt_args * data = malloc(num * sizeof(union descriptor), M_TEMP, M_WAITOK); mtx_lock_spin(&dt_lock); pldt = td->td_proc->p_md.md_ldt; - nldt = pldt != NULL ? pldt->ldt_len : nitems(ldt); + nldt = pldt != NULL ? pldt->ldt_len : NLDT; if (uap->start >= nldt) { num = 0; } else { From owner-svn-src-head@freebsd.org Mon Feb 4 18:29:24 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33ADF14ADF2E; Mon, 4 Feb 2019 18:29:24 +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 C52806C556; Mon, 4 Feb 2019 18:29:23 +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 B3A7E9CD8; Mon, 4 Feb 2019 18:29:23 +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 x14ITNqs094389; Mon, 4 Feb 2019 18:29:23 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x14ITNM1094388; Mon, 4 Feb 2019 18:29:23 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201902041829.x14ITNM1094388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 4 Feb 2019 18:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343749 - head/release/arm64 X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/release/arm64 X-SVN-Commit-Revision: 343749 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C52806C556 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.984,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 18:29:24 -0000 Author: manu Date: Mon Feb 4 18:29:23 2019 New Revision: 343749 URL: https://svnweb.freebsd.org/changeset/base/343749 Log: release: arm64: rpi3: Install the RPI3B+ DTB file We should use the correct DTB file otherwise the firmware uses the RPI3B one. MFC after: 1 week Modified: head/release/arm64/RPI3.conf Modified: head/release/arm64/RPI3.conf ============================================================================== --- head/release/arm64/RPI3.conf Mon Feb 4 18:07:03 2019 (r343748) +++ head/release/arm64/RPI3.conf Mon Feb 4 18:29:23 2019 (r343749) @@ -4,7 +4,7 @@ # DTB_DIR="/usr/local/share/rpi-firmware" -DTB="bcm2710-rpi-3-b.dtb" +DTB="bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b-plus.dtb" EMBEDDED_TARGET_ARCH="aarch64" EMBEDDED_TARGET="arm64" EMBEDDEDBUILD=1 From owner-svn-src-head@freebsd.org Mon Feb 4 18:30:48 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9532514AE01B; Mon, 4 Feb 2019 18:30:48 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 35E516C709; Mon, 4 Feb 2019 18:30:48 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2699F9DF9; Mon, 4 Feb 2019 18:30:48 +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 x14IUmVl095316; Mon, 4 Feb 2019 18:30:48 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x14IUmF6095315; Mon, 4 Feb 2019 18:30:48 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201902041830.x14IUmF6095315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 4 Feb 2019 18:30:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343750 - head/release/arm64 X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/release/arm64 X-SVN-Commit-Revision: 343750 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 35E516C709 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.984,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 18:30:48 -0000 Author: manu Date: Mon Feb 4 18:30:47 2019 New Revision: 343750 URL: https://svnweb.freebsd.org/changeset/base/343750 Log: release: arm64: pine64-lts: Use the newly created u-boot-pine64-lts port In U-Boot 2019.01 there is now a config for this board, use it for the release image. MFC after: 1 week Modified: head/release/arm64/PINE64-LTS.conf Modified: head/release/arm64/PINE64-LTS.conf ============================================================================== --- head/release/arm64/PINE64-LTS.conf Mon Feb 4 18:29:23 2019 (r343749) +++ head/release/arm64/PINE64-LTS.conf Mon Feb 4 18:30:47 2019 (r343750) @@ -6,7 +6,7 @@ EMBEDDED_TARGET_ARCH="aarch64" EMBEDDED_TARGET="arm64" EMBEDDEDBUILD=1 -EMBEDDEDPORTS="sysutils/u-boot-sopine" +EMBEDDEDPORTS="sysutils/u-boot-pine64-lts" FAT_SIZE="54m -b 1m" FAT_TYPE="16" IMAGE_SIZE="2560M" @@ -18,7 +18,7 @@ FDT_OVERLAYS="sun50i-a64-sid,sun50i-a64-ths,sun50i-a64 export BOARDNAME="PINE64-LTS" arm_install_uboot() { - UBOOT_DIR="/usr/local/share/u-boot/u-boot-sopine" + UBOOT_DIR="/usr/local/share/u-boot/u-boot-pine64-lts" UBOOT_FILES="u-boot-sunxi-with-spl.bin" chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/${UBOOT_FILES} \ of=/dev/${mddev} bs=1k seek=8 conv=sync From owner-svn-src-head@freebsd.org Mon Feb 4 19:12:46 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0341F14AEF61; Mon, 4 Feb 2019 19:12:46 +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 999676DBF8; Mon, 4 Feb 2019 19:12:45 +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 87E4DA520; Mon, 4 Feb 2019 19:12:45 +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 x14JCjYC020270; Mon, 4 Feb 2019 19:12:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x14JCjBd020269; Mon, 4 Feb 2019 19:12:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201902041912.x14JCjBd020269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Mon, 4 Feb 2019 19:12:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343751 - head/lib/libc/tests/sys X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/lib/libc/tests/sys X-SVN-Commit-Revision: 343751 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 999676DBF8 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)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 19:12:46 -0000 Author: ngie Date: Mon Feb 4 19:12:45 2019 New Revision: 343751 URL: https://svnweb.freebsd.org/changeset/base/343751 Log: 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 Reviewed by: asomers, lwhsu Approved by: emaste (mentor) MFC after: 2 weeks MFC with: r343362, r343365, r343367-r343368, r343461 Differential Revision: https://reviews.freebsd.org/D19026 Modified: head/lib/libc/tests/sys/sendfile_test.c Modified: head/lib/libc/tests/sys/sendfile_test.c ============================================================================== --- head/lib/libc/tests/sys/sendfile_test.c Mon Feb 4 18:30:47 2019 (r343750) +++ head/lib/libc/tests/sys/sendfile_test.c Mon Feb 4 19:12:45 2019 (r343751) @@ -97,22 +97,31 @@ 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(error)); free(serv); From owner-svn-src-head@freebsd.org Mon Feb 4 20:09:23 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C64F14B0A7E; Mon, 4 Feb 2019 20:09:23 +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 2B77670195; Mon, 4 Feb 2019 20:09:23 +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 20453ADAD; Mon, 4 Feb 2019 20:09:23 +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 x14K9NM5048158; Mon, 4 Feb 2019 20:09:23 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x14K9N0e048157; Mon, 4 Feb 2019 20:09:23 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201902042009.x14K9N0e048157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 4 Feb 2019 20:09:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343752 - 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: 343752 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2B77670195 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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 20:09:23 -0000 Author: mav Date: Mon Feb 4 20:09:22 2019 New Revision: 343752 URL: https://svnweb.freebsd.org/changeset/base/343752 Log: s/Maximal/Maximum/ in sysctl description. Submitted by: smh MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Feb 4 19:12:45 2019 (r343751) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Feb 4 20:09:22 2019 (r343752) @@ -191,7 +191,7 @@ SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, default_ms_shift, int vdev_max_ms_shift = 38; SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, max_ms_shift, CTLFLAG_RWTUN, &vdev_max_ms_shift, 0, - "Maximal shift between vdev size and number of metaslabs"); + "Maximum shift between vdev size and number of metaslabs"); boolean_t vdev_validate_skip = B_FALSE; SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, validate_skip, CTLFLAG_RWTUN, From owner-svn-src-head@freebsd.org Mon Feb 4 20:10:01 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A069714B0B09; Mon, 4 Feb 2019 20:10:01 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E04CE702D6; Mon, 4 Feb 2019 20:10:00 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x14K9v64037930; Mon, 4 Feb 2019 12:09:57 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x14K9vIJ037929; Mon, 4 Feb 2019 12:09:57 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201902042009.x14K9vIJ037929@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r343751 - head/lib/libc/tests/sys In-Reply-To: <201902041912.x14JCjBd020269@repo.freebsd.org> To: Enji Cooper Date: Mon, 4 Feb 2019 12:09:57 -0800 (PST) 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: E04CE702D6 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]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 20:10:01 -0000 > Author: ngie > Date: Mon Feb 4 19:12:45 2019 > New Revision: 343751 > URL: https://svnweb.freebsd.org/changeset/base/343751 > > Log: > 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. If it can not get to a resolver, it should be falling back to /etc/hosts whch does have the correct entries for localhost. > > PR: 235200 > Reviewed by: asomers, lwhsu > Approved by: emaste (mentor) > MFC after: 2 weeks > MFC with: r343362, r343365, r343367-r343368, r343461 > Differential Revision: https://reviews.freebsd.org/D19026 > > Modified: > head/lib/libc/tests/sys/sendfile_test.c > > Modified: head/lib/libc/tests/sys/sendfile_test.c > ============================================================================== > --- head/lib/libc/tests/sys/sendfile_test.c Mon Feb 4 18:30:47 2019 (r343750) > +++ head/lib/libc/tests/sys/sendfile_test.c Mon Feb 4 19:12:45 2019 (r343751) > @@ -97,22 +97,31 @@ 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(error)); > free(serv); -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Mon Feb 4 20:13:53 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C294F14B0E0A; Mon, 4 Feb 2019 20:13:53 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 209CE70749; Mon, 4 Feb 2019 20:13:53 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pl1-x644.google.com with SMTP id b5so448354plr.4; Mon, 04 Feb 2019 12:13:53 -0800 (PST) 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=uTga1PVbLc7860h/xXknF2BDhOOPg4PPmCq1idadsJg=; b=EjVjXiTHsO861fMd6d1CP4cSqoKqnvMXfJGxR3foDSgNtrx1cPfelw0GVit+Oy97m9 ACpY9UCOyvO0M7VqFmL9ixkXUfBqOD4O2cycsAIxvakJN6ECj9ameltCdGoOxksckn3F qNWjn9gE4cPiLUaMFfwarhQyOlgCZC6yZEnKDWOihba09xHv42yyZFm2DgZB3Q20sBDi NU4ae3DngmtUeJ48l57Pc63Y0UiXThrEUpmx+jbBfLX4/zo6knfq2tlfMUCB/YJzO8Po wZOSdVJrDJCViQx3ddgLmxIMrtHZArvt8qY28qav2TnswAVrBgapZ4sfbVTpivzAUG2g IuVQ== 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=uTga1PVbLc7860h/xXknF2BDhOOPg4PPmCq1idadsJg=; b=Xc8UMKQ5+LS6zwSwOTm76SndYvtTA2NrpPfn//HVnPFDw/JYoR+MowgKobbyLI+umv JrPQT0YlyoTF142ORt92c0BEUD2ph8AasW4TVVeT1R6k9WuxQ4uBr41aQUI1gnXakn99 nNtteY3u0tqXnZtOGjsYzvLXA9lIauy8JJ3uRO/n5DchRSo2xSNxyc82uAsZ2OObkugt GpjRdgzEtKPvIZblX3f30CnP0FDNLC2+SZ4QnwCfOymKbynoW5jm8qxKDZQ0t+QBHuD9 6kLfv+yl+foNqk9KG7sldCZvQhNJB68JQRrceVYY2+F65IAE3kLfziL+IHAGiHcSpLJU 590A== X-Gm-Message-State: AHQUAubuBntQy+jhAYAcY79lcdP0PzZXlaRZUs9CHq9lnlA/L/OQoEXY UG6dcSYonV5teGnXoWhvK6Er0d4d X-Google-Smtp-Source: AHgI3IbzNEqx6Tmpj9QCixLdqsUWLPX/NUp75t25WvaBAFDw6mDIqRCYLJZim4ZtTSen2WeHkPGXQQ== X-Received: by 2002:a17:902:a60f:: with SMTP id u15mr1101481plq.275.1549311231887; Mon, 04 Feb 2019 12:13:51 -0800 (PST) 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 w184sm1065403pgd.34.2019.02.04.12.13.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Feb 2019 12:13:51 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: svn commit: r343751 - head/lib/libc/tests/sys From: Enji Cooper In-Reply-To: <201902042009.x14K9vIJ037929@pdx.rh.CN85.dnsmgr.net> Date: Mon, 4 Feb 2019 12:13:50 -0800 Cc: Enji Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <3CF9638D-9799-4176-97C7-A17A12B0DEC4@gmail.com> References: <201902042009.x14K9vIJ037929@pdx.rh.CN85.dnsmgr.net> To: rgrimes@freebsd.org X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: 209CE70749 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.968,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 20:13:54 -0000 > On Feb 4, 2019, at 12:09 PM, Rodney W. Grimes = wrote: >=20 >> Author: ngie >> Date: Mon Feb 4 19:12:45 2019 >> New Revision: 343751 >> URL: https://svnweb.freebsd.org/changeset/base/343751 >>=20 >> Log: >> Avoid the DNS lookup for "localhost" >>=20 >> 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. >=20 > If it can not get to a resolver, it should be falling back to > /etc/hosts whch does have the correct entries for localhost. Please continue this thread of discussion on Phabricator. This was already discussed sort of there. As I said before (when it was = commented on by @emaste): >> In D19026#407184, @emaste wrote: >> I don't object to this patch but shouldn't we be able to prevent any = DNS use via nsswitch.conf? >> That would require everyone make a corresponding change to prevent = any DNS use when running this test. > It's better to focus on what needs to be tested, instead of what's = nice to test by side-effect. There are other tests that exercise DNS = lookups (which currently fail after a long timeout due to a lacking = external connection). > This is a quick hack to set this test on a working path. The right = path is the suggestion @asomers provided in the previous review, to use = if_tap. Thanks -Enji= From owner-svn-src-head@freebsd.org Mon Feb 4 20:46:58 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00E7814B1ACF; Mon, 4 Feb 2019 20:46:58 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 A70B97188B; Mon, 4 Feb 2019 20:46:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8DBC0B453; Mon, 4 Feb 2019 20:46:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x14KkvTi068647; Mon, 4 Feb 2019 20:46:57 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x14Kkvcp068646; Mon, 4 Feb 2019 20:46:57 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201902042046.x14Kkvcp068646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Mon, 4 Feb 2019 20:46:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343753 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 343753 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A70B97188B 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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 20:46:58 -0000 Author: marius Date: Mon Feb 4 20:46:57 2019 New Revision: 343753 URL: https://svnweb.freebsd.org/changeset/base/343753 Log: o As illustrated by e. g. figure 7-14 of the Intel 82599 10 GbE controller datasheet revision 3.3, in the context of Ethernet MACs the control data describing the packet buffers typically are named "descriptors". Each of these descriptors references one buffer, multiple of which a packet can be composed of. By contrast, in comments, messages and the names of structure members, iflib(4) refers to DMA resources employed for RX and TX buffers (rather than control data) as "desc(riptors)". This odd naming convention of iflib(4) made reviewing r343085 and identifying wrong and missing bus_dmamap_sync(9) calls in particular way harder than it already is. This convention may also explain why the netmap(4) part of iflib(4) pairs the DMA tags for control data with DMA maps of buffers and vice versa in calls to bus_dma(9) functions. Therefore, change iflib(4) to refer to buf(fers) when buffers and not the usual understanding of descriptors is meant. This change does not include corrections to the DMA resources used in the netmap(4) parts. However, it revises error messages to state which kind of allocation/creation failed. Specifically, the "Unable to allocate tx_buffer (map) memory" copy & pasted inappropriately on several occasions was replaced with proper messages. o Enhance some other error messages to indicate which half - RX or TX - they apply to instead of using identical text in both cases and generally canonicalize them. o Correct the descriptions of iflib_{r,t}xsd_alloc() to reflect reality; current code doesn't use {r,t}x_buffer structures. o In iflib_queues_alloc(): - Remove redundant BUS_DMA_NOWAIT of iflib_dma_alloc() calls, - change the M_WAITOK from malloc(9) calls into M_NOWAIT. The return values are already checked, deferred DMA allocations not being an option at this point, BUS_DMA_NOWAIT has to be used anyway and prior malloc(9) calls in this function also specify M_NOWAIT. Reviewed by: shurd Differential Revision: https://reviews.freebsd.org/D19067 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Mon Feb 4 20:09:22 2019 (r343752) +++ head/sys/net/iflib.c Mon Feb 4 20:46:57 2019 (r343753) @@ -353,8 +353,8 @@ struct iflib_txq { uint8_t ift_closed; uint8_t ift_update_freq; struct iflib_filter_info ift_filter_info; - bus_dma_tag_t ift_desc_tag; - bus_dma_tag_t ift_tso_desc_tag; + bus_dma_tag_t ift_buf_tag; + bus_dma_tag_t ift_tso_buf_tag; iflib_dma_info_t ift_ifdi; #define MTX_NAME_LEN 16 char ift_mtx_name[MTX_NAME_LEN]; @@ -389,7 +389,7 @@ struct iflib_fl { iflib_rxsd_array_t ifl_sds; iflib_rxq_t ifl_rxq; uint8_t ifl_id; - bus_dma_tag_t ifl_desc_tag; + bus_dma_tag_t ifl_buf_tag; iflib_dma_info_t ifl_ifdi; uint64_t ifl_bus_addrs[IFLIB_MAX_RX_REFRESH] __aligned(CACHE_LINE_SIZE); caddr_t ifl_vm_addrs[IFLIB_MAX_RX_REFRESH]; @@ -922,10 +922,9 @@ iflib_netmap_txsync(struct netmap_kring *kring, int fl if_ctx_t ctx = ifp->if_softc; iflib_txq_t txq = &ctx->ifc_txqs[kring->ring_id]; - bus_dmamap_sync(txq->ift_desc_tag, txq->ift_ifdi->idi_map, + bus_dmamap_sync(txq->ift_buf_tag, txq->ift_ifdi->idi_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - /* * First part: process new packets to send. * nm_i is the current index in the netmap kring, @@ -992,7 +991,8 @@ iflib_netmap_txsync(struct netmap_kring *kring, int fl if (slot->flags & NS_BUF_CHANGED) { /* buffer has changed, reload map */ - netmap_reload_map(na, txq->ift_desc_tag, txq->ift_sds.ifsd_map[nic_i], addr); + netmap_reload_map(na, txq->ift_buf_tag, + txq->ift_sds.ifsd_map[nic_i], addr); } /* make sure changes to the buffer are synced */ bus_dmamap_sync(txq->ift_ifdi->idi_tag, txq->ift_sds.ifsd_map[nic_i], @@ -1005,7 +1005,7 @@ iflib_netmap_txsync(struct netmap_kring *kring, int fl kring->nr_hwcur = nm_i; /* synchronize the NIC ring */ - bus_dmamap_sync(txq->ift_desc_tag, txq->ift_ifdi->idi_map, + bus_dmamap_sync(txq->ift_buf_tag, txq->ift_ifdi->idi_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); /* (re)start the tx unit up to slot nic_i (excluded) */ @@ -1072,8 +1072,9 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int fl for (i = 0, fl = rxq->ifr_fl; i < rxq->ifr_nfl; i++, fl++) { if (fl->ifl_sds.ifsd_map == NULL) continue; - bus_dmamap_sync(rxq->ifr_fl[i].ifl_desc_tag, fl->ifl_ifdi->idi_map, - BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + bus_dmamap_sync(rxq->ifr_fl[i].ifl_buf_tag, + fl->ifl_ifdi->idi_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); } /* * First part: import newly received packets. @@ -1199,7 +1200,8 @@ iflib_netmap_txq_init(if_ctx_t ctx, iflib_txq_t txq) * netmap slot index, si */ int si = netmap_idx_n2k(na->tx_rings[txq->ift_id], i); - netmap_load_map(na, txq->ift_desc_tag, txq->ift_sds.ifsd_map[i], NMB(na, slot + si)); + netmap_load_map(na, txq->ift_buf_tag, txq->ift_sds.ifsd_map[i], + NMB(na, slot + si)); } } @@ -1576,12 +1578,13 @@ _iflib_irq_alloc(if_ctx_t ctx, if_irq_t irq, int rid, /********************************************************************* * - * Allocate memory for tx_buffer structures. The tx_buffer stores all - * the information needed to transmit a packet on the wire. This is - * called only once at attach, setup is done every reset. + * Allocate DMA resources for TX buffers as well as memory for the TX + * mbuf map. TX DMA maps (non-TSO/TSO) and TX mbuf map are kept in a + * iflib_sw_tx_desc_array structure, storing all the information that + * is needed to transmit a packet on the wire. This is called only + * once at attach, setup is done every reset. * **********************************************************************/ - static int iflib_txsd_alloc(iflib_txq_t txq) { @@ -1607,7 +1610,7 @@ iflib_txsd_alloc(iflib_txq_t txq) } /* - * Setup DMA descriptor areas. + * Set up DMA tags for TX buffers. */ if ((err = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, /* alignment, bounds */ @@ -1620,7 +1623,7 @@ iflib_txsd_alloc(iflib_txq_t txq) 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockfuncarg */ - &txq->ift_desc_tag))) { + &txq->ift_buf_tag))) { device_printf(dev,"Unable to allocate TX DMA tag: %d\n", err); device_printf(dev,"maxsize: %ju nsegments: %d maxsegsize: %ju\n", (uintmax_t)sctx->isc_tx_maxsize, nsegments, (uintmax_t)sctx->isc_tx_maxsegsize); @@ -1638,38 +1641,42 @@ iflib_txsd_alloc(iflib_txq_t txq) 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockfuncarg */ - &txq->ift_tso_desc_tag))) { - device_printf(dev,"Unable to allocate TX TSO DMA tag: %d\n", err); + &txq->ift_tso_buf_tag))) { + device_printf(dev, "Unable to allocate TSO TX DMA tag: %d\n", + err); goto fail; } + + /* Allocate memory for the TX mbuf map. */ if (!(txq->ift_sds.ifsd_m = (struct mbuf **) malloc(sizeof(struct mbuf *) * scctx->isc_ntxd[txq->ift_br_offset], M_IFLIB, M_NOWAIT | M_ZERO))) { - device_printf(dev, "Unable to allocate tx_buffer memory\n"); + device_printf(dev, "Unable to allocate TX mbuf map memory\n"); err = ENOMEM; goto fail; } - /* Create the descriptor buffer dma maps */ + /* + * Create the DMA maps for TX buffers. + */ if ((txq->ift_sds.ifsd_map = (bus_dmamap_t *)malloc( sizeof(bus_dmamap_t) * scctx->isc_ntxd[txq->ift_br_offset], M_IFLIB, M_NOWAIT | M_ZERO)) == NULL) { - device_printf(dev, "Unable to allocate tx_buffer map memory\n"); + device_printf(dev, + "Unable to allocate TX buffer DMA map memory\n"); err = ENOMEM; goto fail; } - if (tso && (txq->ift_sds.ifsd_tso_map = (bus_dmamap_t *)malloc( sizeof(bus_dmamap_t) * scctx->isc_ntxd[txq->ift_br_offset], M_IFLIB, M_NOWAIT | M_ZERO)) == NULL) { - device_printf(dev, "Unable to allocate TSO tx_buffer " - "map memory\n"); + device_printf(dev, + "Unable to allocate TSO TX buffer map memory\n"); err = ENOMEM; goto fail; } - for (int i = 0; i < scctx->isc_ntxd[txq->ift_br_offset]; i++) { - err = bus_dmamap_create(txq->ift_desc_tag, 0, + err = bus_dmamap_create(txq->ift_buf_tag, 0, &txq->ift_sds.ifsd_map[i]); if (err != 0) { device_printf(dev, "Unable to create TX DMA map\n"); @@ -1677,7 +1684,7 @@ iflib_txsd_alloc(iflib_txq_t txq) } if (!tso) continue; - err = bus_dmamap_create(txq->ift_tso_desc_tag, 0, + err = bus_dmamap_create(txq->ift_tso_buf_tag, 0, &txq->ift_sds.ifsd_tso_map[i]); if (err != 0) { device_printf(dev, "Unable to create TSO TX DMA map\n"); @@ -1700,9 +1707,9 @@ iflib_txsd_destroy(if_ctx_t ctx, iflib_txq_t txq, int if (txq->ift_sds.ifsd_map != NULL) map = txq->ift_sds.ifsd_map[i]; if (map != NULL) { - bus_dmamap_sync(txq->ift_desc_tag, map, BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(txq->ift_desc_tag, map); - bus_dmamap_destroy(txq->ift_desc_tag, map); + bus_dmamap_sync(txq->ift_buf_tag, map, BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(txq->ift_buf_tag, map); + bus_dmamap_destroy(txq->ift_buf_tag, map); txq->ift_sds.ifsd_map[i] = NULL; } @@ -1710,10 +1717,10 @@ iflib_txsd_destroy(if_ctx_t ctx, iflib_txq_t txq, int if (txq->ift_sds.ifsd_tso_map != NULL) map = txq->ift_sds.ifsd_tso_map[i]; if (map != NULL) { - bus_dmamap_sync(txq->ift_tso_desc_tag, map, + bus_dmamap_sync(txq->ift_tso_buf_tag, map, BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(txq->ift_tso_desc_tag, map); - bus_dmamap_destroy(txq->ift_tso_desc_tag, map); + bus_dmamap_unload(txq->ift_tso_buf_tag, map); + bus_dmamap_destroy(txq->ift_tso_buf_tag, map); txq->ift_sds.ifsd_tso_map[i] = NULL; } } @@ -1737,13 +1744,13 @@ iflib_txq_destroy(iflib_txq_t txq) free(txq->ift_sds.ifsd_m, M_IFLIB); txq->ift_sds.ifsd_m = NULL; } - if (txq->ift_desc_tag != NULL) { - bus_dma_tag_destroy(txq->ift_desc_tag); - txq->ift_desc_tag = NULL; + if (txq->ift_buf_tag != NULL) { + bus_dma_tag_destroy(txq->ift_buf_tag); + txq->ift_buf_tag = NULL; } - if (txq->ift_tso_desc_tag != NULL) { - bus_dma_tag_destroy(txq->ift_tso_desc_tag); - txq->ift_tso_desc_tag = NULL; + if (txq->ift_tso_buf_tag != NULL) { + bus_dma_tag_destroy(txq->ift_tso_buf_tag); + txq->ift_tso_buf_tag = NULL; } } @@ -1757,14 +1764,14 @@ iflib_txsd_free(if_ctx_t ctx, iflib_txq_t txq, int i) return; if (txq->ift_sds.ifsd_map != NULL) { - bus_dmamap_sync(txq->ift_desc_tag, + bus_dmamap_sync(txq->ift_buf_tag, txq->ift_sds.ifsd_map[i], BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(txq->ift_desc_tag, txq->ift_sds.ifsd_map[i]); + bus_dmamap_unload(txq->ift_buf_tag, txq->ift_sds.ifsd_map[i]); } if (txq->ift_sds.ifsd_tso_map != NULL) { - bus_dmamap_sync(txq->ift_tso_desc_tag, + bus_dmamap_sync(txq->ift_tso_buf_tag, txq->ift_sds.ifsd_tso_map[i], BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(txq->ift_tso_desc_tag, + bus_dmamap_unload(txq->ift_tso_buf_tag, txq->ift_sds.ifsd_tso_map[i]); } m_free(*mp); @@ -1803,10 +1810,13 @@ iflib_txq_setup(iflib_txq_t txq) /********************************************************************* * - * Allocate memory for rx_buffer structures. Since we use one - * rx_buffer per received packet, the maximum number of rx_buffer's - * that we'll need is equal to the number of receive descriptors - * that we've allocated. + * Allocate DMA resources for RX buffers as well as memory for the RX + * mbuf map, direct RX cluster pointer map and RX cluster bus address + * map. RX DMA map, RX mbuf map, direct RX cluster pointer map and + * RX cluster map are kept in a iflib_sw_rx_desc_array structure. + * Since we use use one entry in iflib_sw_rx_desc_array per received + * packet, the maximum number of entries we'll need is equal to the + * number of hardware receive descriptors that we've allocated. * **********************************************************************/ static int @@ -1825,6 +1835,7 @@ iflib_rxsd_alloc(iflib_rxq_t rxq) fl = rxq->ifr_fl; for (int i = 0; i < rxq->ifr_nfl; i++, fl++) { fl->ifl_size = scctx->isc_nrxd[rxq->ifr_fl_offset]; /* this isn't necessarily the same */ + /* Set up DMA tag for RX buffers. */ err = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ @@ -1836,45 +1847,56 @@ iflib_rxsd_alloc(iflib_rxq_t rxq) 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockarg */ - &fl->ifl_desc_tag); + &fl->ifl_buf_tag); if (err) { - device_printf(dev, "%s: bus_dma_tag_create failed %d\n", - __func__, err); + device_printf(dev, + "Unable to allocate RX DMA tag: %d\n", err); goto fail; } + + /* Allocate memory for the RX mbuf map. */ if (!(fl->ifl_sds.ifsd_m = (struct mbuf **) malloc(sizeof(struct mbuf *) * scctx->isc_nrxd[rxq->ifr_fl_offset], M_IFLIB, M_NOWAIT | M_ZERO))) { - device_printf(dev, "Unable to allocate tx_buffer memory\n"); + device_printf(dev, + "Unable to allocate RX mbuf map memory\n"); err = ENOMEM; goto fail; } + + /* Allocate memory for the direct RX cluster pointer map. */ if (!(fl->ifl_sds.ifsd_cl = (caddr_t *) malloc(sizeof(caddr_t) * scctx->isc_nrxd[rxq->ifr_fl_offset], M_IFLIB, M_NOWAIT | M_ZERO))) { - device_printf(dev, "Unable to allocate tx_buffer memory\n"); + device_printf(dev, + "Unable to allocate RX cluster map memory\n"); err = ENOMEM; goto fail; } + /* Allocate memory for the RX cluster bus address map. */ if (!(fl->ifl_sds.ifsd_ba = (bus_addr_t *) malloc(sizeof(bus_addr_t) * scctx->isc_nrxd[rxq->ifr_fl_offset], M_IFLIB, M_NOWAIT | M_ZERO))) { - device_printf(dev, "Unable to allocate rx bus addr memory\n"); + device_printf(dev, + "Unable to allocate RX bus address map memory\n"); err = ENOMEM; goto fail; } - /* Create the descriptor buffer dma maps */ + /* + * Create the DMA maps for RX buffers. + */ if (!(fl->ifl_sds.ifsd_map = (bus_dmamap_t *) malloc(sizeof(bus_dmamap_t) * scctx->isc_nrxd[rxq->ifr_fl_offset], M_IFLIB, M_NOWAIT | M_ZERO))) { - device_printf(dev, "Unable to allocate tx_buffer map memory\n"); + device_printf(dev, + "Unable to allocate RX buffer DMA map memory\n"); err = ENOMEM; goto fail; } - for (int i = 0; i < scctx->isc_nrxd[rxq->ifr_fl_offset]; i++) { - err = bus_dmamap_create(fl->ifl_desc_tag, 0, &fl->ifl_sds.ifsd_map[i]); + err = bus_dmamap_create(fl->ifl_buf_tag, 0, + &fl->ifl_sds.ifsd_map[i]); if (err != 0) { device_printf(dev, "Unable to create RX buffer DMA map\n"); goto fail; @@ -1974,7 +1996,7 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun cb_arg.error = 0; MPASS(sd_map != NULL); - err = bus_dmamap_load(fl->ifl_desc_tag, sd_map[frag_idx], + err = bus_dmamap_load(fl->ifl_buf_tag, sd_map[frag_idx], cl, fl->ifl_buf_size, _rxq_refill_cb, &cb_arg, BUS_DMA_NOWAIT); if (err != 0 || cb_arg.error) { @@ -1986,7 +2008,7 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun break; } - bus_dmamap_sync(fl->ifl_desc_tag, sd_map[frag_idx], + bus_dmamap_sync(fl->ifl_buf_tag, sd_map[frag_idx], BUS_DMASYNC_PREREAD); sd_ba[frag_idx] = bus_addr = cb_arg.seg.ds_addr; sd_cl[frag_idx] = cl; @@ -2087,14 +2109,14 @@ iflib_fl_bufs_free(iflib_fl_t fl) if (*sd_cl != NULL) { sd_map = fl->ifl_sds.ifsd_map[i]; - bus_dmamap_sync(fl->ifl_desc_tag, sd_map, + bus_dmamap_sync(fl->ifl_buf_tag, sd_map, BUS_DMASYNC_POSTREAD); - bus_dmamap_unload(fl->ifl_desc_tag, sd_map); + bus_dmamap_unload(fl->ifl_buf_tag, sd_map); if (*sd_cl != NULL) uma_zfree(fl->ifl_zone, *sd_cl); // XXX: Should this get moved out? if (iflib_in_detach(fl->ifl_rxq->ifr_ctx)) - bus_dmamap_destroy(fl->ifl_desc_tag, sd_map); + bus_dmamap_destroy(fl->ifl_buf_tag, sd_map); if (*sd_m != NULL) { m_init(*sd_m, M_NOWAIT, MT_DATA, 0); uma_zfree(zone_mbuf, *sd_m); @@ -2196,23 +2218,23 @@ iflib_rx_sds_free(iflib_rxq_t rxq) if (rxq->ifr_fl != NULL) { for (i = 0; i < rxq->ifr_nfl; i++) { fl = &rxq->ifr_fl[i]; - if (fl->ifl_desc_tag != NULL) { + if (fl->ifl_buf_tag != NULL) { if (fl->ifl_sds.ifsd_map != NULL) { for (j = 0; j < fl->ifl_size; j++) { if (fl->ifl_sds.ifsd_map[j] == NULL) continue; bus_dmamap_sync( - fl->ifl_desc_tag, + fl->ifl_buf_tag, fl->ifl_sds.ifsd_map[j], BUS_DMASYNC_POSTREAD); bus_dmamap_unload( - fl->ifl_desc_tag, + fl->ifl_buf_tag, fl->ifl_sds.ifsd_map[j]); } } - bus_dma_tag_destroy(fl->ifl_desc_tag); - fl->ifl_desc_tag = NULL; + bus_dma_tag_destroy(fl->ifl_buf_tag); + fl->ifl_buf_tag = NULL; } free(fl->ifl_sds.ifsd_m, M_IFLIB); free(fl->ifl_sds.ifsd_cl, M_IFLIB); @@ -2497,9 +2519,9 @@ rxd_frag_to_sd(iflib_rxq_t rxq, if_rxd_frag_t irf, int /* not valid assert if bxe really does SGE from non-contiguous elements */ MPASS(fl->ifl_cidx == cidx); - bus_dmamap_sync(fl->ifl_desc_tag, map, BUS_DMASYNC_POSTREAD); + bus_dmamap_sync(fl->ifl_buf_tag, map, BUS_DMASYNC_POSTREAD); if (unload) - bus_dmamap_unload(fl->ifl_desc_tag, map); + bus_dmamap_unload(fl->ifl_buf_tag, map); fl->ifl_cidx = (fl->ifl_cidx + 1) & (fl->ifl_size-1); if (__predict_false(fl->ifl_cidx == 0)) fl->ifl_gen = 0; @@ -2582,7 +2604,7 @@ iflib_rxd_pkt_get(iflib_rxq_t rxq, if_rxd_info_t ri) m->m_data += 2; #endif memcpy(m->m_data, *sd.ifsd_cl, ri->iri_len); - bus_dmamap_sync(rxq->ifr_fl->ifl_desc_tag, + bus_dmamap_sync(rxq->ifr_fl->ifl_buf_tag, rxq->ifr_fl->ifl_sds.ifsd_map[ri->iri_frags[0].irf_idx], BUS_DMASYNC_PREREAD); m->m_len = ri->iri_frags[0].irf_len; @@ -3083,9 +3105,9 @@ iflib_remove_mbuf(iflib_txq_t txq) ifsd_m = txq->ift_sds.ifsd_m; m = ifsd_m[pidx]; ifsd_m[pidx] = NULL; - bus_dmamap_unload(txq->ift_desc_tag, txq->ift_sds.ifsd_map[pidx]); + bus_dmamap_unload(txq->ift_buf_tag, txq->ift_sds.ifsd_map[pidx]); if (txq->ift_sds.ifsd_tso_map != NULL) - bus_dmamap_unload(txq->ift_tso_desc_tag, + bus_dmamap_unload(txq->ift_tso_buf_tag, txq->ift_sds.ifsd_tso_map[pidx]); #if MEMORY_LOGGING txq->ift_dequeued++; @@ -3162,6 +3184,7 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) if_ctx_t ctx; if_shared_ctx_t sctx; if_softc_ctx_t scctx; + bus_dma_tag_t buf_tag; bus_dma_segment_t *segs; struct mbuf *m_head, **ifsd_m; void *next_txd; @@ -3169,7 +3192,6 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) struct if_pkt_info pi; int remap = 0; int err, nsegs, ndesc, max_segs, pidx, cidx, next, ntxd; - bus_dma_tag_t desc_tag; ctx = txq->ift_ctx; sctx = ctx->ifc_sctx; @@ -3200,13 +3222,13 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) ifsd_m = txq->ift_sds.ifsd_m; if (m_head->m_pkthdr.csum_flags & CSUM_TSO) { - desc_tag = txq->ift_tso_desc_tag; + buf_tag = txq->ift_tso_buf_tag; max_segs = scctx->isc_tx_tso_segments_max; map = txq->ift_sds.ifsd_tso_map[pidx]; - MPASS(desc_tag != NULL); + MPASS(buf_tag != NULL); MPASS(max_segs > 0); } else { - desc_tag = txq->ift_desc_tag; + buf_tag = txq->ift_buf_tag; max_segs = scctx->isc_tx_nsegments; map = txq->ift_sds.ifsd_map[pidx]; } @@ -3238,7 +3260,7 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) } retry: - err = bus_dmamap_load_mbuf_sg(desc_tag, map, m_head, segs, &nsegs, + err = bus_dmamap_load_mbuf_sg(buf_tag, map, m_head, segs, &nsegs, BUS_DMA_NOWAIT); defrag: if (__predict_false(err)) { @@ -3284,7 +3306,7 @@ defrag: */ if (__predict_false(nsegs + 2 > TXQ_AVAIL(txq))) { txq->ift_no_desc_avail++; - bus_dmamap_unload(desc_tag, map); + bus_dmamap_unload(buf_tag, map); DBG_COUNTER_INC(encap_txq_avail_fail); DBG_COUNTER_INC(encap_txd_encap_fail); if ((txq->ift_task.gt_task.ta_flags & TASK_ENQUEUED) == 0) @@ -3311,7 +3333,7 @@ defrag: #ifdef PKT_DEBUG print_pkt(&pi); #endif - bus_dmamap_sync(desc_tag, map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(buf_tag, map, BUS_DMASYNC_PREWRITE); if ((err = ctx->isc_txd_encap(ctx->ifc_softc, &pi)) == 0) { bus_dmamap_sync(txq->ift_ifdi->idi_tag, txq->ift_ifdi->idi_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); @@ -3387,16 +3409,16 @@ iflib_tx_desc_free(iflib_txq_t txq, int n) if ((m = ifsd_m[cidx]) != NULL) { prefetch(&ifsd_m[(cidx + CACHE_PTR_INCREMENT) & mask]); if (m->m_pkthdr.csum_flags & CSUM_TSO) { - bus_dmamap_sync(txq->ift_tso_desc_tag, + bus_dmamap_sync(txq->ift_tso_buf_tag, txq->ift_sds.ifsd_tso_map[cidx], BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(txq->ift_tso_desc_tag, + bus_dmamap_unload(txq->ift_tso_buf_tag, txq->ift_sds.ifsd_tso_map[cidx]); } else { - bus_dmamap_sync(txq->ift_desc_tag, + bus_dmamap_sync(txq->ift_buf_tag, txq->ift_sds.ifsd_map[cidx], BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(txq->ift_desc_tag, + bus_dmamap_unload(txq->ift_buf_tag, txq->ift_sds.ifsd_map[cidx]); } /* XXX we don't support any drivers that batch packets yet */ @@ -5203,15 +5225,18 @@ iflib_queues_alloc(if_ctx_t ctx) for (txconf = i = 0, cpu = CPU_FIRST(); i < ntxqsets; i++, txconf++, txq++, cpu = CPU_NEXT(cpu)) { /* Set up some basics */ - if ((ifdip = malloc(sizeof(struct iflib_dma_info) * ntxqs, M_IFLIB, M_WAITOK|M_ZERO)) == NULL) { - device_printf(dev, "failed to allocate iflib_dma_info\n"); + if ((ifdip = malloc(sizeof(struct iflib_dma_info) * ntxqs, + M_IFLIB, M_NOWAIT | M_ZERO)) == NULL) { + device_printf(dev, + "Unable to allocate TX DMA info memory\n"); err = ENOMEM; goto err_tx_desc; } txq->ift_ifdi = ifdip; for (j = 0; j < ntxqs; j++, ifdip++) { - if (iflib_dma_alloc(ctx, txqsizes[j], ifdip, BUS_DMA_NOWAIT)) { - device_printf(dev, "Unable to allocate Descriptor memory\n"); + if (iflib_dma_alloc(ctx, txqsizes[j], ifdip, 0)) { + device_printf(dev, + "Unable to allocate TX descriptors\n"); err = ENOMEM; goto err_tx_desc; } @@ -5255,8 +5280,10 @@ iflib_queues_alloc(if_ctx_t ctx) for (rxconf = i = 0; i < nrxqsets; i++, rxconf++, rxq++) { /* Set up some basics */ - if ((ifdip = malloc(sizeof(struct iflib_dma_info) * nrxqs, M_IFLIB, M_WAITOK|M_ZERO)) == NULL) { - device_printf(dev, "failed to allocate iflib_dma_info\n"); + if ((ifdip = malloc(sizeof(struct iflib_dma_info) * nrxqs, + M_IFLIB, M_NOWAIT | M_ZERO)) == NULL) { + device_printf(dev, + "Unable to allocate RX DMA info memory\n"); err = ENOMEM; goto err_tx_desc; } @@ -5266,8 +5293,9 @@ iflib_queues_alloc(if_ctx_t ctx) rxq->ifr_ntxqirq = 1; rxq->ifr_txqid[0] = i; for (j = 0; j < nrxqs; j++, ifdip++) { - if (iflib_dma_alloc(ctx, rxqsizes[j], ifdip, BUS_DMA_NOWAIT)) { - device_printf(dev, "Unable to allocate Descriptor memory\n"); + if (iflib_dma_alloc(ctx, rxqsizes[j], ifdip, 0)) { + device_printf(dev, + "Unable to allocate RX descriptors\n"); err = ENOMEM; goto err_tx_desc; } @@ -5319,7 +5347,8 @@ iflib_queues_alloc(if_ctx_t ctx) } } if ((err = IFDI_TX_QUEUES_ALLOC(ctx, vaddrs, paddrs, ntxqs, ntxqsets)) != 0) { - device_printf(ctx->ifc_dev, "device queue allocation failed\n"); + device_printf(ctx->ifc_dev, + "Unable to allocate device TX queue\n"); iflib_tx_structures_free(ctx); free(vaddrs, M_IFLIB); free(paddrs, M_IFLIB); @@ -5340,7 +5369,8 @@ iflib_queues_alloc(if_ctx_t ctx) } } if ((err = IFDI_RX_QUEUES_ALLOC(ctx, vaddrs, paddrs, nrxqs, nrxqsets)) != 0) { - device_printf(ctx->ifc_dev, "device queue allocation failed\n"); + device_printf(ctx->ifc_dev, + "Unable to allocate device RX queue\n"); iflib_tx_structures_free(ctx); free(vaddrs, M_IFLIB); free(paddrs, M_IFLIB); From owner-svn-src-head@freebsd.org Mon Feb 4 21:12:17 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5ACDC14B352D; Mon, 4 Feb 2019 21:12:17 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it1-f171.google.com (mail-it1-f171.google.com [209.85.166.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 841C272B27; Mon, 4 Feb 2019 21:12:16 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it1-f171.google.com with SMTP id b5so3341458iti.2; Mon, 04 Feb 2019 13:12:16 -0800 (PST) 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=0wxMCkLIcaTvguxmnyDl8RLFDalRKV1AccSSf5+hoxU=; b=PAjRY5Iw6dFRRypneI7NA38w6hKcjCVfUAeTNcczjlz9FbmLpVLdkjiDZviaQUJcJV m70rrNVWKMPL6+3TKJjie3c+kED7hR0mCB/h4hpsndNYZW3/xfVwKnyrlkGDCyckg70e f3GS7c2HD41uS0tkSGdi4hG937KJydKHbiRxWnhoHTj90V4ZfBCowOZag+nfNIghb7bK HZffTFZ+ysqWqFX/Gap1w6m33q3bDCjKvDDRKJd7sqiFpQwDa3ycpY1DsHX2sZGBrHUl sTMBX/CYzSHKjkuMHJoBK/M2MBuKcPJ/dSgn1FyxzpZmDCt7xjgM2BhVpHK1YkcJO9nW 6Ykw== X-Gm-Message-State: AHQUAua19B5lOUQu5J7iBr1gGbuhOEdDoFMlGEVn9rSJ5d3gYrWUl078 wXw6QxCohCHBoJJ4xKMmh9pRRMbGXIwEqgwY5mWVukli X-Google-Smtp-Source: AHgI3IYP25EMealS1zFKm2ECPTHLRXCYXkqhu3hUbC2Gc67AQg11HmRY0/V4Icl0+9pledSN+tfMa2gtbgK9d7F9jVk= X-Received: by 2002:a24:8ac7:: with SMTP id v190mr767933itd.174.1549314357263; Mon, 04 Feb 2019 13:05:57 -0800 (PST) MIME-Version: 1.0 References: <201711112330.vABNUwXC077395@repo.freebsd.org> In-Reply-To: <201711112330.vABNUwXC077395@repo.freebsd.org> From: Ed Maste Date: Mon, 4 Feb 2019 16:05:45 -0500 Message-ID: Subject: Re: svn commit: r325728 - head/lib/libkvm To: Will Andrews Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 841C272B27 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.171 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-5.72 / 15.00]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.87)[-0.870,0]; 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]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; 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]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[171.166.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-2.84)[ip: (-8.41), ipnet: 209.85.128.0/17(-3.76), asn: 15169(-1.94), country: US(-0.07)]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 21:12:17 -0000 On Sat, 11 Nov 2017 at 18:31, Will Andrews wrote: > > Author: will > Date: Sat Nov 11 23:30:58 2017 > New Revision: 325728 > URL: https://svnweb.freebsd.org/changeset/base/325728 > > Log: > libkvm: add kvm_walk_pages API. > > Modified: head/lib/libkvm/kvm.h > ============================================================================== > --- head/lib/libkvm/kvm.h Sat Nov 11 22:50:14 2017 (r325727) > +++ head/lib/libkvm/kvm.h Sat Nov 11 23:30:58 2017 (r325728) > @@ -36,6 +36,7 @@ > #include > #include > #include > +#include > > /* Default version symbol. */ > #define VRS_SYM "_version" > @@ -73,7 +74,19 @@ struct kvm_swap { > u_int ksw_reserved2; > }; > > +struct kvm_page { > + unsigned int version; > + u_long paddr; This should probably be uin64_t to support cross-debugging cores from 64-bit machines on 32-bit hosts; also for i386 PAE. Or, on IRC jhb suggested we introduce a kpaddr_t typedef akin to kvaddr_t. > + u_long kmap_vaddr; > + u_long dmap_vaddr; These two should be kvaddr_t. > + vm_prot_t prot; > + u_long offset; off_t? > + size_t len; > + /* end of version 1 */ > +}; > + > #define SWIF_DEV_PREFIX 0x0002 > +#define LIBKVM_WALK_PAGES_VERSION 1 From owner-svn-src-head@freebsd.org Mon Feb 4 21:16:17 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E22B514B35F1; Mon, 4 Feb 2019 21:16:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 83C4272D99; Mon, 4 Feb 2019 21:16:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7320EB964; Mon, 4 Feb 2019 21:16:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x14LGGQK084376; Mon, 4 Feb 2019 21:16:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x14LGGCq084375; Mon, 4 Feb 2019 21:16:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902042116.x14LGGCq084375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 4 Feb 2019 21:16:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343754 - head/lib/libthr/thread X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/lib/libthr/thread X-SVN-Commit-Revision: 343754 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 83C4272D99 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_SHORT(-0.94)[-0.938,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 21:16:17 -0000 Author: kib Date: Mon Feb 4 21:16:15 2019 New Revision: 343754 URL: https://svnweb.freebsd.org/changeset/base/343754 Log: Fixes for very early use of the pthread_mutex_* and libthr malloc. When libthr is statically linked into the binary, order of the constructors execution is not deterministic. It is possible for the application constructor to use pthread_mutex_* functions before the libthr initialization was done. Handle it by: - making thr_malloc.c locking functions operational when curthread is not yet set; - making __thr_malloc_init() idempotent, allowing more than one call to it; - unconditionally calling __thr_malloc_init() before initializing a process-private mutex. Reported and tested by: mmel Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libthr/thread/thr_malloc.c head/lib/libthr/thread/thr_mutex.c Modified: head/lib/libthr/thread/thr_malloc.c ============================================================================== --- head/lib/libthr/thread/thr_malloc.c Mon Feb 4 20:46:57 2019 (r343753) +++ head/lib/libthr/thread/thr_malloc.c Mon Feb 4 21:16:15 2019 (r343754) @@ -46,6 +46,8 @@ void __thr_malloc_init(void) { + if (npagesizes != 0) + return; npagesizes = getpagesizes(pagesizes_d, nitems(pagesizes_d)); if (npagesizes == -1) { npagesizes = 1; @@ -59,6 +61,8 @@ static void thr_malloc_lock(struct pthread *curthread) { + if (curthread == NULL) + return; curthread->locklevel++; _thr_umutex_lock(&thr_malloc_umtx, TID(curthread)); } @@ -67,6 +71,8 @@ static void thr_malloc_unlock(struct pthread *curthread) { + if (curthread == NULL) + return; _thr_umutex_unlock(&thr_malloc_umtx, TID(curthread)); curthread->locklevel--; _thr_ast(curthread); Modified: head/lib/libthr/thread/thr_mutex.c ============================================================================== --- head/lib/libthr/thread/thr_mutex.c Mon Feb 4 20:46:57 2019 (r343753) +++ head/lib/libthr/thread/thr_mutex.c Mon Feb 4 21:16:15 2019 (r343754) @@ -390,6 +390,7 @@ __pthread_mutex_init(pthread_mutex_t * __restrict mute } if (mutex_attr == NULL || (*mutex_attr)->m_pshared == PTHREAD_PROCESS_PRIVATE) { + __thr_malloc_init(); return (mutex_init(mutex, mutex_attr ? *mutex_attr : NULL, __thr_calloc)); } From owner-svn-src-head@freebsd.org Mon Feb 4 21:28:41 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AFE914B3A10; Mon, 4 Feb 2019 21:28:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 E02FF733FA; Mon, 4 Feb 2019 21:28:40 +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 D02CFBCC5; Mon, 4 Feb 2019 21:28:40 +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 x14LSewx089815; Mon, 4 Feb 2019 21:28:40 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x14LSQc0089740; Mon, 4 Feb 2019 21:28:26 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201902042128.x14LSQc0089740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 4 Feb 2019 21:28:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343755 - in head: lib/libefivar sbin/devmatch sbin/nvmecontrol sbin/nvmecontrol/modules/wdc share/man/man4 share/man/man9 stand/efi/libefi stand/efi/loader stand/forth stand/i386/libi3... X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: lib/libefivar sbin/devmatch sbin/nvmecontrol sbin/nvmecontrol/modules/wdc share/man/man4 share/man/man9 stand/efi/libefi stand/efi/loader stand/forth stand/i386/libi386 stand/libsa sys/cam/nv... X-SVN-Commit-Revision: 343755 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E02FF733FA 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.939,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 21:28:41 -0000 Author: imp Date: Mon Feb 4 21:28:25 2019 New Revision: 343755 URL: https://svnweb.freebsd.org/changeset/base/343755 Log: Regularize the Netflix copyright Use recent best practices for Copyright form at the top of the license: 1. Remove all the All Rights Reserved clauses on our stuff. Where we piggybacked others, use a separate line to make things clear. 2. Use "Netflix, Inc." everywhere. 3. Use a single line for the copyright for grep friendliness. 4. Use date ranges in all places for our stuff. Approved by: Netflix Legal (who gave me the form), adrian@ (pmc files) Modified: head/lib/libefivar/efi-osdep.h head/lib/libefivar/efivar-dp-format.c head/lib/libefivar/efivar-dp-parse.c head/lib/libefivar/efivar-dp-xlate.c head/lib/libefivar/efivar-dp.h head/lib/libefivar/efivar.3 head/lib/libefivar/efivar.c head/lib/libefivar/efivar.h head/lib/libefivar/uefi-dplib.h head/lib/libefivar/uefi-dputil.c head/sbin/devmatch/devmatch.8 head/sbin/devmatch/devmatch.c head/sbin/nvmecontrol/modules/wdc/wdc.c head/sbin/nvmecontrol/nc_util.c head/sbin/nvmecontrol/ns.c head/sbin/nvmecontrol/nvmecontrol_ext.h head/sbin/nvmecontrol/power.c head/share/man/man4/nda.4 head/share/man/man9/kern_testfrwk.9 head/stand/efi/libefi/efienv.c head/stand/efi/libefi/env.c head/stand/efi/libefi/wchar.c head/stand/efi/loader/main.c head/stand/forth/efi.4th head/stand/i386/libi386/biospci.c head/stand/libsa/abort.c head/stand/libsa/xlocale_private.h head/sys/cam/nvme/nvme_all.c head/sys/cam/nvme/nvme_all.h head/sys/cam/nvme/nvme_da.c head/sys/crypto/aesni/aesencdec.h head/sys/dev/efidev/efidev.c head/sys/dev/nvme/nvme_sim.c head/sys/dev/tcp_log/tcp_log_dev.c head/sys/dev/tcp_log/tcp_log_dev.h head/sys/kern/subr_boot.c head/sys/netinet/tcp_hpts.c head/sys/netinet/tcp_hpts.h head/sys/netinet/tcp_log_buf.c head/sys/netinet/tcp_log_buf.h head/sys/netinet/tcp_stacks/rack.c head/sys/netinet/tcp_stacks/rack_bbr_common.h head/sys/netinet/tcp_stacks/sack_filter.c head/sys/netinet/tcp_stacks/sack_filter.h head/sys/netinet/tcp_stacks/tcp_rack.h head/sys/sys/boot.h head/sys/sys/efiio.h head/sys/sys/kern_prefetch.h head/sys/tests/callout_test.h head/sys/tests/callout_test/callout_test.c head/sys/tests/framework/kern_testfrwk.c head/sys/tests/kern_testfrwk.h head/usr.sbin/efibootmgr/efibootmgr.8 head/usr.sbin/efibootmgr/efibootmgr.c head/usr.sbin/efidp/efidp.8 head/usr.sbin/efidp/efidp.c head/usr.sbin/efivar/efiutil.c head/usr.sbin/efivar/efiutil.h head/usr.sbin/efivar/efivar.8 head/usr.sbin/efivar/efivar.c head/usr.sbin/mpsutil/mps_cmd.c head/usr.sbin/mpsutil/mps_debug.c head/usr.sbin/mpsutil/mps_show.c head/usr.sbin/mpsutil/mpsutil.c head/usr.sbin/pmcstat/pmcpl_annotate_cg.c head/usr.sbin/pmcstat/pmcpl_annotate_cg.h head/usr.sbin/pmcstudy/eval_expr.c head/usr.sbin/pmcstudy/eval_expr.h head/usr.sbin/pmcstudy/pmcstudy.8 head/usr.sbin/pmcstudy/pmcstudy.c Modified: head/lib/libefivar/efi-osdep.h ============================================================================== --- head/lib/libefivar/efi-osdep.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/lib/libefivar/efi-osdep.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017 Netflix, Inc. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/lib/libefivar/efivar-dp-format.c ============================================================================== --- head/lib/libefivar/efivar-dp-format.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/lib/libefivar/efivar-dp-format.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017 Netflix, Inc. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/lib/libefivar/efivar-dp-parse.c ============================================================================== --- head/lib/libefivar/efivar-dp-parse.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/lib/libefivar/efivar-dp-parse.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017 Netflix, Inc. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/lib/libefivar/efivar-dp-xlate.c ============================================================================== --- head/lib/libefivar/efivar-dp-xlate.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/lib/libefivar/efivar-dp-xlate.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017 Netflix, Inc. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/lib/libefivar/efivar-dp.h ============================================================================== --- head/lib/libefivar/efivar-dp.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/lib/libefivar/efivar-dp.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017 Netflix, Inc. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/lib/libefivar/efivar.3 ============================================================================== --- head/lib/libefivar/efivar.3 Mon Feb 4 21:16:15 2019 (r343754) +++ head/lib/libefivar/efivar.3 Mon Feb 4 21:28:25 2019 (r343755) @@ -1,3 +1,4 @@ +.\" .\" Copyright 2016 Netflix, Inc. .\" All rights reserved. .\" Modified: head/lib/libefivar/efivar.c ============================================================================== --- head/lib/libefivar/efivar.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/lib/libefivar/efivar.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2016 Netflix, Inc. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/lib/libefivar/efivar.h ============================================================================== --- head/lib/libefivar/efivar.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/lib/libefivar/efivar.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2016 Netflix, Inc. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/lib/libefivar/uefi-dplib.h ============================================================================== --- head/lib/libefivar/uefi-dplib.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/lib/libefivar/uefi-dplib.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017 Netflix, Inc. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/lib/libefivar/uefi-dputil.c ============================================================================== --- head/lib/libefivar/uefi-dputil.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/lib/libefivar/uefi-dputil.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017 Netflix, Inc. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sbin/devmatch/devmatch.8 ============================================================================== --- head/sbin/devmatch/devmatch.8 Mon Feb 4 21:16:15 2019 (r343754) +++ head/sbin/devmatch/devmatch.8 Mon Feb 4 21:28:25 2019 (r343755) @@ -1,7 +1,5 @@ .\" -.\" Copyright (c) 2017 Netflix, Inc -.\" -.\" All rights reserved. +.\" Copyright (c) 2017 Netflix, Inc. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/sbin/devmatch/devmatch.c ============================================================================== --- head/sbin/devmatch/devmatch.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/sbin/devmatch/devmatch.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2017 Netflix, Inc - * All rights reserved. + * Copyright (c) 2017 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sbin/nvmecontrol/modules/wdc/wdc.c ============================================================================== --- head/sbin/nvmecontrol/modules/wdc/wdc.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/sbin/nvmecontrol/modules/wdc/wdc.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2017 Netflix, Inc - * All rights reserved. + * Copyright (c) 2017 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sbin/nvmecontrol/nc_util.c ============================================================================== --- head/sbin/nvmecontrol/nc_util.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/sbin/nvmecontrol/nc_util.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2017 Netflix, Inc - * All rights reserved. + * Copyright (c) 2017 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sbin/nvmecontrol/ns.c ============================================================================== --- head/sbin/nvmecontrol/ns.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/sbin/nvmecontrol/ns.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2017 Netflix, Inc + * Copyright (c) 2017 Netflix, Inc. * Copyright (C) 2018 Alexander Motin * * Redistribution and use in source and binary forms, with or without Modified: head/sbin/nvmecontrol/nvmecontrol_ext.h ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol_ext.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/sbin/nvmecontrol/nvmecontrol_ext.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (C) 2018 Netflix + * Copyright (C) 2018 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sbin/nvmecontrol/power.c ============================================================================== --- head/sbin/nvmecontrol/power.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/sbin/nvmecontrol/power.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2016 Netflix, Inc - * All rights reserved. + * Copyright (c) 2016 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/share/man/man4/nda.4 ============================================================================== --- head/share/man/man4/nda.4 Mon Feb 4 21:16:15 2019 (r343754) +++ head/share/man/man4/nda.4 Mon Feb 4 21:28:25 2019 (r343755) @@ -1,5 +1,5 @@ -.\" Copyright (c) 2017 Netflix, Inc -.\" All rights reserved. +.\" +.\" Copyright (c) 2017 Netflix, Inc. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/share/man/man9/kern_testfrwk.9 ============================================================================== --- head/share/man/man9/kern_testfrwk.9 Mon Feb 4 21:16:15 2019 (r343754) +++ head/share/man/man9/kern_testfrwk.9 Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ .\" -.\" Copyright (c) 2015 Netflix Inc. -.\" All rights reserved. +.\" Copyright (c) 2015 Netflix, Inc. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/stand/efi/libefi/efienv.c ============================================================================== --- head/stand/efi/libefi/efienv.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/stand/efi/libefi/efienv.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2018 Netflix, Inc. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/stand/efi/libefi/env.c ============================================================================== --- head/stand/efi/libefi/env.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/stand/efi/libefi/env.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Netflix, Inc. All Rights Reserved. + * Copyright (c) 2015 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/stand/efi/libefi/wchar.c ============================================================================== --- head/stand/efi/libefi/wchar.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/stand/efi/libefi/wchar.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,5 +1,5 @@ /*- - * Copyright 2016 Netflix, Inc. All Rights Reserved. + * Copyright 2016 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/stand/efi/loader/main.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,9 +1,10 @@ /*- * Copyright (c) 2008-2010 Rui Paulo * Copyright (c) 2006 Marcel Moolenaar - * Copyright (c) 2018 Netflix, Inc * All rights reserved. * + * Copyright (c) 2018 Netflix, Inc. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: head/stand/forth/efi.4th ============================================================================== --- head/stand/forth/efi.4th Mon Feb 4 21:16:15 2019 (r343754) +++ head/stand/forth/efi.4th Mon Feb 4 21:28:25 2019 (r343755) @@ -1,5 +1,5 @@ -\ Copyright (c) 2016 Netflix, Inc -\ All rights reserved. +\ +\ Copyright (c) 2016 Netflix, Inc. \ \ Redistribution and use in source and binary forms, with or without \ modification, are permitted provided that the following conditions Modified: head/stand/i386/libi386/biospci.c ============================================================================== --- head/stand/i386/libi386/biospci.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/stand/i386/libi386/biospci.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,7 +1,8 @@ /*- * Copyright (c) 1998 Michael Smith - * Copyright (c) 2016 Netflix, Inc * All rights reserved. + * + * Copyright (c) 2016 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/stand/libsa/abort.c ============================================================================== --- head/stand/libsa/abort.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/stand/libsa/abort.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Netflix. All Rights Reserved. + * Copyright (c) 2018 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/stand/libsa/xlocale_private.h ============================================================================== --- head/stand/libsa/xlocale_private.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/stand/libsa/xlocale_private.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2018 Netflix + * Copyright (c) 2018 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/cam/nvme/nvme_all.c ============================================================================== --- head/sys/cam/nvme/nvme_all.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/cam/nvme/nvme_all.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2015 Netflix, Inc + * Copyright (c) 2015 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/cam/nvme/nvme_all.h ============================================================================== --- head/sys/cam/nvme/nvme_all.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/cam/nvme/nvme_all.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2015 Netflix, Inc + * Copyright (c) 2015 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/cam/nvme/nvme_da.c ============================================================================== --- head/sys/cam/nvme/nvme_da.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/cam/nvme/nvme_da.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2015 Netflix, Inc + * Copyright (c) 2015 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/crypto/aesni/aesencdec.h ============================================================================== --- head/sys/crypto/aesni/aesencdec.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/crypto/aesni/aesencdec.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,7 +1,8 @@ /*- * Copyright 2013 John-Mark Gurney - * Copyright 2015 Netflix, Inc. * All rights reserved. + * + * Copyright 2015 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/efidev/efidev.c ============================================================================== --- head/sys/dev/efidev/efidev.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/dev/efidev/efidev.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2016 Netflix, Inc. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/nvme/nvme_sim.c ============================================================================== --- head/sys/dev/nvme/nvme_sim.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/dev/nvme/nvme_sim.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016 Netflix, Inc + * Copyright (c) 2016 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/tcp_log/tcp_log_dev.c ============================================================================== --- head/sys/dev/tcp_log/tcp_log_dev.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/dev/tcp_log/tcp_log_dev.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,8 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2016-2017 - * Netflix Inc. All rights reserved. + * Copyright (c) 2016-2017 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/tcp_log/tcp_log_dev.h ============================================================================== --- head/sys/dev/tcp_log/tcp_log_dev.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/dev/tcp_log/tcp_log_dev.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,8 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2016 - * Netflix Inc. All rights reserved. + * Copyright (c) 2016 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/kern/subr_boot.c ============================================================================== --- head/sys/kern/subr_boot.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/kern/subr_boot.c Mon Feb 4 21:28:25 2019 (r343755) @@ -10,7 +10,7 @@ * Copyright (c) 2014 Roger Pau Monné * All Rights Reserved. * Copyright (c) 2018 Kyle Evans - * Copyright (c) 2018 Netflix + * Copyright (c) 2018 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/netinet/tcp_hpts.c ============================================================================== --- head/sys/netinet/tcp_hpts.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/netinet/tcp_hpts.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016-2018 Netflix Inc. + * Copyright (c) 2016-2018 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/netinet/tcp_hpts.h ============================================================================== --- head/sys/netinet/tcp_hpts.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/netinet/tcp_hpts.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016-2018 Netflix Inc. + * Copyright (c) 2016-2018 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/netinet/tcp_log_buf.c ============================================================================== --- head/sys/netinet/tcp_log_buf.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/netinet/tcp_log_buf.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,8 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2016-2018 - * Netflix Inc. All rights reserved. + * Copyright (c) 2016-2018 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/netinet/tcp_log_buf.h ============================================================================== --- head/sys/netinet/tcp_log_buf.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/netinet/tcp_log_buf.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,8 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2016-2018 - * Netflix Inc. All rights reserved. + * Copyright (c) 2016-2018 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/netinet/tcp_stacks/rack.c ============================================================================== --- head/sys/netinet/tcp_stacks/rack.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/netinet/tcp_stacks/rack.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2016-2018 - * Netflix Inc. All rights reserved. + * Copyright (c) 2016-2018 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/netinet/tcp_stacks/rack_bbr_common.h ============================================================================== --- head/sys/netinet/tcp_stacks/rack_bbr_common.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/netinet/tcp_stacks/rack_bbr_common.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,9 +1,7 @@ #ifndef __pacer_timer_h__ #define __pacer_timer_h__ /*- - * Copyright (c) 2017 - * Netflix Inc. - * All rights reserved. + * Copyright (c) 2017 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/netinet/tcp_stacks/sack_filter.c ============================================================================== --- head/sys/netinet/tcp_stacks/sack_filter.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/netinet/tcp_stacks/sack_filter.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,7 +1,5 @@ /*- - * Copyright (c) 2017 - * Netflix Inc. - * All rights reserved. + * Copyright (c) 2017 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/netinet/tcp_stacks/sack_filter.h ============================================================================== --- head/sys/netinet/tcp_stacks/sack_filter.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/netinet/tcp_stacks/sack_filter.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,9 +1,7 @@ #ifndef __sack_filter_h__ #define __sack_filter_h__ /*- - * Copyright (c) 2017 - * Netflix Inc. - * All rights reserved. + * Copyright (c) 2017 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/netinet/tcp_stacks/tcp_rack.h ============================================================================== --- head/sys/netinet/tcp_stacks/tcp_rack.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/netinet/tcp_stacks/tcp_rack.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2016 - * Netflix Inc. All rights reserved. + * Copyright (c) 2016 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/sys/boot.h ============================================================================== --- head/sys/sys/boot.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/sys/boot.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,9 +1,9 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2018 Netflix * Copyright (c) 2014 Roger Pau Monné * All rights reserved. + * Copyright (c) 2018 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/sys/efiio.h ============================================================================== --- head/sys/sys/efiio.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/sys/efiio.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2016 Netflix, Inc. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/sys/kern_prefetch.h ============================================================================== --- head/sys/sys/kern_prefetch.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/sys/kern_prefetch.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016-2018 Netflix Inc. + * Copyright (c) 2016-2018 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/tests/callout_test.h ============================================================================== --- head/sys/tests/callout_test.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/tests/callout_test.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,8 +1,7 @@ #ifndef __callout_test_h__ #define __callout_test_h__ /*- - * Copyright (c) 2015 - * Netflix Incorporated, All rights reserved. + * Copyright (c) 2015 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/tests/callout_test/callout_test.c ============================================================================== --- head/sys/tests/callout_test/callout_test.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/tests/callout_test/callout_test.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2015 Netflix Inc. All rights reserved. + * Copyright (c) 2015 Netflix, Inc. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: head/sys/tests/framework/kern_testfrwk.c ============================================================================== --- head/sys/tests/framework/kern_testfrwk.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/tests/framework/kern_testfrwk.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2015 - * Netflix Incorporated, All rights reserved. + * Copyright (c) 2015 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/tests/kern_testfrwk.h ============================================================================== --- head/sys/tests/kern_testfrwk.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/sys/tests/kern_testfrwk.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2015 - * Netflix Incorporated, All rights reserved. + * Copyright (c) 2015 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/usr.sbin/efibootmgr/efibootmgr.8 ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.8 Mon Feb 4 21:16:15 2019 (r343754) +++ head/usr.sbin/efibootmgr/efibootmgr.8 Mon Feb 4 21:28:25 2019 (r343755) @@ -1,5 +1,5 @@ -.\" Copyright (c) 2017-2018 Netflix, Inc -.\" All rights reserved. +.\" +.\" Copyright (c) 2017-2018 Netflix, Inc. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/usr.sbin/efibootmgr/efibootmgr.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017-2018 Netflix, Inc. - * 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/efidp/efidp.8 ============================================================================== --- head/usr.sbin/efidp/efidp.8 Mon Feb 4 21:16:15 2019 (r343754) +++ head/usr.sbin/efidp/efidp.8 Mon Feb 4 21:28:25 2019 (r343755) @@ -1,5 +1,5 @@ -.\" Copyright (c) 2017 Netflix, Inc -.\" All rights reserved. +.\" +.\" Copyright (c) 2017 Netflix, Inc. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/usr.sbin/efidp/efidp.c ============================================================================== --- head/usr.sbin/efidp/efidp.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/usr.sbin/efidp/efidp.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2016 Netflix, Inc. - * 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/efivar/efiutil.c ============================================================================== --- head/usr.sbin/efivar/efiutil.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/usr.sbin/efivar/efiutil.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017 Netflix, Inc. - * 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/efivar/efiutil.h ============================================================================== --- head/usr.sbin/efivar/efiutil.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/usr.sbin/efivar/efiutil.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017 Netflix, Inc. - * 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/efivar/efivar.8 ============================================================================== --- head/usr.sbin/efivar/efivar.8 Mon Feb 4 21:16:15 2019 (r343754) +++ head/usr.sbin/efivar/efivar.8 Mon Feb 4 21:28:25 2019 (r343755) @@ -1,5 +1,5 @@ -.\" Copyright (c) 2017 Netflix, Inc -.\" All rights reserved. +.\" +.\" Copyright (c) 2017 Netflix, Inc. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/usr.sbin/efivar/efivar.c ============================================================================== --- head/usr.sbin/efivar/efivar.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/usr.sbin/efivar/efivar.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2016 Netflix, Inc. - * 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/mpsutil/mps_cmd.c ============================================================================== --- head/usr.sbin/mpsutil/mps_cmd.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/usr.sbin/mpsutil/mps_cmd.c Mon Feb 4 21:28:25 2019 (r343755) @@ -2,7 +2,6 @@ * Copyright (c) 2015 Baptiste Daroussin * * Copyright (c) 2015 Netflix, Inc. - * All rights reserved. * Written by: Scott Long * * Copyright (c) 2008 Yahoo!, Inc. Modified: head/usr.sbin/mpsutil/mps_debug.c ============================================================================== --- head/usr.sbin/mpsutil/mps_debug.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/usr.sbin/mpsutil/mps_debug.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2018 Netflix, Inc. - * All rights reserved. * Written by: Scott Long * * Redistribution and use in source and binary forms, with or without Modified: head/usr.sbin/mpsutil/mps_show.c ============================================================================== --- head/usr.sbin/mpsutil/mps_show.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/usr.sbin/mpsutil/mps_show.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 Netflix, Inc. - * All rights reserved. * Written by: Scott Long * * Copyright (c) 2008 Yahoo!, Inc. Modified: head/usr.sbin/mpsutil/mpsutil.c ============================================================================== --- head/usr.sbin/mpsutil/mpsutil.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/usr.sbin/mpsutil/mpsutil.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 Netflix, Inc. - * All rights reserved. * Written by: Scott Long * * Copyright (c) 2008 Yahoo!, Inc. Modified: head/usr.sbin/pmcstat/pmcpl_annotate_cg.c ============================================================================== --- head/usr.sbin/pmcstat/pmcpl_annotate_cg.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/usr.sbin/pmcstat/pmcpl_annotate_cg.c Mon Feb 4 21:28:25 2019 (r343755) @@ -3,8 +3,10 @@ * * Copyright (c) 2005-2007, Joseph Koshy * Copyright (c) 2007 The FreeBSD Foundation - * Copyright (c) 2014, Adrian Chadd, Netflix Inc. * All rights reserved. + * + * Copyright (c) 2014 Netflix, Inc. + * Written by: Adrian Chadd * * Portions of this software were developed by A. Joseph Koshy under * sponsorship from the FreeBSD Foundation and Google, Inc. Modified: head/usr.sbin/pmcstat/pmcpl_annotate_cg.h ============================================================================== --- head/usr.sbin/pmcstat/pmcpl_annotate_cg.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/usr.sbin/pmcstat/pmcpl_annotate_cg.h Mon Feb 4 21:28:25 2019 (r343755) @@ -3,8 +3,10 @@ * * Copyright (c) 2005-2007, Joseph Koshy * Copyright (c) 2007 The FreeBSD Foundation - * Copyright (c) 2014, Adrian Chadd, Netflix Inc. * All rights reserved. + * + * Copyright (c) 2014 Netflix, Inc. + * Written by: Adrian Chadd * * Portions of this software were developed by A. Joseph Koshy under * sponsorship from the FreeBSD Foundation and Google, Inc. Modified: head/usr.sbin/pmcstudy/eval_expr.c ============================================================================== --- head/usr.sbin/pmcstudy/eval_expr.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/usr.sbin/pmcstudy/eval_expr.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2015 Netflix Inc. - * All rights reserved. + * Copyright (c) 2015 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/usr.sbin/pmcstudy/eval_expr.h ============================================================================== --- head/usr.sbin/pmcstudy/eval_expr.h Mon Feb 4 21:16:15 2019 (r343754) +++ head/usr.sbin/pmcstudy/eval_expr.h Mon Feb 4 21:28:25 2019 (r343755) @@ -1,8 +1,7 @@ #ifndef __eval_expr_h__ #define __eval_expr_h__ /*- - * Copyright (c) 2015 Netflix Inc. - * All rights reserved. + * Copyright (c) 2015 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/usr.sbin/pmcstudy/pmcstudy.8 ============================================================================== --- head/usr.sbin/pmcstudy/pmcstudy.8 Mon Feb 4 21:16:15 2019 (r343754) +++ head/usr.sbin/pmcstudy/pmcstudy.8 Mon Feb 4 21:28:25 2019 (r343755) @@ -1,5 +1,5 @@ -.\" Copyright (c) 2015 -.\" Netflix Inc. +.\" +.\" Copyright (c) 2015 Netflix, Inc. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/usr.sbin/pmcstudy/pmcstudy.c ============================================================================== --- head/usr.sbin/pmcstudy/pmcstudy.c Mon Feb 4 21:16:15 2019 (r343754) +++ head/usr.sbin/pmcstudy/pmcstudy.c Mon Feb 4 21:28:25 2019 (r343755) @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2014, 2015 Netflix Inc. - * All rights reserved. + * Copyright (c) 2014-2015 Netflix, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From owner-svn-src-head@freebsd.org Mon Feb 4 21:58:27 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4075514B46DF; Mon, 4 Feb 2019 21:58:27 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC6BF74990; Mon, 4 Feb 2019 21:58:25 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x14LwMlk038313; Mon, 4 Feb 2019 13:58:23 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x14LwMtP038312; Mon, 4 Feb 2019 13:58:22 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201902042158.x14LwMtP038312@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r343755 - in head: lib/libefivar sbin/devmatch sbin/nvmecontrol sbin/nvmecontrol/modules/wdc share/man/man4 share/man/man9 stand/efi/libefi stand/efi/loader stand/forth stand/i386/libi3... In-Reply-To: <201902042128.x14LSQc0089740@repo.freebsd.org> To: Warner Losh Date: Mon, 4 Feb 2019 13:58:22 -0800 (PST) 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: DC6BF74990 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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 21:58:27 -0000 > Author: imp > Date: Mon Feb 4 21:28:25 2019 > New Revision: 343755 > URL: https://svnweb.freebsd.org/changeset/base/343755 > > Log: > Regularize the Netflix copyright > > Use recent best practices for Copyright form at the top of > the license: > 1. Remove all the All Rights Reserved clauses on our stuff. Where we > piggybacked others, use a separate line to make things clear. Thank you, I think you missed at least one though. And a few other comments inline, I defanitly think we need to pull what was done here into an update of style(9), including the proper way to attribute "work done for hire". > 2. Use "Netflix, Inc." everywhere. > 3. Use a single line for the copyright for grep friendliness. > 4. Use date ranges in all places for our stuff. > > Approved by: Netflix Legal (who gave me the form), adrian@ (pmc files) > > Modified: > head/lib/libefivar/efi-osdep.h > head/lib/libefivar/efivar-dp-format.c > head/lib/libefivar/efivar-dp-parse.c > head/lib/libefivar/efivar-dp-xlate.c > head/lib/libefivar/efivar-dp.h > head/lib/libefivar/efivar.3 > head/lib/libefivar/efivar.c > head/lib/libefivar/efivar.h > head/lib/libefivar/uefi-dplib.h > head/lib/libefivar/uefi-dputil.c > head/sbin/devmatch/devmatch.8 > head/sbin/devmatch/devmatch.c > head/sbin/nvmecontrol/modules/wdc/wdc.c > head/sbin/nvmecontrol/nc_util.c > head/sbin/nvmecontrol/ns.c > head/sbin/nvmecontrol/nvmecontrol_ext.h > head/sbin/nvmecontrol/power.c > head/share/man/man4/nda.4 > head/share/man/man9/kern_testfrwk.9 > head/stand/efi/libefi/efienv.c > head/stand/efi/libefi/env.c > head/stand/efi/libefi/wchar.c > head/stand/efi/loader/main.c > head/stand/forth/efi.4th > head/stand/i386/libi386/biospci.c > head/stand/libsa/abort.c > head/stand/libsa/xlocale_private.h > head/sys/cam/nvme/nvme_all.c > head/sys/cam/nvme/nvme_all.h > head/sys/cam/nvme/nvme_da.c > head/sys/crypto/aesni/aesencdec.h > head/sys/dev/efidev/efidev.c > head/sys/dev/nvme/nvme_sim.c > head/sys/dev/tcp_log/tcp_log_dev.c > head/sys/dev/tcp_log/tcp_log_dev.h > head/sys/kern/subr_boot.c > head/sys/netinet/tcp_hpts.c > head/sys/netinet/tcp_hpts.h > head/sys/netinet/tcp_log_buf.c > head/sys/netinet/tcp_log_buf.h > head/sys/netinet/tcp_stacks/rack.c > head/sys/netinet/tcp_stacks/rack_bbr_common.h > head/sys/netinet/tcp_stacks/sack_filter.c > head/sys/netinet/tcp_stacks/sack_filter.h > head/sys/netinet/tcp_stacks/tcp_rack.h > head/sys/sys/boot.h > head/sys/sys/efiio.h > head/sys/sys/kern_prefetch.h > head/sys/tests/callout_test.h > head/sys/tests/callout_test/callout_test.c > head/sys/tests/framework/kern_testfrwk.c > head/sys/tests/kern_testfrwk.h > head/usr.sbin/efibootmgr/efibootmgr.8 > head/usr.sbin/efibootmgr/efibootmgr.c > head/usr.sbin/efidp/efidp.8 > head/usr.sbin/efidp/efidp.c > head/usr.sbin/efivar/efiutil.c > head/usr.sbin/efivar/efiutil.h > head/usr.sbin/efivar/efivar.8 > head/usr.sbin/efivar/efivar.c > head/usr.sbin/mpsutil/mps_cmd.c > head/usr.sbin/mpsutil/mps_debug.c > head/usr.sbin/mpsutil/mps_show.c > head/usr.sbin/mpsutil/mpsutil.c > head/usr.sbin/pmcstat/pmcpl_annotate_cg.c > head/usr.sbin/pmcstat/pmcpl_annotate_cg.h > head/usr.sbin/pmcstudy/eval_expr.c > head/usr.sbin/pmcstudy/eval_expr.h > head/usr.sbin/pmcstudy/pmcstudy.8 > head/usr.sbin/pmcstudy/pmcstudy.c > > Modified: head/lib/libefivar/efi-osdep.h > ============================================================================== > --- head/lib/libefivar/efi-osdep.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/lib/libefivar/efi-osdep.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2017 Netflix, Inc. > - * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/lib/libefivar/efivar-dp-format.c > ============================================================================== > --- head/lib/libefivar/efivar-dp-format.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/lib/libefivar/efivar-dp-format.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2017 Netflix, Inc. > - * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/lib/libefivar/efivar-dp-parse.c > ============================================================================== > --- head/lib/libefivar/efivar-dp-parse.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/lib/libefivar/efivar-dp-parse.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2017 Netflix, Inc. > - * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/lib/libefivar/efivar-dp-xlate.c > ============================================================================== > --- head/lib/libefivar/efivar-dp-xlate.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/lib/libefivar/efivar-dp-xlate.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2017 Netflix, Inc. > - * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/lib/libefivar/efivar-dp.h > ============================================================================== > --- head/lib/libefivar/efivar-dp.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/lib/libefivar/efivar-dp.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2017 Netflix, Inc. > - * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/lib/libefivar/efivar.3 > ============================================================================== > --- head/lib/libefivar/efivar.3 Mon Feb 4 21:16:15 2019 (r343754) > +++ head/lib/libefivar/efivar.3 Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,3 +1,4 @@ > +.\" > .\" Copyright 2016 Netflix, Inc. > .\" All rights reserved. I do not see any other copyright near this, so shouldnt this All rights reserved. gone away too? > .\" > > Modified: head/lib/libefivar/efivar.c > ============================================================================== > --- head/lib/libefivar/efivar.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/lib/libefivar/efivar.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2016 Netflix, Inc. > - * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/lib/libefivar/efivar.h > ============================================================================== > --- head/lib/libefivar/efivar.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/lib/libefivar/efivar.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2016 Netflix, Inc. > - * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/lib/libefivar/uefi-dplib.h > ============================================================================== > --- head/lib/libefivar/uefi-dplib.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/lib/libefivar/uefi-dplib.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2017 Netflix, Inc. > - * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/lib/libefivar/uefi-dputil.c > ============================================================================== > --- head/lib/libefivar/uefi-dputil.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/lib/libefivar/uefi-dputil.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2017 Netflix, Inc. > - * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sbin/devmatch/devmatch.8 > ============================================================================== > --- head/sbin/devmatch/devmatch.8 Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sbin/devmatch/devmatch.8 Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,7 +1,5 @@ > .\" > -.\" Copyright (c) 2017 Netflix, Inc > -.\" > -.\" All rights reserved. > +.\" Copyright (c) 2017 Netflix, Inc. > .\" > .\" Redistribution and use in source and binary forms, with or without > .\" modification, are permitted provided that the following conditions > > Modified: head/sbin/devmatch/devmatch.c > ============================================================================== > --- head/sbin/devmatch/devmatch.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sbin/devmatch/devmatch.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > - * Copyright (c) 2017 Netflix, Inc > - * All rights reserved. > + * Copyright (c) 2017 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sbin/nvmecontrol/modules/wdc/wdc.c > ============================================================================== > --- head/sbin/nvmecontrol/modules/wdc/wdc.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sbin/nvmecontrol/modules/wdc/wdc.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > - * Copyright (c) 2017 Netflix, Inc > - * All rights reserved. > + * Copyright (c) 2017 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sbin/nvmecontrol/nc_util.c > ============================================================================== > --- head/sbin/nvmecontrol/nc_util.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sbin/nvmecontrol/nc_util.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > - * Copyright (c) 2017 Netflix, Inc > - * All rights reserved. > + * Copyright (c) 2017 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sbin/nvmecontrol/ns.c > ============================================================================== > --- head/sbin/nvmecontrol/ns.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sbin/nvmecontrol/ns.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,7 +1,7 @@ > /*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > - * Copyright (c) 2017 Netflix, Inc > + * Copyright (c) 2017 Netflix, Inc. > * Copyright (C) 2018 Alexander Motin > * > * Redistribution and use in source and binary forms, with or without > > Modified: head/sbin/nvmecontrol/nvmecontrol_ext.h > ============================================================================== > --- head/sbin/nvmecontrol/nvmecontrol_ext.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sbin/nvmecontrol/nvmecontrol_ext.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,7 +1,7 @@ > /*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > - * Copyright (C) 2018 Netflix > + * Copyright (C) 2018 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sbin/nvmecontrol/power.c > ============================================================================== > --- head/sbin/nvmecontrol/power.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sbin/nvmecontrol/power.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > - * Copyright (c) 2016 Netflix, Inc > - * All rights reserved. > + * Copyright (c) 2016 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/share/man/man4/nda.4 > ============================================================================== > --- head/share/man/man4/nda.4 Mon Feb 4 21:16:15 2019 (r343754) > +++ head/share/man/man4/nda.4 Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,5 +1,5 @@ > -.\" Copyright (c) 2017 Netflix, Inc > -.\" All rights reserved. > +.\" > +.\" Copyright (c) 2017 Netflix, Inc. > .\" > .\" Redistribution and use in source and binary forms, with or without > .\" modification, are permitted provided that the following conditions > > Modified: head/share/man/man9/kern_testfrwk.9 > ============================================================================== > --- head/share/man/man9/kern_testfrwk.9 Mon Feb 4 21:16:15 2019 (r343754) > +++ head/share/man/man9/kern_testfrwk.9 Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > .\" > -.\" Copyright (c) 2015 Netflix Inc. > -.\" All rights reserved. > +.\" Copyright (c) 2015 Netflix, Inc. > .\" > .\" Redistribution and use in source and binary forms, with or without > .\" modification, are permitted provided that the following conditions > > Modified: head/stand/efi/libefi/efienv.c > ============================================================================== > --- head/stand/efi/libefi/efienv.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/stand/efi/libefi/efienv.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2018 Netflix, Inc. > - * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/stand/efi/libefi/env.c > ============================================================================== > --- head/stand/efi/libefi/env.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/stand/efi/libefi/env.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,5 +1,5 @@ > /* > - * Copyright (c) 2015 Netflix, Inc. All Rights Reserved. > + * Copyright (c) 2015 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/stand/efi/libefi/wchar.c > ============================================================================== > --- head/stand/efi/libefi/wchar.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/stand/efi/libefi/wchar.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,5 +1,5 @@ > /*- > - * Copyright 2016 Netflix, Inc. All Rights Reserved. > + * Copyright 2016 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/stand/efi/loader/main.c > ============================================================================== > --- head/stand/efi/loader/main.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/stand/efi/loader/main.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,9 +1,10 @@ > /*- > * Copyright (c) 2008-2010 Rui Paulo > * Copyright (c) 2006 Marcel Moolenaar > - * Copyright (c) 2018 Netflix, Inc > * All rights reserved. > * > + * Copyright (c) 2018 Netflix, Inc. > + * I like this solution to clearly making it not an "All rights reserved" situation. In the email we exchanged about changes to style(9) we should probably add something about this form/style. > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > > Modified: head/stand/forth/efi.4th > ============================================================================== > --- head/stand/forth/efi.4th Mon Feb 4 21:16:15 2019 (r343754) > +++ head/stand/forth/efi.4th Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,5 +1,5 @@ > -\ Copyright (c) 2016 Netflix, Inc > -\ All rights reserved. > +\ > +\ Copyright (c) 2016 Netflix, Inc. > \ > \ Redistribution and use in source and binary forms, with or without > \ modification, are permitted provided that the following conditions > > Modified: head/stand/i386/libi386/biospci.c > ============================================================================== > --- head/stand/i386/libi386/biospci.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/stand/i386/libi386/biospci.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,7 +1,8 @@ > /*- > * Copyright (c) 1998 Michael Smith > - * Copyright (c) 2016 Netflix, Inc > * All rights reserved. > + * > + * Copyright (c) 2016 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/stand/libsa/abort.c > ============================================================================== > --- head/stand/libsa/abort.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/stand/libsa/abort.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,5 +1,5 @@ > /* > - * Copyright (c) 2018 Netflix. All Rights Reserved. > + * Copyright (c) 2018 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/stand/libsa/xlocale_private.h > ============================================================================== > --- head/stand/libsa/xlocale_private.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/stand/libsa/xlocale_private.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,5 +1,5 @@ > /*- > - * Copyright (c) 2018 Netflix > + * Copyright (c) 2018 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/cam/nvme/nvme_all.c > ============================================================================== > --- head/sys/cam/nvme/nvme_all.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/cam/nvme/nvme_all.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,7 +1,7 @@ > /*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > - * Copyright (c) 2015 Netflix, Inc > + * Copyright (c) 2015 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/cam/nvme/nvme_all.h > ============================================================================== > --- head/sys/cam/nvme/nvme_all.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/cam/nvme/nvme_all.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,7 +1,7 @@ > /*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > - * Copyright (c) 2015 Netflix, Inc > + * Copyright (c) 2015 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/cam/nvme/nvme_da.c > ============================================================================== > --- head/sys/cam/nvme/nvme_da.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/cam/nvme/nvme_da.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,7 +1,7 @@ > /*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > - * Copyright (c) 2015 Netflix, Inc > + * Copyright (c) 2015 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/crypto/aesni/aesencdec.h > ============================================================================== > --- head/sys/crypto/aesni/aesencdec.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/crypto/aesni/aesencdec.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,7 +1,8 @@ > /*- > * Copyright 2013 John-Mark Gurney > - * Copyright 2015 Netflix, Inc. > * All rights reserved. > + * > + * Copyright 2015 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/dev/efidev/efidev.c > ============================================================================== > --- head/sys/dev/efidev/efidev.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/dev/efidev/efidev.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2016 Netflix, Inc. > - * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/dev/nvme/nvme_sim.c > ============================================================================== > --- head/sys/dev/nvme/nvme_sim.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/dev/nvme/nvme_sim.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,5 +1,5 @@ > /*- > - * Copyright (c) 2016 Netflix, Inc > + * Copyright (c) 2016 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/dev/tcp_log/tcp_log_dev.c > ============================================================================== > --- head/sys/dev/tcp_log/tcp_log_dev.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/dev/tcp_log/tcp_log_dev.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,8 +1,7 @@ > /*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > - * Copyright (c) 2016-2017 > - * Netflix Inc. All rights reserved. > + * Copyright (c) 2016-2017 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/dev/tcp_log/tcp_log_dev.h > ============================================================================== > --- head/sys/dev/tcp_log/tcp_log_dev.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/dev/tcp_log/tcp_log_dev.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,8 +1,7 @@ > /*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > - * Copyright (c) 2016 > - * Netflix Inc. All rights reserved. > + * Copyright (c) 2016 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/kern/subr_boot.c > ============================================================================== > --- head/sys/kern/subr_boot.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/kern/subr_boot.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -10,7 +10,7 @@ > * Copyright (c) 2014 Roger Pau Monn? > * All Rights Reserved. > * Copyright (c) 2018 Kyle Evans > - * Copyright (c) 2018 Netflix > + * Copyright (c) 2018 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/netinet/tcp_hpts.c > ============================================================================== > --- head/sys/netinet/tcp_hpts.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/netinet/tcp_hpts.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,5 +1,5 @@ > /*- > - * Copyright (c) 2016-2018 Netflix Inc. > + * Copyright (c) 2016-2018 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/netinet/tcp_hpts.h > ============================================================================== > --- head/sys/netinet/tcp_hpts.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/netinet/tcp_hpts.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,5 +1,5 @@ > /*- > - * Copyright (c) 2016-2018 Netflix Inc. > + * Copyright (c) 2016-2018 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/netinet/tcp_log_buf.c > ============================================================================== > --- head/sys/netinet/tcp_log_buf.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/netinet/tcp_log_buf.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,8 +1,7 @@ > /*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > - * Copyright (c) 2016-2018 > - * Netflix Inc. All rights reserved. > + * Copyright (c) 2016-2018 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/netinet/tcp_log_buf.h > ============================================================================== > --- head/sys/netinet/tcp_log_buf.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/netinet/tcp_log_buf.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,8 +1,7 @@ > /*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > - * Copyright (c) 2016-2018 > - * Netflix Inc. All rights reserved. > + * Copyright (c) 2016-2018 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/netinet/tcp_stacks/rack.c > ============================================================================== > --- head/sys/netinet/tcp_stacks/rack.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/netinet/tcp_stacks/rack.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > - * Copyright (c) 2016-2018 > - * Netflix Inc. All rights reserved. > + * Copyright (c) 2016-2018 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/netinet/tcp_stacks/rack_bbr_common.h > ============================================================================== > --- head/sys/netinet/tcp_stacks/rack_bbr_common.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/netinet/tcp_stacks/rack_bbr_common.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,9 +1,7 @@ > #ifndef __pacer_timer_h__ > #define __pacer_timer_h__ > /*- > - * Copyright (c) 2017 > - * Netflix Inc. > - * All rights reserved. > + * Copyright (c) 2017 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/netinet/tcp_stacks/sack_filter.c > ============================================================================== > --- head/sys/netinet/tcp_stacks/sack_filter.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/netinet/tcp_stacks/sack_filter.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,7 +1,5 @@ > /*- > - * Copyright (c) 2017 > - * Netflix Inc. > - * All rights reserved. > + * Copyright (c) 2017 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/netinet/tcp_stacks/sack_filter.h > ============================================================================== > --- head/sys/netinet/tcp_stacks/sack_filter.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/netinet/tcp_stacks/sack_filter.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,9 +1,7 @@ > #ifndef __sack_filter_h__ > #define __sack_filter_h__ > /*- > - * Copyright (c) 2017 > - * Netflix Inc. > - * All rights reserved. > + * Copyright (c) 2017 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/netinet/tcp_stacks/tcp_rack.h > ============================================================================== > --- head/sys/netinet/tcp_stacks/tcp_rack.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/netinet/tcp_stacks/tcp_rack.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > - * Copyright (c) 2016 > - * Netflix Inc. All rights reserved. > + * Copyright (c) 2016 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/sys/boot.h > ============================================================================== > --- head/sys/sys/boot.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/sys/boot.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,9 +1,9 @@ > /*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > - * Copyright (c) 2018 Netflix > * Copyright (c) 2014 Roger Pau Monn? > * All rights reserved. To be consistent with how you did this else where a * belongs here. > + * Copyright (c) 2018 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/sys/efiio.h > ============================================================================== > --- head/sys/sys/efiio.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/sys/efiio.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2016 Netflix, Inc. > - * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/sys/kern_prefetch.h > ============================================================================== > --- head/sys/sys/kern_prefetch.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/sys/kern_prefetch.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,5 +1,5 @@ > /*- > - * Copyright (c) 2016-2018 Netflix Inc. > + * Copyright (c) 2016-2018 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/tests/callout_test.h > ============================================================================== > --- head/sys/tests/callout_test.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/tests/callout_test.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,8 +1,7 @@ > #ifndef __callout_test_h__ > #define __callout_test_h__ > /*- > - * Copyright (c) 2015 > - * Netflix Incorporated, All rights reserved. > + * Copyright (c) 2015 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/tests/callout_test/callout_test.c > ============================================================================== > --- head/sys/tests/callout_test/callout_test.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/tests/callout_test/callout_test.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,5 +1,6 @@ > /*- > - * Copyright (c) 2015 Netflix Inc. All rights reserved. > + * Copyright (c) 2015 Netflix, Inc. > + * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > > Modified: head/sys/tests/framework/kern_testfrwk.c > ============================================================================== > --- head/sys/tests/framework/kern_testfrwk.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/tests/framework/kern_testfrwk.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > - * Copyright (c) 2015 > - * Netflix Incorporated, All rights reserved. > + * Copyright (c) 2015 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/sys/tests/kern_testfrwk.h > ============================================================================== > --- head/sys/tests/kern_testfrwk.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/sys/tests/kern_testfrwk.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > - * Copyright (c) 2015 > - * Netflix Incorporated, All rights reserved. > + * Copyright (c) 2015 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/usr.sbin/efibootmgr/efibootmgr.8 > ============================================================================== > --- head/usr.sbin/efibootmgr/efibootmgr.8 Mon Feb 4 21:16:15 2019 (r343754) > +++ head/usr.sbin/efibootmgr/efibootmgr.8 Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,5 +1,5 @@ > -.\" Copyright (c) 2017-2018 Netflix, Inc > -.\" All rights reserved. > +.\" > +.\" Copyright (c) 2017-2018 Netflix, Inc. > .\" > .\" Redistribution and use in source and binary forms, with or without > .\" modification, are permitted provided that the following conditions > > Modified: head/usr.sbin/efibootmgr/efibootmgr.c > ============================================================================== > --- head/usr.sbin/efibootmgr/efibootmgr.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/usr.sbin/efibootmgr/efibootmgr.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2017-2018 Netflix, Inc. > - * 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/efidp/efidp.8 > ============================================================================== > --- head/usr.sbin/efidp/efidp.8 Mon Feb 4 21:16:15 2019 (r343754) > +++ head/usr.sbin/efidp/efidp.8 Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,5 +1,5 @@ > -.\" Copyright (c) 2017 Netflix, Inc > -.\" All rights reserved. > +.\" > +.\" Copyright (c) 2017 Netflix, Inc. > .\" > .\" Redistribution and use in source and binary forms, with or without > .\" modification, are permitted provided that the following conditions > > Modified: head/usr.sbin/efidp/efidp.c > ============================================================================== > --- head/usr.sbin/efidp/efidp.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/usr.sbin/efidp/efidp.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2016 Netflix, Inc. > - * 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/efivar/efiutil.c > ============================================================================== > --- head/usr.sbin/efivar/efiutil.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/usr.sbin/efivar/efiutil.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2017 Netflix, Inc. > - * 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/efivar/efiutil.h > ============================================================================== > --- head/usr.sbin/efivar/efiutil.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/usr.sbin/efivar/efiutil.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2017 Netflix, Inc. > - * 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/efivar/efivar.8 > ============================================================================== > --- head/usr.sbin/efivar/efivar.8 Mon Feb 4 21:16:15 2019 (r343754) > +++ head/usr.sbin/efivar/efivar.8 Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,5 +1,5 @@ > -.\" Copyright (c) 2017 Netflix, Inc > -.\" All rights reserved. > +.\" > +.\" Copyright (c) 2017 Netflix, Inc. > .\" > .\" Redistribution and use in source and binary forms, with or without > .\" modification, are permitted provided that the following conditions > > Modified: head/usr.sbin/efivar/efivar.c > ============================================================================== > --- head/usr.sbin/efivar/efivar.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/usr.sbin/efivar/efivar.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2016 Netflix, Inc. > - * 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/mpsutil/mps_cmd.c > ============================================================================== > --- head/usr.sbin/mpsutil/mps_cmd.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/usr.sbin/mpsutil/mps_cmd.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -2,7 +2,6 @@ > * Copyright (c) 2015 Baptiste Daroussin > * > * Copyright (c) 2015 Netflix, Inc. > - * All rights reserved. > * Written by: Scott Long > * > * Copyright (c) 2008 Yahoo!, Inc. > > Modified: head/usr.sbin/mpsutil/mps_debug.c > ============================================================================== > --- head/usr.sbin/mpsutil/mps_debug.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/usr.sbin/mpsutil/mps_debug.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2018 Netflix, Inc. > - * All rights reserved. > * Written by: Scott Long > * > * Redistribution and use in source and binary forms, with or without > > Modified: head/usr.sbin/mpsutil/mps_show.c > ============================================================================== > --- head/usr.sbin/mpsutil/mps_show.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/usr.sbin/mpsutil/mps_show.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2015 Netflix, Inc. > - * All rights reserved. > * Written by: Scott Long > * > * Copyright (c) 2008 Yahoo!, Inc. > > Modified: head/usr.sbin/mpsutil/mpsutil.c > ============================================================================== > --- head/usr.sbin/mpsutil/mpsutil.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/usr.sbin/mpsutil/mpsutil.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > * Copyright (c) 2015 Netflix, Inc. > - * All rights reserved. > * Written by: Scott Long > * > * Copyright (c) 2008 Yahoo!, Inc. > > Modified: head/usr.sbin/pmcstat/pmcpl_annotate_cg.c > ============================================================================== > --- head/usr.sbin/pmcstat/pmcpl_annotate_cg.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/usr.sbin/pmcstat/pmcpl_annotate_cg.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -3,8 +3,10 @@ > * > * Copyright (c) 2005-2007, Joseph Koshy > * Copyright (c) 2007 The FreeBSD Foundation > - * Copyright (c) 2014, Adrian Chadd, Netflix Inc. > * All rights reserved. > + * > + * Copyright (c) 2014 Netflix, Inc. > + * Written by: Adrian Chadd I also like this, it is good form for expressing works done for hire. > * > * Portions of this software were developed by A. Joseph Koshy under > * sponsorship from the FreeBSD Foundation and Google, Inc. > > Modified: head/usr.sbin/pmcstat/pmcpl_annotate_cg.h > ============================================================================== > --- head/usr.sbin/pmcstat/pmcpl_annotate_cg.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/usr.sbin/pmcstat/pmcpl_annotate_cg.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -3,8 +3,10 @@ > * > * Copyright (c) 2005-2007, Joseph Koshy > * Copyright (c) 2007 The FreeBSD Foundation > - * Copyright (c) 2014, Adrian Chadd, Netflix Inc. > * All rights reserved. > + * > + * Copyright (c) 2014 Netflix, Inc. > + * Written by: Adrian Chadd > * > * Portions of this software were developed by A. Joseph Koshy under > * sponsorship from the FreeBSD Foundation and Google, Inc. > > Modified: head/usr.sbin/pmcstudy/eval_expr.c > ============================================================================== > --- head/usr.sbin/pmcstudy/eval_expr.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/usr.sbin/pmcstudy/eval_expr.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > - * Copyright (c) 2015 Netflix Inc. > - * All rights reserved. > + * Copyright (c) 2015 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/usr.sbin/pmcstudy/eval_expr.h > ============================================================================== > --- head/usr.sbin/pmcstudy/eval_expr.h Mon Feb 4 21:16:15 2019 (r343754) > +++ head/usr.sbin/pmcstudy/eval_expr.h Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,8 +1,7 @@ > #ifndef __eval_expr_h__ > #define __eval_expr_h__ > /*- > - * Copyright (c) 2015 Netflix Inc. > - * All rights reserved. > + * Copyright (c) 2015 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/usr.sbin/pmcstudy/pmcstudy.8 > ============================================================================== > --- head/usr.sbin/pmcstudy/pmcstudy.8 Mon Feb 4 21:16:15 2019 (r343754) > +++ head/usr.sbin/pmcstudy/pmcstudy.8 Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,5 +1,5 @@ > -.\" Copyright (c) 2015 > -.\" Netflix Inc. > +.\" > +.\" Copyright (c) 2015 Netflix, Inc. > .\" > .\" Redistribution and use in source and binary forms, with or without > .\" modification, are permitted provided that the following conditions > > Modified: head/usr.sbin/pmcstudy/pmcstudy.c > ============================================================================== > --- head/usr.sbin/pmcstudy/pmcstudy.c Mon Feb 4 21:16:15 2019 (r343754) > +++ head/usr.sbin/pmcstudy/pmcstudy.c Mon Feb 4 21:28:25 2019 (r343755) > @@ -1,6 +1,5 @@ > /*- > - * Copyright (c) 2014, 2015 Netflix Inc. > - * All rights reserved. > + * Copyright (c) 2014-2015 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Mon Feb 4 23:58:01 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB95D14B67A8; Mon, 4 Feb 2019 23:58:00 +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 8FCCC77C50; Mon, 4 Feb 2019 23:58: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 8365BD5F2; Mon, 4 Feb 2019 23:58: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 x14Nw0wA068510; Mon, 4 Feb 2019 23:58:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x14Nw06V068508; Mon, 4 Feb 2019 23:58:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902042358.x14Nw06V068508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 4 Feb 2019 23:58:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343757 - 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: 343757 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8FCCC77C50 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.968,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 23:58:01 -0000 Author: kib Date: Mon Feb 4 23:57:59 2019 New Revision: 343757 URL: https://svnweb.freebsd.org/changeset/base/343757 Log: Update CPUID bits definitions and CPU identification based on changes in SDM rev. 069. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/x86/include/specialreg.h head/sys/x86/x86/identcpu.c Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Mon Feb 4 22:38:34 2019 (r343756) +++ head/sys/x86/include/specialreg.h Mon Feb 4 23:57:59 2019 (r343757) @@ -436,7 +436,12 @@ #define CPUID_STDEXT2_UMIP 0x00000004 #define CPUID_STDEXT2_PKU 0x00000008 #define CPUID_STDEXT2_OSPKE 0x00000010 +#define CPUID_STDEXT2_WAITPKG 0x00000020 +#define CPUID_STDEXT2_GFNI 0x00000100 #define CPUID_STDEXT2_RDPID 0x00400000 +#define CPUID_STDEXT2_CLDEMOTE 0x02000000 +#define CPUID_STDEXT2_MOVDIRI 0x08000000 +#define CPUID_STDEXT2_MOVDIRI64B 0x10000000 #define CPUID_STDEXT2_SGXLC 0x40000000 /* @@ -446,6 +451,7 @@ #define CPUID_STDEXT3_STIBP 0x08000000 #define CPUID_STDEXT3_L1D_FLUSH 0x10000000 #define CPUID_STDEXT3_ARCH_CAP 0x20000000 +#define CPUID_STDEXT3_CORE_CAP 0x40000000 #define CPUID_STDEXT3_SSBD 0x80000000 /* MSR IA32_ARCH_CAP(ABILITIES) bits */ Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Mon Feb 4 22:38:34 2019 (r343756) +++ head/sys/x86/x86/identcpu.c Mon Feb 4 23:57:59 2019 (r343757) @@ -981,7 +981,12 @@ printcpuinfo(void) "\003UMIP" "\004PKU" "\005OSPKE" + "\006WAITPKG" + "\011GFNI" "\027RDPID" + "\032CLDEMOTE" + "\034MOVDIRI" + "\035MOVDIRI64B" "\037SGXLC" ); } @@ -994,6 +999,7 @@ printcpuinfo(void) "\034STIBP" "\035L1DFL" "\036ARCH_CAP" + "\037CORE_CAP" "\040SSBD" ); } From owner-svn-src-head@freebsd.org Tue Feb 5 00:31:27 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D369E14B71E7; Tue, 5 Feb 2019 00:31:26 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 7149580AAB; Tue, 5 Feb 2019 00:31:26 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 64FFADB57; Tue, 5 Feb 2019 00:31:26 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x150VQvi087303; Tue, 5 Feb 2019 00:31:26 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x150VQ2b087302; Tue, 5 Feb 2019 00:31:26 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201902050031.x150VQ2b087302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Tue, 5 Feb 2019 00:31:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343758 - head/lib/libpmc/pmu-events X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/lib/libpmc/pmu-events X-SVN-Commit-Revision: 343758 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7149580AAB 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.968,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 00:31:27 -0000 Author: mmacy Date: Tue Feb 5 00:31:25 2019 New Revision: 343758 URL: https://svnweb.freebsd.org/changeset/base/343758 Log: Fix deterministic builds by sorting input to fts in jevents Reported by: emaste@ Modified: head/lib/libpmc/pmu-events/jevents.c Modified: head/lib/libpmc/pmu-events/jevents.c ============================================================================== --- head/lib/libpmc/pmu-events/jevents.c Mon Feb 4 23:57:59 2019 (r343757) +++ head/lib/libpmc/pmu-events/jevents.c Tue Feb 5 00:31:25 2019 (r343758) @@ -54,6 +54,10 @@ #include "json.h" #include "jevents.h" +static int +nftw_ordered(const char *path, int (*fn)(const char *, const struct stat *, int, + struct FTW *), int nfds, int ftwflags); + _Noreturn void _Exit(int); int verbose; @@ -1122,7 +1126,7 @@ int main(int argc, char *argv[]) maxfds = get_maxfds(); mapfile = NULL; - rc = nftw(ldirname, preprocess_arch_std_files, maxfds, 0); + rc = nftw_ordered(ldirname, preprocess_arch_std_files, maxfds, 0); if (rc && verbose) { pr_info("%s: Error preprocessing arch standard files %s: %s\n", prog, ldirname, strerror(errno)); @@ -1135,7 +1139,7 @@ int main(int argc, char *argv[]) goto empty_map; } - rc = nftw(ldirname, process_one_file, maxfds, 0); + rc = nftw_ordered(ldirname, process_one_file, maxfds, 0); if (rc && verbose) { pr_info("%s: Error walking file tree %s\n", prog, ldirname); goto empty_map; @@ -1168,4 +1172,91 @@ empty_map: create_empty_mapping(output_file); free_arch_std_events(); return 0; +} + +#include + +static int +fts_compare(const FTSENT * const *a, const FTSENT * const *b) +{ + return (strcmp((*a)->fts_name, (*b)->fts_name)); +} + +static int +nftw_ordered(const char *path, int (*fn)(const char *, const struct stat *, int, + struct FTW *), int nfds, int ftwflags) +{ + char * const paths[2] = { (char *)path, NULL }; + struct FTW ftw; + FTSENT *cur; + FTS *ftsp; + int error = 0, ftsflags, fnflag, postorder, sverrno; + + /* XXX - nfds is currently unused */ + if (nfds < 1) { + errno = EINVAL; + return (-1); + } + + ftsflags = FTS_COMFOLLOW; + if (!(ftwflags & FTW_CHDIR)) + ftsflags |= FTS_NOCHDIR; + if (ftwflags & FTW_MOUNT) + ftsflags |= FTS_XDEV; + if (ftwflags & FTW_PHYS) + ftsflags |= FTS_PHYSICAL; + else + ftsflags |= FTS_LOGICAL; + postorder = (ftwflags & FTW_DEPTH) != 0; + ftsp = fts_open(paths, ftsflags, fts_compare); + if (ftsp == NULL) + return (-1); + while ((cur = fts_read(ftsp)) != NULL) { + switch (cur->fts_info) { + case FTS_D: + if (postorder) + continue; + fnflag = FTW_D; + break; + case FTS_DC: + continue; + case FTS_DNR: + fnflag = FTW_DNR; + break; + case FTS_DP: + if (!postorder) + continue; + fnflag = FTW_DP; + break; + case FTS_F: + case FTS_DEFAULT: + fnflag = FTW_F; + break; + case FTS_NS: + case FTS_NSOK: + fnflag = FTW_NS; + break; + case FTS_SL: + fnflag = FTW_SL; + break; + case FTS_SLNONE: + fnflag = FTW_SLN; + break; + default: + error = -1; + goto done; + } + ftw.base = cur->fts_pathlen - cur->fts_namelen; + ftw.level = cur->fts_level; + error = fn(cur->fts_path, cur->fts_statp, fnflag, &ftw); + if (error != 0) + break; + } +done: + sverrno = errno; + if (fts_close(ftsp) != 0 && error == 0) + error = -1; + else + errno = sverrno; + return (error); } From owner-svn-src-head@freebsd.org Tue Feb 5 03:32:59 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D4BF14C7060; Tue, 5 Feb 2019 03:32:59 +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 3E77C8B2DC; Tue, 5 Feb 2019 03:32:59 +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 3094218188; Tue, 5 Feb 2019 03:32:59 +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 x153WxXM086039; Tue, 5 Feb 2019 03:32:59 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x153WxsN086038; Tue, 5 Feb 2019 03:32:59 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201902050332.x153WxsN086038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 5 Feb 2019 03:32:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343761 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 343761 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3E77C8B2DC 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 03:32:59 -0000 Author: cem Date: Tue Feb 5 03:32:58 2019 New Revision: 343761 URL: https://svnweb.freebsd.org/changeset/base/343761 Log: extattr_list_vp: Only take shared vnode lock List is a 'read'-type operation that does not modify shared state; it's safe for multiple thread to proceed concurrently. This is reflected in the vnode operation LISTEXTATTR locking protocol specification, which only requires a shared lock. (Similar to previous r248933.) Reported by: Case van Rij Reviewed by: kib, mjg Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D19082 Modified: head/sys/kern/vfs_extattr.c Modified: head/sys/kern/vfs_extattr.c ============================================================================== --- head/sys/kern/vfs_extattr.c Tue Feb 5 03:01:10 2019 (r343760) +++ head/sys/kern/vfs_extattr.c Tue Feb 5 03:32:58 2019 (r343761) @@ -633,7 +633,7 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, v if (nbytes > IOSIZE_MAX) return (EINVAL); - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(vp, LK_SHARED | LK_RETRY); auiop = NULL; sizep = NULL; From owner-svn-src-head@freebsd.org Tue Feb 5 04:47:22 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DAB614C93E1; Tue, 5 Feb 2019 04:47:22 +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 2E6E68D4C0; Tue, 5 Feb 2019 04:47:22 +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 194D318DE9; Tue, 5 Feb 2019 04:47:22 +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 x154lLlc022619; Tue, 5 Feb 2019 04:47:21 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x154lLvQ022618; Tue, 5 Feb 2019 04:47:21 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201902050447.x154lLvQ022618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 5 Feb 2019 04:47:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343762 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 343762 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2E6E68D4C0 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.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 04:47:22 -0000 Author: cem Date: Tue Feb 5 04:47:21 2019 New Revision: 343762 URL: https://svnweb.freebsd.org/changeset/base/343762 Log: extattr_list_vp: Narrow locked section somewhat Suggested by: mjg Reviewed by: kib, mjg Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D19083 Modified: head/sys/kern/vfs_extattr.c Modified: head/sys/kern/vfs_extattr.c ============================================================================== --- head/sys/kern/vfs_extattr.c Tue Feb 5 03:32:58 2019 (r343761) +++ head/sys/kern/vfs_extattr.c Tue Feb 5 04:47:21 2019 (r343762) @@ -633,8 +633,6 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, v if (nbytes > IOSIZE_MAX) return (EINVAL); - vn_lock(vp, LK_SHARED | LK_RETRY); - auiop = NULL; sizep = NULL; cnt = 0; @@ -653,24 +651,25 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, v } else sizep = &size; + vn_lock(vp, LK_SHARED | LK_RETRY); + #ifdef MAC error = mac_vnode_check_listextattr(td->td_ucred, vp, attrnamespace); - if (error) - goto done; + if (error) { + VOP_UNLOCK(vp, 0); + return (error); + } #endif error = VOP_LISTEXTATTR(vp, attrnamespace, auiop, sizep, td->td_ucred, td); + VOP_UNLOCK(vp, 0); if (auiop != NULL) { cnt -= auio.uio_resid; td->td_retval[0] = cnt; } else td->td_retval[0] = size; -#ifdef MAC -done: -#endif - VOP_UNLOCK(vp, 0); return (error); } From owner-svn-src-head@freebsd.org Tue Feb 5 04:47:42 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A25F914C940D; Tue, 5 Feb 2019 04:47:42 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 417AE8D5F1; Tue, 5 Feb 2019 04:47:42 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 338D118DEE; Tue, 5 Feb 2019 04:47:42 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x154lf4E022680; Tue, 5 Feb 2019 04:47:41 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x154lfgU022679; Tue, 5 Feb 2019 04:47:41 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201902050447.x154lfgU022679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 5 Feb 2019 04:47:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343763 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 343763 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 417AE8D5F1 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 04:47:42 -0000 Author: jhibbits Date: Tue Feb 5 04:47:41 2019 New Revision: 343763 URL: https://svnweb.freebsd.org/changeset/base/343763 Log: powerpc: Don't idle with the wait instruction on booke It appears idling via 'wait' on e5500 causes strange behaviors, such as top(1) simply hanging sporadically, until input. Until this can possibly be sorted out (interrupt issue?), just don't idle on this hardware. The SoCs are low power already, and the wait state doesn't save much anyway. Modified: head/sys/powerpc/powerpc/cpu.c Modified: head/sys/powerpc/powerpc/cpu.c ============================================================================== --- head/sys/powerpc/powerpc/cpu.c Tue Feb 5 04:47:21 2019 (r343762) +++ head/sys/powerpc/powerpc/cpu.c Tue Feb 5 04:47:41 2019 (r343763) @@ -767,11 +767,6 @@ cpu_idle_booke(sbintime_t sbt) case FSL_E500mc: case FSL_E5500: case FSL_E6500: - /* - * Base binutils doesn't know what the 'wait' instruction is, so - * use the opcode encoding here. - */ - __asm __volatile(".long 0x7c00007c"); break; default: powerpc_sync(); From owner-svn-src-head@freebsd.org Tue Feb 5 06:25:36 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85D7914D0127; Tue, 5 Feb 2019 06:25:36 +0000 (UTC) (envelope-from jchandra@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 22ECF902D8; Tue, 5 Feb 2019 06:25:36 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1367A19F30; Tue, 5 Feb 2019 06:25:36 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x156PZeY074296; Tue, 5 Feb 2019 06:25:35 GMT (envelope-from jchandra@FreeBSD.org) Received: (from jchandra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x156PZbc074295; Tue, 5 Feb 2019 06:25:35 GMT (envelope-from jchandra@FreeBSD.org) Message-Id: <201902050625.x156PZbc074295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jchandra set sender to jchandra@FreeBSD.org using -f From: "Jayachandran C." Date: Tue, 5 Feb 2019 06:25:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343764 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: jchandra X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 343764 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 22ECF902D8 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 06:25:36 -0000 Author: jchandra Date: Tue Feb 5 06:25:35 2019 New Revision: 343764 URL: https://svnweb.freebsd.org/changeset/base/343764 Log: arm, acpi: increase size of memory region arrays Bump up MAX_HWCNT and MAX_EXCNT to 32 when ACPI is enabled. These are the sizes of the hwregions and exregions arrays respectively. ACPI firmware typically has more memory regions and the current value of 16 is not sufficient for some platforms. This commit fixes a failure seen with AMI firmware on Cavium's Sabre ThunderX2 reference platform. This platform needs 21 physical memory regions and 18 excluded regions to boot correctly with the current firmware release. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D19073 Modified: head/sys/arm/arm/physmem.c Modified: head/sys/arm/arm/physmem.c ============================================================================== --- head/sys/arm/arm/physmem.c Tue Feb 5 04:47:41 2019 (r343763) +++ head/sys/arm/arm/physmem.c Tue Feb 5 06:25:35 2019 (r343764) @@ -29,6 +29,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_acpi.h" #include "opt_ddb.h" /* @@ -48,8 +49,13 @@ __FBSDID("$FreeBSD$"); * that can be allocated, or both, depending on the exclusion flags associated * with the region. */ +#ifdef DEV_ACPI +#define MAX_HWCNT 32 /* ACPI needs more regions */ +#define MAX_EXCNT 32 +#else #define MAX_HWCNT 16 #define MAX_EXCNT 16 +#endif #if defined(__arm__) #define MAX_PHYS_ADDR 0xFFFFFFFFull From owner-svn-src-head@freebsd.org Tue Feb 5 10:13:52 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F7E214AF153; Tue, 5 Feb 2019 10:13:52 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 C55396A20E; Tue, 5 Feb 2019 10:13:51 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B82F01C778; Tue, 5 Feb 2019 10:13:51 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x15ADp1D093811; Tue, 5 Feb 2019 10:13:51 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15ADpNB093810; Tue, 5 Feb 2019 10:13:51 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201902051013.x15ADpNB093810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 5 Feb 2019 10:13:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343769 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 343769 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C55396A20E 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.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 10:13:52 -0000 Author: tuexen Date: Tue Feb 5 10:13:51 2019 New Revision: 343769 URL: https://svnweb.freebsd.org/changeset/base/343769 Log: Fix an off-by-one error in the input validation of the SCTP_RESET_STREAMS socketoption. This was found by running syzkaller. MFC after: 3 days Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Tue Feb 5 08:15:19 2019 (r343768) +++ head/sys/netinet/sctp_usrreq.c Tue Feb 5 10:13:51 2019 (r343769) @@ -4654,13 +4654,13 @@ sctp_setopt(struct socket *so, int optname, void *optv } for (i = 0; i < strrst->srs_number_streams; i++) { if ((send_in) && - (strrst->srs_stream_list[i] > stcb->asoc.streamincnt)) { + (strrst->srs_stream_list[i] >= stcb->asoc.streamincnt)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; break; } if ((send_out) && - (strrst->srs_stream_list[i] > stcb->asoc.streamoutcnt)) { + (strrst->srs_stream_list[i] >= stcb->asoc.streamoutcnt)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; break; From owner-svn-src-head@freebsd.org Tue Feb 5 10:17:49 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D730F14AF364; Tue, 5 Feb 2019 10:17:48 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2DBBD6A548; Tue, 5 Feb 2019 10:17:47 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 852273D60AA; Tue, 5 Feb 2019 21:17:44 +1100 (AEDT) Date: Tue, 5 Feb 2019 21:17:43 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ed Maste cc: Will Andrews , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325728 - head/lib/libkvm In-Reply-To: Message-ID: <20190205202145.A1080@besplex.bde.org> References: <201711112330.vABNUwXC077395@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=P6RKvmIu c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=DxQ8RM24wQtPGcW6wzQA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-Rspamd-Queue-Id: 2DBBD6A548 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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 10:17:49 -0000 On Mon, 4 Feb 2019, Ed Maste wrote: > On Sat, 11 Nov 2017 at 18:31, Will Andrews wrote: >> >> Author: will >> Date: Sat Nov 11 23:30:58 2017 >> New Revision: 325728 >> URL: https://svnweb.freebsd.org/changeset/base/325728 >> >> Log: >> libkvm: add kvm_walk_pages API. >> >> Modified: head/lib/libkvm/kvm.h >> ============================================================================== >> --- head/lib/libkvm/kvm.h Sat Nov 11 22:50:14 2017 (r325727) >> +++ head/lib/libkvm/kvm.h Sat Nov 11 23:30:58 2017 (r325728) >> @@ -36,6 +36,7 @@ >> #include Redundant. sys/types.h already includes this (more than once via nesting), and it is OK to depend on this, especially since sys/types.h depends on it much more than this header. >> #include Namespace pollution. Old versions were carefully written to not have this. They didn't use pollution like u_long, and included only >> #include Namespace pollution. Old versions have this. I fixed this in my version 15-20 years ago: XX Index: kvm.h XX =================================================================== XX RCS file: /home/ncvs/src/lib/libkvm/kvm.h,v XX retrieving revision 1.16 XX diff -u -2 -r1.16 kvm.h XX --- kvm.h 13 Oct 2003 04:44:55 -0000 1.16 XX +++ kvm.h 13 Oct 2003 04:46:29 -0000 XX @@ -40,5 +40,4 @@ XX #include XX #include XX -#include XX XX /* Default version symbol. */ XX @@ -59,4 +58,5 @@ XX XX struct kinfo_proc; XX +struct nlist; XX struct proc; >> +#include Larger, newer namespace pollution. >> >> /* Default version symbol. */ >> #define VRS_SYM "_version" >> @@ -73,7 +74,19 @@ struct kvm_swap { >> u_int ksw_reserved2; >> }; >> >> +struct kvm_page { >> + unsigned int version; This would be a style bug if the namespace pollution is allowed. 'unsigned int' is spelled u_int in the kernel and in system headers and files. But portable ones can't use it. The struct member name is also namespace pollution and a style bug. 'version' is in the application namespace and is especially likely to be used in applications, perhaps to #define it. Old structs in this header are careful to use a prefix for names. Unfortunately, the prefix in the one struct was ksw which is not obviousy related to kvm. Even the prefix kvm_ is not documented as being reserved in kvm(3). There was already massive breakage in this area: - old versions have the struct tags kinfo_proc and proc, and much more in the nlist include, but the above fix reduces this to a another struct tag. - the previous version has a private declaration of vm_prot_t to avoid the pollution of including vm/vm.h. This is nonsense now. - VRS_SYM and VRS_KEY are in the application namespace, and their names don't even give a hint that they are for kvm - member names n_* in struct kvm_nlist gives some of the pollution fixed by not including nlist.h - the type of the struct members in struct kvm_swap rotted from int to u_int - u_int for the name of type of the struct members in struct kvm_swap is pollution that is still carefully avoided in old parts of the file - the struct member names in struct kvm_page are in the apolication namespace - the struct member declarations in struct kvm_page are misformatted. They mostly use the pollution u_long, but one uses the verbose "unsigned int". The shorted type names can be formatted better - SWIF_DEV_PREFIX and LIBKVM_WALK_PAGES_VERSION are in the application namespace. The latter at least gives a hint that it is for vm - the prototype for kvm_counter_u64_fetch() uses u_long. Old prototypes are more careful - the declarations for kvm_walk_pages* are misformatted and unsorted. >> + u_long paddr; Further pollution in the type and struct member names. Further misformatting The include of sys/_types.h was apparently changed to sys/types.h to support using u_long. > This should probably be uin64_t to support cross-debugging cores from > 64-bit machines on 32-bit hosts; also for i386 PAE. Or, on IRC jhb > suggested we introduce a kpaddr_t typedef akin to kvaddr_t. The correct type is vm_paddr_t or maybe a kvm wrapper of this. kib just changed vm_paddr_t on i386. I don't like this (it gives another pessimization of i386) and it depends on a kernel option in my version. Applications can't use this kernel option so would have to use their own larger type. Even uint64_t might be too small. Hard-coding it is worse than hard-coding unsigned long. > >> + u_long kmap_vaddr; >> + u_long dmap_vaddr; > > These two should be kvaddr_t. Further pollution and style bugs in names, types and formatting. The implementation of this is another bug. It is declared in sys/types.h, so application headers like kvm.h can't use it without including lots of pollution. Maybe getting it was the original reason for changing the included and the pollution and style bugs from using u_long is bitrot. It is currently hard-coded as __uint64_t. That works for all supported arches now, but eventually some typedefs will actually be needed for their purpose of being implementation-depended and changeable. > >> + vm_prot_t prot; >> + u_long offset; > > off_t? Further pollution and style bugs in names, types and formatting. Maybe uoff_t. off_t is 64-bits signed so can't reach most kernel addresses on some 64-bit arches like amd64. off_t has the same expansion problems of any typedef'ed type. > >> + size_t len; Further pollution and style bugs 1 name and formatting. >> + /* end of version 1 */ >> +}; >> + >> #define SWIF_DEV_PREFIX 0x0002 >> +#define LIBKVM_WALK_PAGES_VERSION 1 Further pollution bugs in 1 name. The formatting is actually correct, but is inconsistent with the misformatting in the previous line. The new namespace pollution from the vm include doesn't seem to be actually used. vm_prot_t is used, but it is the one type in vm.h that is already declared here. The older change of including sys/types.h also defeats the careful ifdefs for the 2 standard types declared here. Bruce From owner-svn-src-head@freebsd.org Tue Feb 5 10:29:32 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 990C714AF921; Tue, 5 Feb 2019 10:29:32 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 352D26ABAC; Tue, 5 Feb 2019 10:29:32 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 25F321C927; Tue, 5 Feb 2019 10:29:32 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x15ATWBk099893; Tue, 5 Feb 2019 10:29:32 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15ATWtt099892; Tue, 5 Feb 2019 10:29:32 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201902051029.x15ATWtt099892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 5 Feb 2019 10:29:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343770 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 343770 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 352D26ABAC 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 10:29:32 -0000 Author: tuexen Date: Tue Feb 5 10:29:31 2019 New Revision: 343770 URL: https://svnweb.freebsd.org/changeset/base/343770 Log: Only reduce the PMTU after the send call. The only way to increase it, is via PMTUD. This fixes an MTU issue reported by Timo Voelker. MFC after: 3 days Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Tue Feb 5 10:13:51 2019 (r343769) +++ head/sys/netinet/sctp_output.c Tue Feb 5 10:29:31 2019 (r343770) @@ -4289,10 +4289,12 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, if (net->port) { mtu -= sizeof(struct udphdr); } - if ((stcb != NULL) && (stcb->asoc.smallest_mtu > mtu)) { - sctp_mtu_size_reset(inp, &stcb->asoc, mtu); + if (mtu < net->mtu) { + if ((stcb != NULL) && (stcb->asoc.smallest_mtu > mtu)) { + sctp_mtu_size_reset(inp, &stcb->asoc, mtu); + } + net->mtu = mtu; } - net->mtu = mtu; } } else if (ro->ro_rt == NULL) { /* route was freed */ @@ -4647,10 +4649,12 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, if (net->port) { mtu -= sizeof(struct udphdr); } - if ((stcb != NULL) && (stcb->asoc.smallest_mtu > mtu)) { - sctp_mtu_size_reset(inp, &stcb->asoc, mtu); + if (mtu < net->mtu) { + if ((stcb != NULL) && (stcb->asoc.smallest_mtu > mtu)) { + sctp_mtu_size_reset(inp, &stcb->asoc, mtu); + } + net->mtu = mtu; } - net->mtu = mtu; } } else if (ifp) { if (ND_IFINFO(ifp)->linkmtu && From owner-svn-src-head@freebsd.org Tue Feb 5 12:10:51 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31EF914B4D54; Tue, 5 Feb 2019 12:10:51 +0000 (UTC) (envelope-from vmaffione@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 03D296E495; Tue, 5 Feb 2019 12:10:51 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC95F1DA14; Tue, 5 Feb 2019 12:10:50 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x15CAoVB052350; Tue, 5 Feb 2019 12:10:50 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15CAnPq052340; Tue, 5 Feb 2019 12:10:49 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201902051210.x15CAnPq052340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 5 Feb 2019 12:10:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343772 - head/sys/dev/netmap X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/sys/dev/netmap X-SVN-Commit-Revision: 343772 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 03D296E495 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.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 12:10:51 -0000 Author: vmaffione Date: Tue Feb 5 12:10:48 2019 New Revision: 343772 URL: https://svnweb.freebsd.org/changeset/base/343772 Log: netmap: refactor logging macros and pipes Changelist: - Replace ND, D and RD macros with nm_prdis, nm_prinf, nm_prerr and nm_prlim, to avoid possible naming conflicts. - Add netmap_krings_mode_commit() helper function and use that to reduce code duplication. - Refactor pipes control code to export some functions that can be reused by the veth driver (on Linux) and epair(4). - Add check to reject API requests with version less than 11. - Small code refactoring for the null adapter. MFC after: 1 week Modified: head/sys/dev/netmap/if_ptnet.c head/sys/dev/netmap/if_vtnet_netmap.h head/sys/dev/netmap/netmap.c head/sys/dev/netmap/netmap_bdg.c head/sys/dev/netmap/netmap_freebsd.c head/sys/dev/netmap/netmap_generic.c head/sys/dev/netmap/netmap_kern.h head/sys/dev/netmap/netmap_legacy.c head/sys/dev/netmap/netmap_mem2.c head/sys/dev/netmap/netmap_monitor.c head/sys/dev/netmap/netmap_null.c head/sys/dev/netmap/netmap_offloadings.c head/sys/dev/netmap/netmap_pipe.c head/sys/dev/netmap/netmap_vale.c Modified: head/sys/dev/netmap/if_ptnet.c ============================================================================== --- head/sys/dev/netmap/if_ptnet.c Tue Feb 5 10:33:22 2019 (r343771) +++ head/sys/dev/netmap/if_ptnet.c Tue Feb 5 12:10:48 2019 (r343772) @@ -1151,10 +1151,10 @@ ptnet_sync_from_csb(struct ptnet_softc *sc, struct net kring->nr_hwtail = kring->rtail = kring->ring->tail = ktoa->hwtail; - ND("%d,%d: csb {hc %u h %u c %u ht %u}", t, i, + nm_prdis("%d,%d: csb {hc %u h %u c %u ht %u}", t, i, ktoa->hwcur, atok->head, atok->cur, ktoa->hwtail); - ND("%d,%d: kring {hc %u rh %u rc %u h %u c %u ht %u rt %u t %u}", + nm_prdis("%d,%d: kring {hc %u rh %u rc %u h %u c %u ht %u rt %u t %u}", t, i, kring->nr_hwcur, kring->rhead, kring->rcur, kring->ring->head, kring->ring->cur, kring->nr_hwtail, kring->rtail, kring->ring->tail); @@ -1179,7 +1179,6 @@ ptnet_nm_register(struct netmap_adapter *na, int onoff struct ptnet_softc *sc = if_getsoftc(ifp); int native = (na == &sc->ptna->hwup.up); struct ptnet_queue *pq; - enum txrx t; int ret = 0; int i; @@ -1194,7 +1193,7 @@ ptnet_nm_register(struct netmap_adapter *na, int onoff * in the RX rings, since we will not receive further interrupts * until these will be processed. */ if (native && !onoff && na->active_fds == 0) { - D("Exit netmap mode, re-enable interrupts"); + nm_prinf("Exit netmap mode, re-enable interrupts"); for (i = 0; i < sc->num_rings; i++) { pq = sc->queues + i; pq->atok->appl_need_kick = 1; @@ -1230,30 +1229,14 @@ ptnet_nm_register(struct netmap_adapter *na, int onoff /* If not native, don't call nm_set_native_flags, since we don't want * to replace if_transmit method, nor set NAF_NETMAP_ON */ if (native) { - for_rx_tx(t) { - for (i = 0; i <= nma_get_nrings(na, t); i++) { - struct netmap_kring *kring = NMR(na, t)[i]; - - if (nm_kring_pending_on(kring)) { - kring->nr_mode = NKR_NETMAP_ON; - } - } - } + netmap_krings_mode_commit(na, onoff); nm_set_native_flags(na); } } else { if (native) { nm_clear_native_flags(na); - for_rx_tx(t) { - for (i = 0; i <= nma_get_nrings(na, t); i++) { - struct netmap_kring *kring = NMR(na, t)[i]; - - if (nm_kring_pending_off(kring)) { - kring->nr_mode = NKR_NETMAP_OFF; - } - } - } + netmap_krings_mode_commit(na, onoff); } if (sc->ptna->backend_users == 0) { @@ -1728,7 +1711,7 @@ ptnet_drain_transmit_queue(struct ptnet_queue *pq, uns if (!PTNET_Q_TRYLOCK(pq)) { /* We failed to acquire the lock, schedule the taskqueue. */ - RD(1, "Deferring TX work"); + nm_prlim(1, "Deferring TX work"); if (may_resched) { taskqueue_enqueue(pq->taskq, &pq->task); } @@ -1738,7 +1721,7 @@ ptnet_drain_transmit_queue(struct ptnet_queue *pq, uns if (unlikely(!(ifp->if_drv_flags & IFF_DRV_RUNNING))) { PTNET_Q_UNLOCK(pq); - RD(1, "Interface is down"); + nm_prlim(1, "Interface is down"); return ENETDOWN; } @@ -1776,7 +1759,7 @@ ptnet_drain_transmit_queue(struct ptnet_queue *pq, uns break; } - RD(1, "Found more slots by doublecheck"); + nm_prlim(1, "Found more slots by doublecheck"); /* More slots were freed before reactivating * the interrupts. */ atok->appl_need_kick = 0; @@ -1815,7 +1798,7 @@ ptnet_drain_transmit_queue(struct ptnet_queue *pq, uns continue; } } - ND(1, "%s: [csum_flags %lX] vnet hdr: flags %x " + nm_prdis(1, "%s: [csum_flags %lX] vnet hdr: flags %x " "csum_start %u csum_ofs %u hdr_len = %u " "gso_size %u gso_type %x", __func__, mhead->m_pkthdr.csum_flags, vh->flags, @@ -1890,7 +1873,7 @@ ptnet_drain_transmit_queue(struct ptnet_queue *pq, uns } if (count >= budget && may_resched) { - DBG(RD(1, "out of budget: resched, %d mbufs pending\n", + DBG(nm_prlim(1, "out of budget: resched, %d mbufs pending\n", drbr_inuse(ifp, pq->bufring))); taskqueue_enqueue(pq->taskq, &pq->task); } @@ -1932,7 +1915,7 @@ ptnet_transmit(if_t ifp, struct mbuf *m) err = drbr_enqueue(ifp, pq->bufring, m); if (err) { /* ENOBUFS when the bufring is full */ - RD(1, "%s: drbr_enqueue() failed %d\n", + nm_prlim(1, "%s: drbr_enqueue() failed %d\n", __func__, err); pq->stats.errors ++; return err; @@ -2077,13 +2060,13 @@ host_sync: /* There is no good reason why host should * put the header in multiple netmap slots. * If this is the case, discard. */ - RD(1, "Fragmented vnet-hdr: dropping"); + nm_prlim(1, "Fragmented vnet-hdr: dropping"); head = ptnet_rx_discard(kring, head); pq->stats.iqdrops ++; deliver = 0; goto skip; } - ND(1, "%s: vnet hdr: flags %x csum_start %u " + nm_prdis(1, "%s: vnet hdr: flags %x csum_start %u " "csum_ofs %u hdr_len = %u gso_size %u " "gso_type %x", __func__, vh->flags, vh->csum_start, vh->csum_offset, vh->hdr_len, @@ -2147,7 +2130,7 @@ host_sync: /* The very last slot prepared by the host has * the NS_MOREFRAG set. Drop it and continue * the outer cycle (to do the double-check). */ - RD(1, "Incomplete packet: dropping"); + nm_prlim(1, "Incomplete packet: dropping"); m_freem(mhead); pq->stats.iqdrops ++; goto host_sync; @@ -2185,7 +2168,7 @@ host_sync: | VIRTIO_NET_HDR_F_DATA_VALID))) { if (unlikely(ptnet_rx_csum(mhead, vh))) { m_freem(mhead); - RD(1, "Csum offload error: dropping"); + nm_prlim(1, "Csum offload error: dropping"); pq->stats.iqdrops ++; deliver = 0; } @@ -2231,7 +2214,7 @@ escape: if (count >= budget && may_resched) { /* If we ran out of budget or the double-check found new * slots to process, schedule the taskqueue. */ - DBG(RD(1, "out of budget: resched h %u t %u\n", + DBG(nm_prlim(1, "out of budget: resched h %u t %u\n", head, ring->tail)); taskqueue_enqueue(pq->taskq, &pq->task); } @@ -2246,7 +2229,7 @@ ptnet_rx_task(void *context, int pending) { struct ptnet_queue *pq = context; - DBG(RD(1, "%s: pq #%u\n", __func__, pq->kring_id)); + DBG(nm_prlim(1, "%s: pq #%u\n", __func__, pq->kring_id)); ptnet_rx_eof(pq, PTNET_RX_BUDGET, true); } @@ -2255,7 +2238,7 @@ ptnet_tx_task(void *context, int pending) { struct ptnet_queue *pq = context; - DBG(RD(1, "%s: pq #%u\n", __func__, pq->kring_id)); + DBG(nm_prlim(1, "%s: pq #%u\n", __func__, pq->kring_id)); ptnet_drain_transmit_queue(pq, PTNET_TX_BUDGET, true); } @@ -2273,7 +2256,7 @@ ptnet_poll(if_t ifp, enum poll_cmd cmd, int budget) KASSERT(sc->num_rings > 0, ("Found no queues in while polling ptnet")); queue_budget = MAX(budget / sc->num_rings, 1); - RD(1, "Per-queue budget is %d", queue_budget); + nm_prlim(1, "Per-queue budget is %d", queue_budget); while (budget) { unsigned int rcnt = 0; Modified: head/sys/dev/netmap/if_vtnet_netmap.h ============================================================================== --- head/sys/dev/netmap/if_vtnet_netmap.h Tue Feb 5 10:33:22 2019 (r343771) +++ head/sys/dev/netmap/if_vtnet_netmap.h Tue Feb 5 12:10:48 2019 (r343772) @@ -90,7 +90,6 @@ vtnet_netmap_reg(struct netmap_adapter *na, int state) struct ifnet *ifp = na->ifp; struct vtnet_softc *sc = ifp->if_softc; int success; - enum txrx t; int i; /* Drain the taskqueues to make sure that there are no worker threads @@ -132,44 +131,11 @@ vtnet_netmap_reg(struct netmap_adapter *na, int state) success = (ifp->if_drv_flags & IFF_DRV_RUNNING) ? 0 : ENXIO; if (state) { - for_rx_tx(t) { - /* Hardware rings. */ - for (i = 0; i < nma_get_nrings(na, t); i++) { - struct netmap_kring *kring = NMR(na, t)[i]; - - if (nm_kring_pending_on(kring)) - kring->nr_mode = NKR_NETMAP_ON; - } - - /* Host rings. */ - for (i = 0; i < nma_get_host_nrings(na, t); i++) { - struct netmap_kring *kring = - NMR(na, t)[nma_get_nrings(na, t) + i]; - - if (nm_kring_pending_on(kring)) - kring->nr_mode = NKR_NETMAP_ON; - } - } + netmap_krings_mode_commit(na, state); + nm_set_native_flags(na); } else { nm_clear_native_flags(na); - for_rx_tx(t) { - /* Hardware rings. */ - for (i = 0; i < nma_get_nrings(na, t); i++) { - struct netmap_kring *kring = NMR(na, t)[i]; - - if (nm_kring_pending_off(kring)) - kring->nr_mode = NKR_NETMAP_OFF; - } - - /* Host rings. */ - for (i = 0; i < nma_get_host_nrings(na, t); i++) { - struct netmap_kring *kring = - NMR(na, t)[nma_get_nrings(na, t) + i]; - - if (nm_kring_pending_off(kring)) - kring->nr_mode = NKR_NETMAP_OFF; - } - } + netmap_krings_mode_commit(na, state); } VTNET_CORE_UNLOCK(sc); @@ -396,7 +362,7 @@ vtnet_netmap_rxsync(struct netmap_kring *kring, int fl /* Skip the virtio-net header. */ len -= sc->vtnet_hdr_size; if (unlikely(len < 0)) { - RD(1, "Truncated virtio-net-header, " + nm_prlim(1, "Truncated virtio-net-header, " "missing %d bytes", -len); len = 0; } @@ -408,7 +374,7 @@ vtnet_netmap_rxsync(struct netmap_kring *kring, int fl kring->nr_hwtail = nm_i; kring->nr_kflags &= ~NKR_PENDINTR; } - ND("[B] h %d c %d hwcur %d hwtail %d", ring->head, ring->cur, + nm_prdis("[B] h %d c %d hwcur %d hwtail %d", ring->head, ring->cur, kring->nr_hwcur, kring->nr_hwtail); /* @@ -423,7 +389,7 @@ vtnet_netmap_rxsync(struct netmap_kring *kring, int fl virtqueue_notify(vq); } - ND("[C] h %d c %d t %d hwcur %d hwtail %d", ring->head, ring->cur, + nm_prdis("[C] h %d c %d t %d hwcur %d hwtail %d", ring->head, ring->cur, ring->tail, kring->nr_hwcur, kring->nr_hwtail); return 0; Modified: head/sys/dev/netmap/netmap.c ============================================================================== --- head/sys/dev/netmap/netmap.c Tue Feb 5 10:33:22 2019 (r343771) +++ head/sys/dev/netmap/netmap.c Tue Feb 5 12:10:48 2019 (r343772) @@ -893,7 +893,7 @@ netmap_krings_create(struct netmap_adapter *na, u_int kring->rtail = kring->nr_hwtail = (t == NR_TX ? ndesc - 1 : 0); snprintf(kring->name, sizeof(kring->name) - 1, "%s %s%d", na->name, nm_txrx2str(t), i); - ND("ktx %s h %d c %d t %d", + nm_prdis("ktx %s h %d c %d t %d", kring->name, kring->rhead, kring->rcur, kring->rtail); err = nm_os_selinfo_init(&kring->si, kring->name); if (err) { @@ -955,7 +955,7 @@ netmap_hw_krings_delete(struct netmap_adapter *na) for (i = nma_get_nrings(na, NR_RX); i < lim; i++) { struct mbq *q = &NMR(na, NR_RX)[i]->rx_queue; - ND("destroy sw mbq with len %d", mbq_len(q)); + nm_prdis("destroy sw mbq with len %d", mbq_len(q)); mbq_purge(q); mbq_safe_fini(q); } @@ -1176,7 +1176,7 @@ netmap_grab_packets(struct netmap_kring *kring, struct if ((slot->flags & NS_FORWARD) == 0 && !force) continue; if (slot->len < 14 || slot->len > NETMAP_BUF_SIZE(na)) { - RD(5, "bad pkt at %d len %d", n, slot->len); + nm_prlim(5, "bad pkt at %d len %d", n, slot->len); continue; } slot->flags &= ~NS_FORWARD; // XXX needed ? @@ -1290,7 +1290,7 @@ netmap_txsync_to_host(struct netmap_kring *kring, int */ mbq_init(&q); netmap_grab_packets(kring, &q, 1 /* force */); - ND("have %d pkts in queue", mbq_len(&q)); + nm_prdis("have %d pkts in queue", mbq_len(&q)); kring->nr_hwcur = head; kring->nr_hwtail = head + lim; if (kring->nr_hwtail > lim) @@ -1338,7 +1338,7 @@ netmap_rxsync_from_host(struct netmap_kring *kring, in struct netmap_slot *slot = &ring->slot[nm_i]; m_copydata(m, 0, len, NMB(na, slot)); - ND("nm %d len %d", nm_i, len); + nm_prdis("nm %d len %d", nm_i, len); if (netmap_debug & NM_DEBUG_HOST) nm_prinf("%s", nm_dump_buf(NMB(na, slot),len, 128, NULL)); @@ -1603,7 +1603,7 @@ netmap_unget_na(struct netmap_adapter *na, struct ifne #define NM_FAIL_ON(t) do { \ if (unlikely(t)) { \ - RD(5, "%s: fail '" #t "' " \ + nm_prlim(5, "%s: fail '" #t "' " \ "h %d c %d t %d " \ "rh %d rc %d rt %d " \ "hc %d ht %d", \ @@ -1635,7 +1635,7 @@ nm_txsync_prologue(struct netmap_kring *kring, struct u_int cur = ring->cur; /* read only once */ u_int n = kring->nkr_num_slots; - ND(5, "%s kcur %d ktail %d head %d cur %d tail %d", + nm_prdis(5, "%s kcur %d ktail %d head %d cur %d tail %d", kring->name, kring->nr_hwcur, kring->nr_hwtail, ring->head, ring->cur, ring->tail); @@ -1671,7 +1671,7 @@ nm_txsync_prologue(struct netmap_kring *kring, struct } } if (ring->tail != kring->rtail) { - RD(5, "%s tail overwritten was %d need %d", kring->name, + nm_prlim(5, "%s tail overwritten was %d need %d", kring->name, ring->tail, kring->rtail); ring->tail = kring->rtail; } @@ -1698,7 +1698,7 @@ nm_rxsync_prologue(struct netmap_kring *kring, struct uint32_t const n = kring->nkr_num_slots; uint32_t head, cur; - ND(5,"%s kc %d kt %d h %d c %d t %d", + nm_prdis(5,"%s kc %d kt %d h %d c %d t %d", kring->name, kring->nr_hwcur, kring->nr_hwtail, ring->head, ring->cur, ring->tail); @@ -1733,7 +1733,7 @@ nm_rxsync_prologue(struct netmap_kring *kring, struct } } if (ring->tail != kring->rtail) { - RD(5, "%s tail overwritten was %d need %d", + nm_prlim(5, "%s tail overwritten was %d need %d", kring->name, ring->tail, kring->rtail); ring->tail = kring->rtail; @@ -1762,7 +1762,7 @@ netmap_ring_reinit(struct netmap_kring *kring) int errors = 0; // XXX KASSERT nm_kr_tryget - RD(10, "called for %s", kring->name); + nm_prlim(10, "called for %s", kring->name); // XXX probably wrong to trust userspace kring->rhead = ring->head; kring->rcur = ring->cur; @@ -1778,17 +1778,17 @@ netmap_ring_reinit(struct netmap_kring *kring) u_int idx = ring->slot[i].buf_idx; u_int len = ring->slot[i].len; if (idx < 2 || idx >= kring->na->na_lut.objtotal) { - RD(5, "bad index at slot %d idx %d len %d ", i, idx, len); + nm_prlim(5, "bad index at slot %d idx %d len %d ", i, idx, len); ring->slot[i].buf_idx = 0; ring->slot[i].len = 0; } else if (len > NETMAP_BUF_SIZE(kring->na)) { ring->slot[i].len = 0; - RD(5, "bad len at slot %d idx %d len %d", i, idx, len); + nm_prlim(5, "bad len at slot %d idx %d len %d", i, idx, len); } } if (errors) { - RD(10, "total %d errors", errors); - RD(10, "%s reinit, cur %d -> %d tail %d -> %d", + nm_prlim(10, "total %d errors", errors); + nm_prlim(10, "%s reinit, cur %d -> %d tail %d -> %d", kring->name, ring->cur, kring->nr_hwcur, ring->tail, kring->nr_hwtail); @@ -1825,7 +1825,7 @@ netmap_interp_ringid(struct netmap_priv_d *priv, uint3 case NR_REG_NULL: priv->np_qfirst[t] = 0; priv->np_qlast[t] = nma_get_nrings(na, t); - ND("ALL/PIPE: %s %d %d", nm_txrx2str(t), + nm_prdis("ALL/PIPE: %s %d %d", nm_txrx2str(t), priv->np_qfirst[t], priv->np_qlast[t]); break; case NR_REG_SW: @@ -1837,7 +1837,7 @@ netmap_interp_ringid(struct netmap_priv_d *priv, uint3 priv->np_qfirst[t] = (nr_mode == NR_REG_SW ? nma_get_nrings(na, t) : 0); priv->np_qlast[t] = netmap_all_rings(na, t); - ND("%s: %s %d %d", nr_mode == NR_REG_SW ? "SW" : "NIC+SW", + nm_prdis("%s: %s %d %d", nr_mode == NR_REG_SW ? "SW" : "NIC+SW", nm_txrx2str(t), priv->np_qfirst[t], priv->np_qlast[t]); break; @@ -1853,7 +1853,7 @@ netmap_interp_ringid(struct netmap_priv_d *priv, uint3 j = 0; priv->np_qfirst[t] = j; priv->np_qlast[t] = j + 1; - ND("ONE_NIC: %s %d %d", nm_txrx2str(t), + nm_prdis("ONE_NIC: %s %d %d", nm_txrx2str(t), priv->np_qfirst[t], priv->np_qlast[t]); break; default: @@ -1962,7 +1962,7 @@ netmap_krings_get(struct netmap_priv_d *priv) if ((kring->nr_kflags & NKR_EXCLUSIVE) || (kring->users && excl)) { - ND("ring %s busy", kring->name); + nm_prdis("ring %s busy", kring->name); return EBUSY; } } @@ -1997,7 +1997,7 @@ netmap_krings_put(struct netmap_priv_d *priv) int excl = (priv->np_flags & NR_EXCLUSIVE); enum txrx t; - ND("%s: releasing tx [%d, %d) rx [%d, %d)", + nm_prdis("%s: releasing tx [%d, %d) rx [%d, %d)", na->name, priv->np_qfirst[NR_TX], priv->np_qlast[NR_TX], @@ -2262,7 +2262,7 @@ netmap_do_regif(struct netmap_priv_d *priv, struct net error = netmap_mem_get_lut(na->nm_mem, &na->na_lut); if (error) goto err_drop_mem; - ND("lut %p bufs %u size %u", na->na_lut.lut, na->na_lut.objtotal, + nm_prdis("lut %p bufs %u size %u", na->na_lut.lut, na->na_lut.objtotal, na->na_lut.objsize); /* ring configuration may have changed, fetch from the card */ @@ -2284,7 +2284,7 @@ netmap_do_regif(struct netmap_priv_d *priv, struct net /* This netmap adapter is attached to an ifnet. */ unsigned mtu = nm_os_ifnet_mtu(na->ifp); - ND("%s: mtu %d rx_buf_maxsize %d netmap_buf_size %d", + nm_prdis("%s: mtu %d rx_buf_maxsize %d netmap_buf_size %d", na->name, mtu, na->rx_buf_maxsize, NETMAP_BUF_SIZE(na)); if (na->rx_buf_maxsize == 0) { @@ -2381,7 +2381,7 @@ nm_sync_finalize(struct netmap_kring *kring) */ kring->ring->tail = kring->rtail = kring->nr_hwtail; - ND(5, "%s now hwcur %d hwtail %d head %d cur %d tail %d", + nm_prdis(5, "%s now hwcur %d hwtail %d head %d cur %d tail %d", kring->name, kring->nr_hwcur, kring->nr_hwtail, kring->rhead, kring->rcur, kring->rtail); } @@ -3711,7 +3711,8 @@ netmap_attach_ext(struct netmap_adapter *arg, size_t s hwna->up.nm_dtor = netmap_hw_dtor; } - if_printf(ifp, "netmap queues/slots: TX %d/%d, RX %d/%d\n", + nm_prinf("%s: netmap queues/slots: TX %d/%d, RX %d/%d\n", + hwna->up.name, hwna->up.num_tx_rings, hwna->up.num_tx_desc, hwna->up.num_rx_rings, hwna->up.num_rx_desc); return 0; @@ -3779,7 +3780,7 @@ netmap_hw_krings_create(struct netmap_adapter *na) for (i = na->num_rx_rings; i < lim; i++) { mbq_safe_init(&NMR(na, NR_RX)[i]->rx_queue); } - ND("initialized sw rx queue %d", na->num_rx_rings); + nm_prdis("initialized sw rx queue %d", na->num_rx_rings); } return ret; } @@ -3880,13 +3881,13 @@ netmap_transmit(struct ifnet *ifp, struct mbuf *m) if (!netmap_generic_hwcsum) { if (nm_os_mbuf_has_csum_offld(m)) { - RD(1, "%s drop mbuf that needs checksum offload", na->name); + nm_prlim(1, "%s drop mbuf that needs checksum offload", na->name); goto done; } } if (nm_os_mbuf_has_seg_offld(m)) { - RD(1, "%s drop mbuf that needs generic segmentation offload", na->name); + nm_prlim(1, "%s drop mbuf that needs generic segmentation offload", na->name); goto done; } @@ -3906,11 +3907,11 @@ netmap_transmit(struct ifnet *ifp, struct mbuf *m) if (busy < 0) busy += kring->nkr_num_slots; if (busy + mbq_len(q) >= kring->nkr_num_slots - 1) { - RD(2, "%s full hwcur %d hwtail %d qlen %d", na->name, + nm_prlim(2, "%s full hwcur %d hwtail %d qlen %d", na->name, kring->nr_hwcur, kring->nr_hwtail, mbq_len(q)); } else { mbq_enqueue(q, m); - ND(2, "%s %d bufs in queue", na->name, mbq_len(q)); + nm_prdis(2, "%s %d bufs in queue", na->name, mbq_len(q)); /* notify outside the lock */ m = NULL; error = 0; @@ -3946,7 +3947,7 @@ netmap_reset(struct netmap_adapter *na, enum txrx tx, int new_hwofs, lim; if (!nm_native_on(na)) { - ND("interface not in native netmap mode"); + nm_prdis("interface not in native netmap mode"); return NULL; /* nothing to reinitialize */ } @@ -4088,7 +4089,7 @@ netmap_rx_irq(struct ifnet *ifp, u_int q, u_int *work_ return NM_IRQ_PASS; if (na->na_flags & NAF_SKIP_INTR) { - ND("use regular interrupt"); + nm_prdis("use regular interrupt"); return NM_IRQ_PASS; } @@ -4127,6 +4128,25 @@ nm_clear_native_flags(struct netmap_adapter *na) nm_os_onexit(ifp); na->na_flags &= ~NAF_NETMAP_ON; +} + +void +netmap_krings_mode_commit(struct netmap_adapter *na, int onoff) +{ + enum txrx t; + + for_rx_tx(t) { + int i; + + for (i = 0; i < netmap_real_rings(na, t); i++) { + struct netmap_kring *kring = NMR(na, t)[i]; + + if (onoff && nm_kring_pending_on(kring)) + kring->nr_mode = NKR_NETMAP_ON; + else if (!onoff && nm_kring_pending_off(kring)) + kring->nr_mode = NKR_NETMAP_OFF; + } + } } /* Modified: head/sys/dev/netmap/netmap_bdg.c ============================================================================== --- head/sys/dev/netmap/netmap_bdg.c Tue Feb 5 10:33:22 2019 (r343771) +++ head/sys/dev/netmap/netmap_bdg.c Tue Feb 5 12:10:48 2019 (r343772) @@ -203,14 +203,14 @@ nm_find_bridge(const char *name, int create, struct ne } else if (x->bdg_namelen != namelen) { continue; } else if (strncmp(name, x->bdg_basename, namelen) == 0) { - ND("found '%.*s' at %d", namelen, name, i); + nm_prdis("found '%.*s' at %d", namelen, name, i); b = x; break; } } if (i == num_bridges && b) { /* name not found, can create entry */ /* initialize the bridge */ - ND("create new bridge %s with ports %d", b->bdg_basename, + nm_prdis("create new bridge %s with ports %d", b->bdg_basename, b->bdg_active_ports); b->ht = nm_os_malloc(sizeof(struct nm_hash_ent) * NM_BDG_HASH); if (b->ht == NULL) { @@ -239,7 +239,7 @@ netmap_bdg_free(struct nm_bridge *b) return EBUSY; } - ND("marking bridge %s as free", b->bdg_basename); + nm_prdis("marking bridge %s as free", b->bdg_basename); nm_os_free(b->ht); memset(&b->bdg_ops, 0, sizeof(b->bdg_ops)); memset(&b->bdg_saved_ops, 0, sizeof(b->bdg_saved_ops)); @@ -312,13 +312,13 @@ netmap_bdg_detach_common(struct nm_bridge *b, int hw, memcpy(b->tmp_bdg_port_index, b->bdg_port_index, sizeof(b->tmp_bdg_port_index)); for (i = 0; (hw >= 0 || sw >= 0) && i < lim; ) { if (hw >= 0 && tmp[i] == hw) { - ND("detach hw %d at %d", hw, i); + nm_prdis("detach hw %d at %d", hw, i); lim--; /* point to last active port */ tmp[i] = tmp[lim]; /* swap with i */ tmp[lim] = hw; /* now this is inactive */ hw = -1; } else if (sw >= 0 && tmp[i] == sw) { - ND("detach sw %d at %d", sw, i); + nm_prdis("detach sw %d at %d", sw, i); lim--; tmp[i] = tmp[lim]; tmp[lim] = sw; @@ -342,7 +342,7 @@ netmap_bdg_detach_common(struct nm_bridge *b, int hw, b->bdg_active_ports = lim; BDG_WUNLOCK(b); - ND("now %d active ports", lim); + nm_prdis("now %d active ports", lim); netmap_bdg_free(b); } @@ -408,7 +408,7 @@ netmap_get_bdg_na(struct nmreq_header *hdr, struct net b = nm_find_bridge(nr_name, create, ops); if (b == NULL) { - ND("no bridges available for '%s'", nr_name); + nm_prdis("no bridges available for '%s'", nr_name); return (create ? ENOMEM : ENXIO); } if (strlen(nr_name) < b->bdg_namelen) /* impossible */ @@ -425,10 +425,10 @@ netmap_get_bdg_na(struct nmreq_header *hdr, struct net for (j = 0; j < b->bdg_active_ports; j++) { i = b->bdg_port_index[j]; vpna = b->bdg_ports[i]; - ND("checking %s", vpna->up.name); + nm_prdis("checking %s", vpna->up.name); if (!strcmp(vpna->up.name, nr_name)) { netmap_adapter_get(&vpna->up); - ND("found existing if %s refs %d", nr_name) + nm_prdis("found existing if %s refs %d", nr_name) *na = &vpna->up; return 0; } @@ -445,7 +445,7 @@ netmap_get_bdg_na(struct nmreq_header *hdr, struct net /* record the next two ports available, but do not allocate yet */ cand = b->bdg_port_index[b->bdg_active_ports]; cand2 = b->bdg_port_index[b->bdg_active_ports + 1]; - ND("+++ bridge %s port %s used %d avail %d %d", + nm_prdis("+++ bridge %s port %s used %d avail %d %d", b->bdg_basename, ifname, b->bdg_active_ports, cand, cand2); /* @@ -515,7 +515,7 @@ netmap_get_bdg_na(struct nmreq_header *hdr, struct net BDG_WLOCK(b); vpna->bdg_port = cand; - ND("NIC %p to bridge port %d", vpna, cand); + nm_prdis("NIC %p to bridge port %d", vpna, cand); /* bind the port to the bridge (virtual ports are not active) */ b->bdg_ports[cand] = vpna; vpna->na_bdg = b; @@ -526,9 +526,9 @@ netmap_get_bdg_na(struct nmreq_header *hdr, struct net hostna->bdg_port = cand2; hostna->na_bdg = b; b->bdg_active_ports++; - ND("host %p to bridge port %d", hostna, cand2); + nm_prdis("host %p to bridge port %d", hostna, cand2); } - ND("if %s refs %d", ifname, vpna->up.na_refcount); + nm_prdis("if %s refs %d", ifname, vpna->up.na_refcount); BDG_WUNLOCK(b); *na = &vpna->up; netmap_adapter_get(*na); @@ -920,8 +920,6 @@ netmap_vp_reg(struct netmap_adapter *na, int onoff) { struct netmap_vp_adapter *vpna = (struct netmap_vp_adapter*)na; - enum txrx t; - int i; /* persistent ports may be put in netmap mode * before being attached to a bridge @@ -929,14 +927,7 @@ netmap_vp_reg(struct netmap_adapter *na, int onoff) if (vpna->na_bdg) BDG_WLOCK(vpna->na_bdg); if (onoff) { - for_rx_tx(t) { - for (i = 0; i < netmap_real_rings(na, t); i++) { - struct netmap_kring *kring = NMR(na, t)[i]; - - if (nm_kring_pending_on(kring)) - kring->nr_mode = NKR_NETMAP_ON; - } - } + netmap_krings_mode_commit(na, onoff); if (na->active_fds == 0) na->na_flags |= NAF_NETMAP_ON; /* XXX on FreeBSD, persistent VALE ports should also @@ -945,14 +936,7 @@ netmap_vp_reg(struct netmap_adapter *na, int onoff) } else { if (na->active_fds == 0) na->na_flags &= ~NAF_NETMAP_ON; - for_rx_tx(t) { - for (i = 0; i < netmap_real_rings(na, t); i++) { - struct netmap_kring *kring = NMR(na, t)[i]; - - if (nm_kring_pending_off(kring)) - kring->nr_mode = NKR_NETMAP_OFF; - } - } + netmap_krings_mode_commit(na, onoff); } if (vpna->na_bdg) BDG_WUNLOCK(vpna->na_bdg); @@ -1077,7 +1061,7 @@ netmap_bwrap_dtor(struct netmap_adapter *na) (bh ? bna->host.bdg_port : -1)); } - ND("na %p", na); + nm_prdis("na %p", na); na->ifp = NULL; bna->host.up.ifp = NULL; hwna->na_vp = bna->saved_na_vp; @@ -1182,7 +1166,7 @@ netmap_bwrap_reg(struct netmap_adapter *na, int onoff) int error, i; enum txrx t; - ND("%s %s", na->name, onoff ? "on" : "off"); + nm_prdis("%s %s", na->name, onoff ? "on" : "off"); if (onoff) { /* netmap_do_regif has been called on the bwrap na. @@ -1387,7 +1371,7 @@ netmap_bwrap_krings_delete_common(struct netmap_adapte enum txrx t; int i; - ND("%s", na->name); + nm_prdis("%s", na->name); /* decrement the usage counter for all the hwna krings */ for_rx_tx(t) { @@ -1414,7 +1398,7 @@ netmap_bwrap_notify(struct netmap_kring *kring, int fl struct netmap_kring *hw_kring; int error; - ND("%s: na %s hwna %s", + nm_prdis("%s: na %s hwna %s", (kring ? kring->name : "NULL!"), (na ? na->name : "NULL!"), (hwna ? hwna->name : "NULL!")); @@ -1426,7 +1410,7 @@ netmap_bwrap_notify(struct netmap_kring *kring, int fl /* first step: simulate a user wakeup on the rx ring */ netmap_vp_rxsync(kring, flags); - ND("%s[%d] PRE rx(c%3d t%3d l%3d) ring(h%3d c%3d t%3d) tx(c%3d ht%3d t%3d)", + nm_prdis("%s[%d] PRE rx(c%3d t%3d l%3d) ring(h%3d c%3d t%3d) tx(c%3d ht%3d t%3d)", na->name, ring_n, kring->nr_hwcur, kring->nr_hwtail, kring->nkr_hwlease, kring->rhead, kring->rcur, kring->rtail, @@ -1445,7 +1429,7 @@ netmap_bwrap_notify(struct netmap_kring *kring, int fl /* fourth step: the user goes to sleep again, causing another rxsync */ netmap_vp_rxsync(kring, flags); - ND("%s[%d] PST rx(c%3d t%3d l%3d) ring(h%3d c%3d t%3d) tx(c%3d ht%3d t%3d)", + nm_prdis("%s[%d] PST rx(c%3d t%3d l%3d) ring(h%3d c%3d t%3d) tx(c%3d ht%3d t%3d)", na->name, ring_n, kring->nr_hwcur, kring->nr_hwtail, kring->nkr_hwlease, kring->rhead, kring->rcur, kring->rtail, @@ -1595,7 +1579,7 @@ netmap_bwrap_attach_common(struct netmap_adapter *na, if (hwna->na_flags & NAF_MOREFRAG) na->na_flags |= NAF_MOREFRAG; - ND("%s<->%s txr %d txd %d rxr %d rxd %d", + nm_prdis("%s<->%s txr %d txd %d rxr %d rxd %d", na->name, ifp->if_xname, na->num_tx_rings, na->num_tx_desc, na->num_rx_rings, na->num_rx_desc); Modified: head/sys/dev/netmap/netmap_freebsd.c ============================================================================== --- head/sys/dev/netmap/netmap_freebsd.c Tue Feb 5 10:33:22 2019 (r343771) +++ head/sys/dev/netmap/netmap_freebsd.c Tue Feb 5 12:10:48 2019 (r343772) @@ -1350,8 +1350,6 @@ nm_os_kctx_destroy(struct nm_kctx *nmk) void nm_os_selwakeup(struct nm_selinfo *si) { - if (netmap_verbose) - nm_prinf("on knote %p", &si->si.si_note); selwakeuppri(&si->si, PI_NET); taskqueue_enqueue(si->ntfytq, &si->ntfytask); } Modified: head/sys/dev/netmap/netmap_generic.c ============================================================================== --- head/sys/dev/netmap/netmap_generic.c Tue Feb 5 10:33:22 2019 (r343771) +++ head/sys/dev/netmap/netmap_generic.c Tue Feb 5 12:10:48 2019 (r343772) @@ -237,18 +237,7 @@ generic_netmap_unregister(struct netmap_adapter *na) nm_os_catch_tx(gna, 0); } - for_each_rx_kring_h(r, kring, na) { - if (nm_kring_pending_off(kring)) { - nm_prinf("Emulated adapter: ring '%s' deactivated", kring->name); - kring->nr_mode = NKR_NETMAP_OFF; - } - } - for_each_tx_kring_h(r, kring, na) { - if (nm_kring_pending_off(kring)) { - kring->nr_mode = NKR_NETMAP_OFF; - nm_prinf("Emulated adapter: ring '%s' deactivated", kring->name); - } - } + netmap_krings_mode_commit(na, /*onoff=*/0); for_each_rx_kring(r, kring, na) { /* Free the mbufs still pending in the RX queues, @@ -371,19 +360,7 @@ generic_netmap_register(struct netmap_adapter *na, int } } - for_each_rx_kring_h(r, kring, na) { - if (nm_kring_pending_on(kring)) { - nm_prinf("Emulated adapter: ring '%s' activated", kring->name); - kring->nr_mode = NKR_NETMAP_ON; - } - - } - for_each_tx_kring_h(r, kring, na) { - if (nm_kring_pending_on(kring)) { - nm_prinf("Emulated adapter: ring '%s' activated", kring->name); - kring->nr_mode = NKR_NETMAP_ON; - } - } + netmap_krings_mode_commit(na, /*onoff=*/1); for_each_tx_kring(r, kring, na) { /* Initialize tx_pool and tx_event. */ Modified: head/sys/dev/netmap/netmap_kern.h ============================================================================== --- head/sys/dev/netmap/netmap_kern.h Tue Feb 5 10:33:22 2019 (r343771) +++ head/sys/dev/netmap/netmap_kern.h Tue Feb 5 12:10:48 2019 (r343772) @@ -271,7 +271,7 @@ typedef struct hrtimer{ __LINE__, __FUNCTION__, ##__VA_ARGS__); \ } while (0) -/* Disabled printf (used to be ND). */ +/* Disabled printf (used to be nm_prdis). */ #define nm_prdis(format, ...) /* Rate limited, lps indicates how many per second. */ @@ -286,11 +286,6 @@ typedef struct hrtimer{ nm_prinf(format, ##__VA_ARGS__); \ } while (0) -/* Old macros. */ -#define ND nm_prdis -#define D nm_prerr -#define RD nm_prlim - struct netmap_adapter; struct nm_bdg_fwd; struct nm_bridge; @@ -1149,7 +1144,7 @@ nm_kr_rxspace(struct netmap_kring *k) int space = k->nr_hwtail - k->nr_hwcur; if (space < 0) space += k->nkr_num_slots; - ND("preserving %d rx slots %d -> %d", space, k->nr_hwcur, k->nr_hwtail); + nm_prdis("preserving %d rx slots %d -> %d", space, k->nr_hwcur, k->nr_hwtail); return space; } @@ -1375,6 +1370,8 @@ nm_update_hostrings_mode(struct netmap_adapter *na) void nm_set_native_flags(struct netmap_adapter *); void nm_clear_native_flags(struct netmap_adapter *); +void netmap_krings_mode_commit(struct netmap_adapter *na, int onoff); + /* * nm_*sync_prologue() functions are used in ioctl/poll and ptnetmap * kthreads. @@ -1402,7 +1399,7 @@ uint32_t nm_rxsync_prologue(struct netmap_kring *, str #if 1 /* debug version */ #define NM_CHECK_ADDR_LEN(_na, _a, _l) do { \ if (_a == NETMAP_BUF_BASE(_na) || _l > NETMAP_BUF_SIZE(_na)) { \ - RD(5, "bad addr/len ring %d slot %d idx %d len %d", \ + nm_prlim(5, "bad addr/len ring %d slot %d idx %d len %d", \ kring->ring_id, nm_i, slot->buf_idx, len); \ if (_l > NETMAP_BUF_SIZE(_na)) \ _l = NETMAP_BUF_SIZE(_na); \ @@ -1564,7 +1561,7 @@ void __netmap_adapter_get(struct netmap_adapter *na); #define netmap_adapter_get(na) \ do { \ struct netmap_adapter *__na = na; \ - D("getting %p:%s (%d)", __na, (__na)->name, (__na)->na_refcount); \ + nm_prinf("getting %p:%s (%d)", __na, (__na)->name, (__na)->na_refcount); \ __netmap_adapter_get(__na); \ } while (0) @@ -1573,7 +1570,7 @@ int __netmap_adapter_put(struct netmap_adapter *na); #define netmap_adapter_put(na) \ ({ \ struct netmap_adapter *__na = na; \ - D("putting %p:%s (%d)", __na, (__na)->name, (__na)->na_refcount); \ + nm_prinf("putting %p:%s (%d)", __na, (__na)->name, (__na)->na_refcount); \ __netmap_adapter_put(__na); \ }) @@ -1735,7 +1732,7 @@ int nm_iommu_group_id(bus_dma_tag_t dev); addr, NETMAP_BUF_SIZE, DMA_TO_DEVICE); if (dma_mapping_error(&adapter->pdev->dev, buffer_info->dma)) { - D("dma mapping error"); + nm_prerr("dma mapping error"); /* goto dma_error; See e1000_put_txbuf() */ /* XXX reset */ } @@ -1994,6 +1991,12 @@ nm_si_user(struct netmap_priv_d *priv, enum txrx t) #ifdef WITH_PIPES int netmap_pipe_txsync(struct netmap_kring *txkring, int flags); int netmap_pipe_rxsync(struct netmap_kring *rxkring, int flags); +int netmap_pipe_krings_create_both(struct netmap_adapter *na, + struct netmap_adapter *ona); +void netmap_pipe_krings_delete_both(struct netmap_adapter *na, + struct netmap_adapter *ona); +int netmap_pipe_reg_both(struct netmap_adapter *na, + struct netmap_adapter *ona); #endif /* WITH_PIPES */ #ifdef WITH_MONITOR @@ -2328,7 +2331,7 @@ nm_os_get_mbuf(struct ifnet *ifp, int len) m->m_ext.ext_arg1 = m->m_ext.ext_buf; // XXX save m->m_ext.ext_free = (void *)void_mbuf_dtor; m->m_ext.ext_type = EXT_EXTREF; - ND(5, "create m %p refcnt %d", m, MBUF_REFCNT(m)); + nm_prdis(5, "create m %p refcnt %d", m, MBUF_REFCNT(m)); } return m; } Modified: head/sys/dev/netmap/netmap_legacy.c ============================================================================== --- head/sys/dev/netmap/netmap_legacy.c Tue Feb 5 10:33:22 2019 (r343771) +++ head/sys/dev/netmap/netmap_legacy.c Tue Feb 5 12:10:48 2019 (r343772) @@ -365,7 +365,14 @@ netmap_ioctl_legacy(struct netmap_priv_d *priv, u_long /* Request for the legacy control API. Convert it to a * NIOCCTRL request. */ struct nmreq *nmr = (struct nmreq *) data; - struct nmreq_header *hdr = nmreq_from_legacy(nmr, cmd); + struct nmreq_header *hdr; + + if (nmr->nr_version < 11) { + nm_prerr("Minimum supported API is 11 (requested %u)", + nmr->nr_version); + return EINVAL; + } + hdr = nmreq_from_legacy(nmr, cmd); if (hdr == NULL) { /* out of memory */ return ENOMEM; } @@ -390,14 +397,14 @@ netmap_ioctl_legacy(struct netmap_priv_d *priv, u_long #ifdef __FreeBSD__ case FIONBIO: case FIOASYNC: - ND("FIONBIO/FIOASYNC are no-ops"); + /* FIONBIO/FIOASYNC are no-ops. */ break; case BIOCIMMEDIATE: case BIOCGHDRCMPLT: case BIOCSHDRCMPLT: case BIOCSSEESENT: - D("ignore BIOCIMMEDIATE/BIOCSHDRCMPLT/BIOCSHDRCMPLT/BIOCSSEESENT"); + /* Ignore these commands. */ break; default: /* allow device-specific ioctls */ Modified: head/sys/dev/netmap/netmap_mem2.c ============================================================================== --- head/sys/dev/netmap/netmap_mem2.c Tue Feb 5 10:33:22 2019 (r343771) +++ head/sys/dev/netmap/netmap_mem2.c Tue Feb 5 12:10:48 2019 (r343772) @@ -979,7 +979,7 @@ netmap_obj_offset(struct netmap_obj_pool *p, const voi continue; ofs = ofs + relofs; - ND("%s: return offset %d (cluster %d) for pointer %p", + nm_prdis("%s: return offset %d (cluster %d) for pointer %p", p->name, ofs, i, vaddr); return ofs; } @@ -1043,7 +1043,7 @@ netmap_obj_malloc(struct netmap_obj_pool *p, u_int len if (index) *index = i * 32 + j; } - ND("%s allocator: allocated object @ [%d][%d]: vaddr %p",p->name, i, j, vaddr); + nm_prdis("%s allocator: allocated object @ [%d][%d]: vaddr %p",p->name, i, j, vaddr); if (start) *start = i; @@ -1143,7 +1143,7 @@ netmap_extra_alloc(struct netmap_adapter *na, uint32_t *head = cur; /* restore */ break; } - ND(5, "allocate buffer %d -> %d", *head, cur); + nm_prdis(5, "allocate buffer %d -> %d", *head, cur); *p = cur; /* link to previous head */ } @@ -1160,7 +1160,7 @@ netmap_extra_free(struct netmap_adapter *na, uint32_t struct netmap_obj_pool *p = &nmd->pools[NETMAP_BUF_POOL]; uint32_t i, cur, *buf; - ND("freeing the extra list"); + nm_prdis("freeing the extra list"); for (i = 0; head >=2 && head < p->objtotal; i++) { cur = head; buf = lut[head].vaddr; @@ -1197,7 +1197,7 @@ netmap_new_bufs(struct netmap_mem_d *nmd, struct netma slot[i].ptr = 0; } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Feb 5 15:04:10 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 225BE14BC23A; Tue, 5 Feb 2019 15:04:10 +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 "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B132276EB5; Tue, 5 Feb 2019 15:04:09 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it1-f174.google.com with SMTP id m62so9030289ith.5; Tue, 05 Feb 2019 07:04:09 -0800 (PST) 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=K/834gwK5+l3WHJ/xiOVfw3RUwm8jKeEnnckS9nrqPY=; b=HCSB15kO2iXSZOI2YceQsEByDeBiSGiTi4xNbhXp8ciVBJiuvzf8QT8Ygtmd2NMWuz OFxCTZN9yGawDD6zZp2BaMDPmYZev/fjPCAaHwn3pQqw/Zd+g45DHEc6yOZW04Jei1Ib d9betZFET29LoG7ZY8ApQi3/HTVpQCjDPb4EczpNOywFxSTNg7yk86ueP4i6F55Am4wC rad/llo4RPGyZOYBXkpq9sjRGJrUyqT9dyzD2vx1JjQgG9PGuJmPIcGoO2m6ss0QElbi s9wKaTi5uNrU2FdUNr4HdqHZjQyCphg4FHh6h3J5IQrg6h96dvBn+X/zM+3f3WdwYBgM j5ow== X-Gm-Message-State: AHQUAubuwzgBTBVqBWhXO8MrW7Zy5KqYVlB0YsljR4hUJqlHpF2ZDWrT cJAO8Iv7BeECbRwYSKr7q24b0jhrLMCtOuNLdPNeNZbZ X-Google-Smtp-Source: AHgI3IbCvD8JLcp+8VQoYugBfXALBiCqK8nDkZWbx0IMnou68R3lmB/EfCEjJE88nk0+RZQw6xzJgTmTe3Y9IggubiU= X-Received: by 2002:a5d:88ce:: with SMTP id i14mr3399446iol.66.1549377547810; Tue, 05 Feb 2019 06:39:07 -0800 (PST) MIME-Version: 1.0 References: <201711112330.vABNUwXC077395@repo.freebsd.org> <20190205202145.A1080@besplex.bde.org> In-Reply-To: <20190205202145.A1080@besplex.bde.org> From: Ed Maste Date: Tue, 5 Feb 2019 09:38:54 -0500 Message-ID: Subject: Re: svn commit: r325728 - head/lib/libkvm To: Bruce Evans Cc: Will Andrews , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: B132276EB5 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.981,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 15:04:10 -0000 On Tue, 5 Feb 2019 at 05:17, Bruce Evans wrote: > > On Mon, 4 Feb 2019, Ed Maste wrote: > > > On Sat, 11 Nov 2017 at 18:31, Will Andrews wrote: > >> > >> Author: will > >> Date: Sat Nov 11 23:30:58 2017 > >> New Revision: 325728 > >> URL: https://svnweb.freebsd.org/changeset/base/325728 > >> > >> Log: > >> libkvm: add kvm_walk_pages API. (Replying here only to the comments on the issues I brought up.) >>> + u_long paddr; > > Further pollution in the type and struct member names. Further misformatting > > The include of sys/_types.h was apparently changed to sys/types.h to support > using u_long. If we change the types then we can presumably revert that part. > > This should probably be uin64_t to support cross-debugging cores from > > 64-bit machines on 32-bit hosts; also for i386 PAE. Or, on IRC jhb > > suggested we introduce a kpaddr_t typedef akin to kvaddr_t. > > The correct type is vm_paddr_t or maybe a kvm wrapper of this. That precludes cross-arch and cross-size use of kvm_walk_pages; kvm supports this use (see kvm_read2) so it should be a 64-bit kvm wrapper. > >> + u_long kmap_vaddr; > >> + u_long dmap_vaddr; > > > > These two should be kvaddr_t. > > Further pollution and style bugs in names, types and formatting. Somewhat difficult to change now though... but what about: struct kvm_page { u_int kp_version; kpaddr_t kp_paddr; kvaddr_t kp_kmap_vaddr; kvaddr_t kp_dmap_vaddr; vm_prot_t kp_prot; off_t kp_offset; size_t kp_len; }; > [kvaddr_t] is currently hard-coded as __uint64_t. That works for all supported > arches now, but eventually some typedefs will actually be needed for their > purpose of being implementation-depended and changeable. Except that these should be MI for cross-debugging. > >> + vm_prot_t prot; > >> + u_long offset; > > > > off_t? > > Further pollution and style bugs in names, types and formatting. > > Maybe uoff_t. off_t is 64-bits signed so can't reach most kernel addresses > on some 64-bit arches like amd64. I believe the offset here is the offset of the page in the vmcore file, so off_t should be appropriate. > >> + size_t len; > > Further pollution and style bugs 1 name and formatting. Off hand I'm not sure of the appropriate type for a MI size; in practice now though this len will be page size. From owner-svn-src-head@freebsd.org Tue Feb 5 15:34:56 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72EA814BD262; Tue, 5 Feb 2019 15:34:56 +0000 (UTC) (envelope-from bde@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 0C3D18038B; Tue, 5 Feb 2019 15:34:56 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D7C951FE22; Tue, 5 Feb 2019 15:34:55 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x15FYtE3066606; Tue, 5 Feb 2019 15:34:55 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15FYtZU066605; Tue, 5 Feb 2019 15:34:55 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201902051534.x15FYtZU066605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Tue, 5 Feb 2019 15:34:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343777 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 343777 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0C3D18038B 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.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 15:34:56 -0000 Author: bde Date: Tue Feb 5 15:34:55 2019 New Revision: 343777 URL: https://svnweb.freebsd.org/changeset/base/343777 Log: Fix zapping of static hints and env in init_static_kenv(). Environments are terminated by 2 NULs, but only 1 NUL was zapped. Zapping only 1 NUL just splits the first string into an empty string and a corrupted string. All other strings in static hints and env remained live early in the boot when they were supposed to be disabled. Support calling init_static_kenv() very early in the boot, so as to use the env very early in the boot. Then the pointer to the loader env may change after the first call due to enabling paging or otherwise remapping the pointer. Another call is needed to register the change. Don't use the previous pointer in this (or any) later call. Reviewed by: kib Modified: head/sys/kern/kern_environment.c Modified: head/sys/kern/kern_environment.c ============================================================================== --- head/sys/kern/kern_environment.c Tue Feb 5 15:05:22 2019 (r343776) +++ head/sys/kern/kern_environment.c Tue Feb 5 15:34:55 2019 (r343777) @@ -250,7 +250,24 @@ init_static_kenv(char *buf, size_t len) char *eval; KASSERT(!dynamic_kenv, ("kenv: dynamic_kenv already initialized")); + /* + * We may be called twice, with the second call needed to relocate + * md_envp after enabling paging. md_envp is then garbage if it is + * not null and the relocation will move it. Discard it so as to + * not crash using its old value in our first call to kern_getenv(). + * + * The second call gives the same environment as the first except + * in silly configurations where the static env disables itself. + * + * Other env calls don't handle possibly-garbage pointers, so must + * not be made between enabling paging and calling here. + */ + md_envp = NULL; + md_env_len = 0; + md_env_pos = 0; + + /* * Give the static environment a chance to disable the loader(8) * environment first. This is done with loader_env.disabled=1. * @@ -275,12 +292,16 @@ init_static_kenv(char *buf, size_t len) md_env_pos = 0; eval = kern_getenv("static_env.disabled"); - if (eval != NULL && strcmp(eval, "1") == 0) - *kern_envp = '\0'; + if (eval != NULL && strcmp(eval, "1") == 0) { + kern_envp[0] = '\0'; + kern_envp[1] = '\0'; + } } eval = kern_getenv("static_hints.disabled"); - if (eval != NULL && strcmp(eval, "1") == 0) - *static_hints = '\0'; + if (eval != NULL && strcmp(eval, "1") == 0) { + static_hints[0] = '\0'; + static_hints[1] = '\0'; + } } static void From owner-svn-src-head@freebsd.org Tue Feb 5 16:25:28 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B4B014BEC28; Tue, 5 Feb 2019 16:25:28 +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 5B7C8824AB; Tue, 5 Feb 2019 16:25:26 +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 B26C643277B; Wed, 6 Feb 2019 03:25:23 +1100 (AEDT) Date: Wed, 6 Feb 2019 03:25:21 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ed Maste cc: Bruce Evans , Will Andrews , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325728 - head/lib/libkvm In-Reply-To: Message-ID: <20190206024025.X3175@besplex.bde.org> References: <201711112330.vABNUwXC077395@repo.freebsd.org> <20190205202145.A1080@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=UJetJGXy c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=6I5d2MoRAAAA:8 a=Nm4g2UKS2DVHwyA5FXEA:9 a=3MUEs-bSANMeB8kN:21 a=bFoZouqJEdPud0MP:21 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-Rspamd-Queue-Id: 5B7C8824AB 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.941,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 16:25:28 -0000 On Tue, 5 Feb 2019, Ed Maste wrote: > On Tue, 5 Feb 2019 at 05:17, Bruce Evans wrote: >> >> On Mon, 4 Feb 2019, Ed Maste wrote: >> >>> On Sat, 11 Nov 2017 at 18:31, Will Andrews wrote: >>>> >>>> Author: will >>>> Date: Sat Nov 11 23:30:58 2017 >>>> New Revision: 325728 >>>> URL: https://svnweb.freebsd.org/changeset/base/325728 >>>> >>>> Log: >>>> libkvm: add kvm_walk_pages API. > > (Replying here only to the comments on the issues I brought up.) > >>>> + u_long paddr; >> >> Further pollution in the type and struct member names. Further misformatting >> >> The include of sys/_types.h was apparently changed to sys/types.h to support >> using u_long. > > If we change the types then we can presumably revert that part. It would need the kva wrapper type in sys/_types.h. In fact, older, more standard types are already declared there, but with underscores as needed to have no pollution in there. sys/types.h and some other files turn the underscored versions into non-underscored versions. >>> This should probably be uin64_t to support cross-debugging cores from >>> 64-bit machines on 32-bit hosts; also for i386 PAE. Or, on IRC jhb >>> suggested we introduce a kpaddr_t typedef akin to kvaddr_t. >> >> The correct type is vm_paddr_t or maybe a kvm wrapper of this. > > That precludes cross-arch and cross-size use of kvm_walk_pages; kvm > supports this use (see kvm_read2) so it should be a 64-bit kvm > wrapper. kvm or system? kvaddr_t is system and the corresponding physical address type should probably be system too. The name kvaddr_t is not very good. kva is a good abbreviation, and kva_ is a good prefix. kvaddr is not so good for either. We now want a physical address type and its matching name is kpaddr_t, but that means that the prefix is just k. > >>>> + u_long kmap_vaddr; >>>> + u_long dmap_vaddr; >>> >>> These two should be kvaddr_t. >> >> Further pollution and style bugs in names, types and formatting. > > Somewhat difficult to change now though... but what about: > > struct kvm_page { > u_int kp_version; > kpaddr_t kp_paddr; > kvaddr_t kp_kmap_vaddr; > kvaddr_t kp_dmap_vaddr; > vm_prot_t kp_prot; > off_t kp_offset; > size_t kp_len; > }; This should have tabs after 3 shorter type names. Signed kp_offset seems wrong. Apart from it not reaching the top of 64- bit address spaces, adding unsigned kp_len to it gives an unsigned type. u_int, vm_prot_t and size_t give sparse packing with binary incompatibilities. vm_prot_t is 8 bits, so there there is 7 bytes of padding after kp_prot on amd64 and only 3 bytes on i386. 4 or 0 bytes of padding after kp_version and kp_len. This is hard to fix now. But you already changed the ABI on i386 by expanding all the u_long's. >> [kvaddr_t] is currently hard-coded as __uint64_t. That works for all supported >> arches now, but eventually some typedefs will actually be needed for their >> purpose of being implementation-depended and changeable. > > Except that these should be MI for cross-debugging. > >>>> + vm_prot_t prot; >>>> + u_long offset; >>> >>> off_t? >> >> Further pollution and style bugs in names, types and formatting. >> >> Maybe uoff_t. off_t is 64-bits signed so can't reach most kernel addresses >> on some 64-bit arches like amd64. > > I believe the offset here is the offset of the page in the vmcore > file, so off_t should be appropriate. That is spelled vm_ooffset_t in the kernel. This was MD in theory before r313194 2 years ago, but it was always 64 bits signed ad was made MI to give a consistent ABI. The MD version had less pollution than the MI version -- it gave an underscored version that was available without including . It was still hard to remember to use it instead of off_t. Then it was changed to uint64_t in r341398 for much the same reason as one of me reasons above -- most uses of it convert it to an unsigned type (sometimes by unsigned poisoning). So vm_ooffset_t is appropriate. >>>> + size_t len; >> >> Further pollution and style bugs 1 name and formatting. > > Off hand I'm not sure of the appropriate type for a MI size; in > practice now though this len will be page size. I also don't like most uses of size_t, especially in ABIs. Many are for values that are sure to be small. Small values can be packed into uint32_t or smaller. If the size is unlimited, use uint64_t. The address space might be unlimited, but 64 bits for a single (non-sparse) object is preposterously large. Bruce From owner-svn-src-head@freebsd.org Tue Feb 5 16:59:31 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2171414BFC5E; Tue, 5 Feb 2019 16:59:31 +0000 (UTC) (envelope-from bde@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 BB4D68367C; Tue, 5 Feb 2019 16:59:30 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA8D520BDD; Tue, 5 Feb 2019 16:59:30 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x15GxUrA009429; Tue, 5 Feb 2019 16:59:30 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15GxTwq009425; Tue, 5 Feb 2019 16:59:29 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201902051659.x15GxTwq009425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Tue, 5 Feb 2019 16:59:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343778 - in head/sys: dev/syscons teken teken/libteken X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: in head/sys: dev/syscons teken teken/libteken X-SVN-Commit-Revision: 343778 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BB4D68367C 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.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 16:59:31 -0000 Author: bde Date: Tue Feb 5 16:59:29 2019 New Revision: 343778 URL: https://svnweb.freebsd.org/changeset/base/343778 Log: My recent fix for programmable function keys in syscons only worked when TEKEN_CONS25 is configured. Fix this by adding a function to set the flag that enables the fix and always calling this function for syscons. Expand the man page for teken_set_cons25(). This function is not very useful since it can only set but not clear 1 flag. In practice, it is only used when TEKEN_CONS25 is configured and all that does is choose the the default emulation for syscons at compile time. Modified: head/sys/dev/syscons/scterm-teken.c head/sys/teken/libteken/teken.3 head/sys/teken/teken.c head/sys/teken/teken.h Modified: head/sys/dev/syscons/scterm-teken.c ============================================================================== --- head/sys/dev/syscons/scterm-teken.c Tue Feb 5 15:34:55 2019 (r343777) +++ head/sys/dev/syscons/scterm-teken.c Tue Feb 5 16:59:29 2019 (r343778) @@ -144,6 +144,7 @@ scteken_init(scr_stat *scp, void **softc, int code) #ifdef TEKEN_CONS25 teken_set_cons25(&ts->ts_teken); #endif /* TEKEN_CONS25 */ + teken_set_cons25keys(&ts->ts_teken); scteken_sync_internal(scp, ts); break; } Modified: head/sys/teken/libteken/teken.3 ============================================================================== --- head/sys/teken/libteken/teken.3 Tue Feb 5 15:34:55 2019 (r343777) +++ head/sys/teken/libteken/teken.3 Tue Feb 5 16:59:29 2019 (r343778) @@ -66,6 +66,8 @@ .Fn teken_set_8bit "teken_t *t" .Ft void .Fn teken_set_cons25 "teken_t *t" +.Ft void +.Fn teken_set_cons25keys "teken_t *t" .Sh DESCRIPTION The .Nm @@ -194,11 +196,24 @@ which can be used to support character sets like CP437 .Pp The .Fn teken_set_cons25 -function switches terminal emulation to +function sets the terminal emulation to .Dv cons25 , -which is used by versions of +which was the default for +.Xr syscons 4 +in versions of .Fx prior to 9.0. +This function is only useful for initialization. +The emulation can be changed at any time using an escape sequence, +and this function is not used then. +.Pp +The +.Fn teken_set_cons25keys +function tells the +.Fn teken_get_sequence +function to not interpret special keys in +.Dv cons25 +mode. .Sh SEE ALSO .Xr ncurses 3 , .Xr termcap 3 , Modified: head/sys/teken/teken.c ============================================================================== --- head/sys/teken/teken.c Tue Feb 5 15:34:55 2019 (r343777) +++ head/sys/teken/teken.c Tue Feb 5 16:59:29 2019 (r343778) @@ -412,7 +412,14 @@ void teken_set_cons25(teken_t *t) { - t->t_stateflags |= TS_CONS25 | TS_CONS25KEYS; + t->t_stateflags |= TS_CONS25; +} + +void +teken_set_cons25keys(teken_t *t) +{ + + t->t_stateflags |= TS_CONS25KEYS; } /* Modified: head/sys/teken/teken.h ============================================================================== --- head/sys/teken/teken.h Tue Feb 5 15:34:55 2019 (r343777) +++ head/sys/teken/teken.h Tue Feb 5 16:59:29 2019 (r343778) @@ -212,6 +212,7 @@ const char *teken_get_sequence(const teken_t *, unsign /* Legacy features. */ void teken_set_8bit(teken_t *); void teken_set_cons25(teken_t *); +void teken_set_cons25keys(teken_t *); /* Color conversion. */ teken_color_t teken_256to16(teken_color_t); From owner-svn-src-head@freebsd.org Tue Feb 5 17:14:59 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38D2414C0330; Tue, 5 Feb 2019 17:14:59 +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 C862B84199; Tue, 5 Feb 2019 17:14:58 +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 072C6DF20; Tue, 5 Feb 2019 17:14:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r325728 - head/lib/libkvm To: Bruce Evans , Ed Maste Cc: Will Andrews , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711112330.vABNUwXC077395@repo.freebsd.org> <20190205202145.A1080@besplex.bde.org> <20190206024025.X3175@besplex.bde.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: Tue, 5 Feb 2019 09:14:46 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190206024025.X3175@besplex.bde.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C862B84199 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.92 / 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.92)[-0.923,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 17:14:59 -0000 On 2/5/19 8:25 AM, Bruce Evans wrote: > On Tue, 5 Feb 2019, Ed Maste wrote: > >> On Tue, 5 Feb 2019 at 05:17, Bruce Evans wrote: >>> >>> On Mon, 4 Feb 2019, Ed Maste wrote: >>>> This should probably be uin64_t to support cross-debugging cores from >>>> 64-bit machines on 32-bit hosts; also for i386 PAE. Or, on IRC jhb >>>> suggested we introduce a kpaddr_t typedef akin to kvaddr_t. >>> >>> The correct type is vm_paddr_t or maybe a kvm wrapper of this. >> >> That precludes cross-arch and cross-size use of kvm_walk_pages; kvm >> supports this use (see kvm_read2) so it should be a 64-bit kvm >> wrapper. > > kvm or system? kvaddr_t is system and the corresponding physical address > type should probably be system too. It only needs to exist for libkvm. I want to make a 'portable' libkvm that can be built on non-FreeBSD OS's such as OS X, etc. That is the last thing needed to let kgdb run on non-FreeBSD OS's to cross-debug crash dumps. For that you would want self-contained types I think such as kvm_vaddr_t and kvm_paddr_t. I guess I just reused kvaddr_t because it already existed, but having dedicated types in kvm.h is probably better long term. > Signed kp_offset seems wrong. Apart from it not reaching the top of 64- > bit address spaces, adding unsigned kp_len to it gives an unsigned type. kp_offset is the file offset in the vmcore file so that you can directly use it with pread() or lseek(). In that case, I think off_t is the right type. Similarly, the 'len' should stay as size_t since it is intended to be used as the argument to read()/pread() or a size passed to malloc(), etc. I don't think vm_ooffset_t is appropriate as it is 1) non-portable and 2) not suitable for userspace APIs. -- John Baldwin                                                                              From owner-svn-src-head@freebsd.org Tue Feb 5 17:17:13 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BC0D14C0437; Tue, 5 Feb 2019 17:17:13 +0000 (UTC) (envelope-from bde@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 2038584378; Tue, 5 Feb 2019 17:17:13 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1209A20F45; Tue, 5 Feb 2019 17:17:13 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x15HHCvf019611; Tue, 5 Feb 2019 17:17:12 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15HHCph019610; Tue, 5 Feb 2019 17:17:12 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201902051717.x15HHCph019610@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Tue, 5 Feb 2019 17:17:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343779 - head/sys/dev/vt X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/sys/dev/vt X-SVN-Commit-Revision: 343779 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2038584378 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.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 17:17:13 -0000 Author: bde Date: Tue Feb 5 17:17:12 2019 New Revision: 343779 URL: https://svnweb.freebsd.org/changeset/base/343779 Log: Fix missing translation of old ioctls for KDSETMODE, KDSBORDER and CONS_SETWINORG. After translation, the last 2 are not supported, but the first one has incomplete support that is enough to run old versions of X. Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Tue Feb 5 16:59:29 2019 (r343778) +++ head/sys/dev/vt/vt_core.c Tue Feb 5 17:17:12 2019 (r343779) @@ -2114,11 +2114,20 @@ vtterm_ioctl(struct terminal *tm, u_long cmd, caddr_t case _IO('K', 8): cmd = KDMKTONE; break; + case _IO('K', 10): + cmd = KDSETMODE; + break; + case _IO('K', 13): + cmd = KDSBORDER; + break; case _IO('K', 63): cmd = KIOCSOUND; break; case _IO('K', 66): cmd = KDSETLED; + break; + case _IO('c', 104): + cmd = CONS_SETWINORG; break; case _IO('c', 110): cmd = CONS_SETKBD; From owner-svn-src-head@freebsd.org Tue Feb 5 17:17:41 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E71714C04AE; Tue, 5 Feb 2019 17:17:41 +0000 (UTC) (envelope-from byond.lenox@gmail.com) 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 "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9BB4C844BA; Tue, 5 Feb 2019 17:17:40 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-lj1-f171.google.com with SMTP id t18-v6so3596021ljd.4; Tue, 05 Feb 2019 09:17:40 -0800 (PST) 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=wlmwN9NjkGwftL0JZp1M+SrSaasE72fc+8/0HSWGENA=; b=ZkejYg0hfpuq/Est/GwQBdVkh/m4ysMY0KlczhvfGkvSn1Uu5yNR5f8Cd5uHVrbmdo hSiv/DmUUMyX86eTaGfgtUL1eyiTbZF9r0bh4LC31QhtPWpTLRBM8Qvs+CxU7XECi53V YzvL+XDt6LOVxn/gPT+l4jT0ZL7XqDwZO0lSTa7p1rE4sRJ52LLRRhPhYoTUt5quCznC d4/ulOt+InNUbi6OF0sFSinHHXhZWm8lPHRl4n9B3Ctdy6MZVk6WtKxzB9c8TC58Da4M 4giIa/QEuu4klsuSOlMmQtF7rIe/2PxK/2+a1iG4xaSM7A8HzeibbeBt0JmS/cd5f6n+ LySQ== X-Gm-Message-State: AHQUAuZOmPZj5CWiOtXLn7qMOPFA7524WTPU4ieYMWJ5XiKMA6mvTbp2 Eyx3CQYU9wykQC6aN//qhr3ch1NCieM= X-Google-Smtp-Source: AHgI3Ib96/iafZuvllM0AAD0TcKurHOTK89o5Re6XZFJDSnYe8ZWsAVLAWZ+YkOXeL3EgcEsjG2HNg== X-Received: by 2002:a2e:7316:: with SMTP id o22-v6mr19505ljc.82.1549383141342; Tue, 05 Feb 2019 08:12:21 -0800 (PST) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com. [209.85.167.47]) by smtp.gmail.com with ESMTPSA id c2-v6sm3273574ljj.41.2019.02.05.08.12.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Feb 2019 08:12:20 -0800 (PST) Received: by mail-lf1-f47.google.com with SMTP id n23so3080410lfl.4; Tue, 05 Feb 2019 08:12:20 -0800 (PST) X-Received: by 2002:a19:f249:: with SMTP id d9mr961798lfk.83.1549383140158; Tue, 05 Feb 2019 08:12:20 -0800 (PST) MIME-Version: 1.0 References: <201902051534.x15FYtZU066605@repo.freebsd.org> In-Reply-To: <201902051534.x15FYtZU066605@repo.freebsd.org> From: Kyle Evans Date: Tue, 5 Feb 2019 10:11:31 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r343777 - head/sys/kern To: Bruce Evans Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 9BB4C844BA 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]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 17:17:41 -0000 On Tue, Feb 5, 2019 at 9:35 AM Bruce Evans wrote: > > Author: bde > Date: Tue Feb 5 15:34:55 2019 > New Revision: 343777 > URL: https://svnweb.freebsd.org/changeset/base/343777 > > Log: > Fix zapping of static hints and env in init_static_kenv(). Environments > are terminated by 2 NULs, but only 1 NUL was zapped. Zapping only 1 > NUL just splits the first string into an empty string and a corrupted > string. All other strings in static hints and env remained live early > in the boot when they were supposed to be disabled. > I think we need to go another step here. This stuff was functional in my testing because it was all late enough to happen after static_env and static_hints were merged into the dynamic kenv (which I've only now noticed after you fixed this). It looks like our logic for merging is broken, IMO. Before I touched it: - When static_hints did get merged (by toggling of sysctl) it would stop merging at the first empty string (strlen(cp) == 0) -- introduced in r240067 -- regardless of whether said empty string was followed by a second NUL terminator. - When static_env merged in at SU_SUB_KMEM, it wouldn't merge if *kern_envp == '\0' but it wouldn't stop at an empty string, instead carrying the empty string into the dynamic env if my reading is correct. I broke the former even further by not merging anything at all if *static_hints == '\0', and I maintained the latter breakage except added an additional warning if we ventured upon a malformed entry. Both of these are inconsistent with how the environments are observed by kern_getenv or hints consumers before the merging, which will simply skip over the malformed empty strings until it hits proper termination. I think the resulting environment should be consistent with what these consumers would've seen pre-merge, and I think this should be fixed, if we can. Thoughts? Thanks, Kyle Evans From owner-svn-src-head@freebsd.org Tue Feb 5 17:22:30 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 848CA14C089B; Tue, 5 Feb 2019 17:22:30 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 257C9849DD; Tue, 5 Feb 2019 17:22:30 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id C58413C475F; Tue, 5 Feb 2019 17:22:28 +0000 (UTC) Date: Tue, 5 Feb 2019 17:22:28 +0000 From: Brooks Davis To: John Baldwin Cc: Bruce Evans , Ed Maste , Will Andrews , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325728 - head/lib/libkvm Message-ID: <20190205172228.GC71053@spindle.one-eyed-alien.net> References: <201711112330.vABNUwXC077395@repo.freebsd.org> <20190205202145.A1080@besplex.bde.org> <20190206024025.X3175@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4jXrM3lyYWu4nBt5" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 257C9849DD X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.88 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.88)[-0.881,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 17:22:30 -0000 --4jXrM3lyYWu4nBt5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 05, 2019 at 09:14:46AM -0800, John Baldwin wrote: > On 2/5/19 8:25 AM, Bruce Evans wrote: > > On Tue, 5 Feb 2019, Ed Maste wrote: > >=20 > >> On Tue, 5 Feb 2019 at 05:17, Bruce Evans wrote: > >>> > >>> On Mon, 4 Feb 2019, Ed Maste wrote: > >>>> This should probably be uin64_t to support cross-debugging cores from > >>>> 64-bit machines on 32-bit hosts; also for i386 PAE. Or, on IRC jhb > >>>> suggested we introduce a kpaddr_t typedef akin to kvaddr_t. > >>> > >>> The correct type is vm_paddr_t or maybe a kvm wrapper of this. > >> > >> That precludes cross-arch and cross-size use of kvm_walk_pages; kvm > >> supports this use (see kvm_read2) so it should be a 64-bit kvm > >> wrapper. > >=20 > > kvm or system? kvaddr_t is system and the corresponding physical addre= ss > > type should probably be system too. >=20 > It only needs to exist for libkvm. I want to make a 'portable' libkvm th= at > can be built on non-FreeBSD OS's such as OS X, etc. That is the last thi= ng > needed to let kgdb run on non-FreeBSD OS's to cross-debug crash dumps. F= or > that you would want self-contained types I think such as kvm_vaddr_t and > kvm_paddr_t. I guess I just reused kvaddr_t because it already existed, > but having dedicated types in kvm.h is probably better long term. IIRC, you created kvaddr_t first and I co-opted it for the kernel after finding a namespace collision when I merged the kvaddr_t from CheriBSD. Using kvm_ types seems like a good idea for the reaons you hilight. -- Brooks --4jXrM3lyYWu4nBt5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJcWcZUAAoJEKzQXbSebgfAfRwIAJngvj8MVE/zTdmdixHoAXu6 ngkxu1AXO7bRwAmDfeaUOfGWeyD45J5mi7D8DG56hlxRJiIj4lx6osAwcx3zgUgE /ZJ0UWJFBKIkuGTjX0gQofaBh0ZhDHn8TXWuZOxKSpZY/1TMgJkgS+6UmHI5PTka MEhc3/U0Kj2F76NWG6gqDhLplZY55yqrhDDx/kz9wNTooSziPlyrOnRUa8ACxxSx L1FQd746woAuV2H6c0r8NaMx4Q5PVpzzXk/pNZefW1O7dj4prOYn0IUms5RMXE64 BQqLm5oEZYHmsHNCnns3hNLoqh/qF6Fl1B2vXo/r7EiZBFWKQGH0bLEy7xwRSlY= =YmcG -----END PGP SIGNATURE----- --4jXrM3lyYWu4nBt5-- From owner-svn-src-head@freebsd.org Tue Feb 5 17:48:51 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D326314C2460; Tue, 5 Feb 2019 17:48:50 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4BC6385AAD; Tue, 5 Feb 2019 17:48:50 +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 mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 0C2D43D8E9A; Wed, 6 Feb 2019 04:48:47 +1100 (AEDT) Date: Wed, 6 Feb 2019 04:48:46 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Kyle Evans cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343777 - head/sys/kern In-Reply-To: Message-ID: <20190206042358.E3786@besplex.bde.org> References: <201902051534.x15FYtZU066605@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=P6RKvmIu c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=dQAJO8qa6FECyPOhYHEA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-Rspamd-Queue-Id: 4BC6385AAD 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.960,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 17:48:51 -0000 On Tue, 5 Feb 2019, Kyle Evans wrote: > On Tue, Feb 5, 2019 at 9:35 AM Bruce Evans wrote: >> ... >> Log: >> Fix zapping of static hints and env in init_static_kenv(). Environments >> are terminated by 2 NULs, but only 1 NUL was zapped. Zapping only 1 >> NUL just splits the first string into an empty string and a corrupted >> string. All other strings in static hints and env remained live early >> in the boot when they were supposed to be disabled. > > I think we need to go another step here. This stuff was functional in > my testing because it was all late enough to happen after static_env > and static_hints were merged into the dynamic kenv (which I've only > now noticed after you fixed this). It looks like our logic for merging > is broken, IMO. It was too early to work in hammer_time() and init386() where important tunables are looked up. E.g., dynamic kenv needs malloc, but in these functions even the memory size isn't quite known and it is controlled by the hw.physmem tunable. I missed this since I don't use the merging feature and usually duplicate the static hints in the dynamic hints. > Before I touched it: > > - When static_hints did get merged (by toggling of sysctl) it would > stop merging at the first empty string (strlen(cp) == 0) -- introduced > in r240067 -- regardless of whether said empty string was followed by > a second NUL terminator. I think the syntax of the config file doesn't allow creating empty strings in the middle, so this worked. > - When static_env merged in at SU_SUB_KMEM, it wouldn't merge if > *kern_envp == '\0' but it wouldn't stop at an empty string, instead > carrying the empty string into the dynamic env if my reading is > correct. > > I broke the former even further by not merging anything at all if > *static_hints == '\0', and I maintained the latter breakage except > added an additional warning if we ventured upon a malformed entry. I thought that the dynamic env initialization dropped the misformatted static hints and env more intentionally. > Both of these are inconsistent with how the environments are observed > by kern_getenv or hints consumers before the merging, which will > simply skip over the malformed empty strings until it hits proper > termination. I think the resulting environment should be consistent > with what these consumers would've seen pre-merge, and I think this > should be fixed, if we can. I think we can trust the compile-time hints and envs to not have empty strings (or even ones not in the form name=value). Then don't mess them up by zapping them but instead start with a compile-time initialization of a pointer to them and zap that. The pointer can be null and the hints and env don't even need to exist when they are empty. _getenv_static() already works right with null pointers. Hints looks like it needs more reorganization. Bruce From owner-svn-src-head@freebsd.org Tue Feb 5 17:49:28 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DD4114C24CE; Tue, 5 Feb 2019 17:49:28 +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 0259285C12; Tue, 5 Feb 2019 17:49:28 +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 E4A0F21456; Tue, 5 Feb 2019 17:49:27 +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 x15HnR2w035443; Tue, 5 Feb 2019 17:49:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15HnRqr035442; Tue, 5 Feb 2019 17:49:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902051749.x15HnRqr035442@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 5 Feb 2019 17:49:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343780 - 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: 343780 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0259285C12 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.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 17:49:28 -0000 Author: kib Date: Tue Feb 5 17:49:27 2019 New Revision: 343780 URL: https://svnweb.freebsd.org/changeset/base/343780 Log: amd64: clear callee-preserved registers on syscall exit. %r8, %r10, and on non-KPTI configuration %r9 were not restored on fast return from a syscall. Reviewed by: markj Approved by: so Security: CVE-2019-5595 Sponsored by: The FreeBSD Foundation MFC after: 0 minutes Modified: head/sys/amd64/amd64/exception.S Modified: head/sys/amd64/amd64/exception.S ============================================================================== --- head/sys/amd64/amd64/exception.S Tue Feb 5 17:17:12 2019 (r343779) +++ head/sys/amd64/amd64/exception.S Tue Feb 5 17:49:27 2019 (r343780) @@ -521,12 +521,14 @@ fast_syscall_common: movq TF_RFLAGS(%rsp),%r11 /* original %rflags */ movq TF_RIP(%rsp),%rcx /* original %rip */ movq TF_RSP(%rsp),%rsp /* user stack pointer */ + xorl %r8d,%r8d /* zero the rest of GPRs */ + xorl %r10d,%r10d cmpq $~0,PCPU(UCR3) je 2f movq PCPU(UCR3),%r9 movq %r9,%cr3 - xorl %r9d,%r9d -2: swapgs +2: xorl %r9d,%r9d + swapgs sysretq 3: /* AST scheduled. */ From owner-svn-src-head@freebsd.org Tue Feb 5 17:55:09 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68BC114C29B6; Tue, 5 Feb 2019 17:55:09 +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 08E388646C; Tue, 5 Feb 2019 17:55:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F16C7215FD; Tue, 5 Feb 2019 17:55:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x15Ht8kv040886; Tue, 5 Feb 2019 17:55:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15Ht8Z4040885; Tue, 5 Feb 2019 17:55:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201902051755.x15Ht8Z4040885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 5 Feb 2019 17:55:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343784 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 343784 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 08E388646C 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 17:55:09 -0000 Author: markj Date: Tue Feb 5 17:55:08 2019 New Revision: 343784 URL: https://svnweb.freebsd.org/changeset/base/343784 Log: Avoid leaking fp references when truncating SCM_RIGHTS control messages. Reported by: pho Approved by: so MFC after: 0 minutes Security: CVE-2019-5596 Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Tue Feb 5 17:54:09 2019 (r343783) +++ head/sys/kern/uipc_syscalls.c Tue Feb 5 17:55:08 2019 (r343784) @@ -1605,8 +1605,10 @@ m_dispose_extcontrolm(struct mbuf *m) fd = *fds++; error = fget(td, fd, &cap_no_rights, &fp); - if (error == 0) + if (error == 0) { fdclose(td, fp, fd); + fdrop(fp, td); + } } } clen -= datalen; From owner-svn-src-head@freebsd.org Tue Feb 5 18:16:15 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D5C214C3BD0; Tue, 5 Feb 2019 18:16:15 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 CC00A87E2B; Tue, 5 Feb 2019 18:16:14 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BEE6D21985; Tue, 5 Feb 2019 18:16:14 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x15IGERO052095; Tue, 5 Feb 2019 18:16:14 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15IGEev052092; Tue, 5 Feb 2019 18:16:14 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201902051816.x15IGEev052092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Tue, 5 Feb 2019 18:16:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343791 - head/sys/powerpc/pseries X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/powerpc/pseries X-SVN-Commit-Revision: 343791 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CC00A87E2B 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 18:16:15 -0000 Author: luporl Date: Tue Feb 5 18:16:14 2019 New Revision: 343791 URL: https://svnweb.freebsd.org/changeset/base/343791 Log: [ppc64] llan: fix fatal kernel trap when system is low on memory When running several builders in parallel, on QEMU, with 8GB of memory, a fatal kernel trap (0x300 (data storage interrupt)) caused by llan driver is sometimes observed, when the system starts to run out of swap space. This happens because, at llan_intr(), a phyp call to add a logical LAN buffer is always made when llan_add_rxbuf() fails, even if it fails to allocate a new buffer. PR: 235489 Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D19084 Modified: head/sys/powerpc/pseries/phyp_llan.c Modified: head/sys/powerpc/pseries/phyp_llan.c ============================================================================== --- head/sys/powerpc/pseries/phyp_llan.c Tue Feb 5 18:11:15 2019 (r343790) +++ head/sys/powerpc/pseries/phyp_llan.c Tue Feb 5 18:16:14 2019 (r343791) @@ -386,8 +386,6 @@ restart: /* llan_add_rxbuf does DMA sync and unload as well as requeue */ if (llan_add_rxbuf(sc, rx) != 0) { if_inc_counter(sc->ifp, IFCOUNTER_IERRORS, 1); - phyp_hcall(H_ADD_LOGICAL_LAN_BUFFER, sc->unit, - rx->rx_bufdesc); continue; } From owner-svn-src-head@freebsd.org Tue Feb 5 20:02:18 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B4E514CF03D; Tue, 5 Feb 2019 20:02:18 +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 341268F182; Tue, 5 Feb 2019 20:02:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E20122C4D; Tue, 5 Feb 2019 20:02:17 +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 x15K2HnU010732; Tue, 5 Feb 2019 20:02:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15K2GIC010731; Tue, 5 Feb 2019 20:02:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902052002.x15K2GIC010731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 5 Feb 2019 20:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343808 - head/sys/i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/i386/i386 X-SVN-Commit-Revision: 343808 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 341268F182 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 20:02:18 -0000 Author: kib Date: Tue Feb 5 20:02:16 2019 New Revision: 343808 URL: https://svnweb.freebsd.org/changeset/base/343808 Log: Remove pointless initial value for i386 vm.pmap.pat_works sysctl definition. The OID is served by external data. Submitted by: bde MFC after: 3 days Modified: head/sys/i386/i386/pmap_base.c Modified: head/sys/i386/i386/pmap_base.c ============================================================================== --- head/sys/i386/i386/pmap_base.c Tue Feb 5 19:50:46 2019 (r343807) +++ head/sys/i386/i386/pmap_base.c Tue Feb 5 20:02:16 2019 (r343808) @@ -136,7 +136,7 @@ int i386_pmap_PDRSHIFT; int pat_works = 1; SYSCTL_INT(_vm_pmap, OID_AUTO, pat_works, CTLFLAG_RD, - &pat_works, 1, + &pat_works, 0, "Is page attribute table fully functional?"); int pg_ps_enabled = 1; From owner-svn-src-head@freebsd.org Tue Feb 5 20:09:32 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE79314CF39A; Tue, 5 Feb 2019 20:09:32 +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 7EABD8F67A; Tue, 5 Feb 2019 20:09:32 +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 6C42322C6A; Tue, 5 Feb 2019 20:09:32 +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 x15K9Wga011077; Tue, 5 Feb 2019 20:09:32 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15K9W5f011076; Tue, 5 Feb 2019 20:09:32 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902052009.x15K9W5f011076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 5 Feb 2019 20:09:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343809 - head/sys/i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/i386/i386 X-SVN-Commit-Revision: 343809 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7EABD8F67A 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.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 20:09:33 -0000 Author: kib Date: Tue Feb 5 20:09:31 2019 New Revision: 343809 URL: https://svnweb.freebsd.org/changeset/base/343809 Log: Make it possible to override PAE mode on boot. Initialize the static kenv in pmap_cold() and fetch user opinion on vm.pmap.pae_mode tunable if hardware is capable. Note that the static environment is reinitilized in init386() later when paging is enabled. Reviewed by: bde Discussed with: kevans Sponsored by: The FreeBSD Foundation MFC after: 2 months Modified: head/sys/i386/i386/pmap_base.c Modified: head/sys/i386/i386/pmap_base.c ============================================================================== --- head/sys/i386/i386/pmap_base.c Tue Feb 5 20:02:16 2019 (r343808) +++ head/sys/i386/i386/pmap_base.c Tue Feb 5 20:09:31 2019 (r343809) @@ -96,6 +96,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -935,16 +936,19 @@ pmap_kremove(vm_offset_t va) extern struct pmap_methods pmap_pae_methods, pmap_nopae_methods; int pae_mode; -SYSCTL_INT(_vm_pmap, OID_AUTO, pae_mode, CTLFLAG_RD, - &pae_mode, 1, +SYSCTL_INT(_vm_pmap, OID_AUTO, pae_mode, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &pae_mode, 0, "PAE"); void pmap_cold(void) { - if ((cpu_feature & CPUID_PAE) != 0) { - pae_mode = 1; + init_static_kenv((char *)bootinfo.bi_envp, 0); + pae_mode = (cpu_feature & CPUID_PAE) != 0; + if (pae_mode) + TUNABLE_INT_FETCH("vm.pmap.pae_mode", &pae_mode); + if (pae_mode) { pmap_methods_ptr = &pmap_pae_methods; pmap_pae_cold(); } else { From owner-svn-src-head@freebsd.org Tue Feb 5 21:28:31 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0C0214D1176; Tue, 5 Feb 2019 21:28:30 +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 5E2F96B499; Tue, 5 Feb 2019 21:28:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B2BD239D9; Tue, 5 Feb 2019 21:28:30 +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 x15LSUsG053098; Tue, 5 Feb 2019 21:28:30 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15LSTGD053090; Tue, 5 Feb 2019 21:28:29 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201902052128.x15LSTGD053090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 5 Feb 2019 21:28:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343810 - in head: . share/man/man9 sys/dev/cardbus sys/mips/include X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: . share/man/man9 sys/dev/cardbus sys/mips/include X-SVN-Commit-Revision: 343810 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5E2F96B499 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.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 21:28:31 -0000 Author: imp Date: Tue Feb 5 21:28:29 2019 New Revision: 343810 URL: https://svnweb.freebsd.org/changeset/base/343810 Log: Remove a few stray "All Rights Reserved." declarations on stuff I've written. Modified: head/UPDATING head/share/man/man9/bus_space.9 head/sys/dev/cardbus/cardbus.c head/sys/mips/include/elf.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Feb 5 20:09:31 2019 (r343809) +++ head/UPDATING Tue Feb 5 21:28:29 2019 (r343810) @@ -1936,7 +1936,7 @@ to fetch an UPDATING file from an older FreeBSD releas Copyright information: -Copyright 1998-2009 M. Warner Losh. All Rights Reserved. +Copyright 1998-2009 M. Warner Losh. Redistribution, publication, translation and use, with or without modification, in full or in part, in any form or format of this Modified: head/share/man/man9/bus_space.9 ============================================================================== --- head/share/man/man9/bus_space.9 Tue Feb 5 20:09:31 2019 (r343809) +++ head/share/man/man9/bus_space.9 Tue Feb 5 21:28:29 2019 (r343810) @@ -1,6 +1,7 @@ .\" $NetBSD: bus_space.9,v 1.9 1999/03/06 22:09:29 mycroft Exp $ .\" -.\" Copyright (c) 2005 M. Warner Losh. All Rights Reserved. +.\" Copyright (c) 2005 M. Warner Losh. +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: Modified: head/sys/dev/cardbus/cardbus.c ============================================================================== --- head/sys/dev/cardbus/cardbus.c Tue Feb 5 20:09:31 2019 (r343809) +++ head/sys/dev/cardbus/cardbus.c Tue Feb 5 21:28:29 2019 (r343810) @@ -1,8 +1,9 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2003-2008 M. Warner Losh. All Rights Reserved. * Copyright (c) 2000,2001 Jonathan Chen. All rights reserved. + * + * Copyright (c) 2003-2008 M. Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/mips/include/elf.h ============================================================================== --- head/sys/mips/include/elf.h Tue Feb 5 20:09:31 2019 (r343809) +++ head/sys/mips/include/elf.h Tue Feb 5 21:28:29 2019 (r343810) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause-NetBSD * - * Copyright (c) 2013 M. Warner Losh. All Rights Reserved. + * Copyright (c) 2013 M. Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From owner-svn-src-head@freebsd.org Tue Feb 5 21:37:41 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E086514D1692; Tue, 5 Feb 2019 21:37:40 +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 87EDA6BB18; Tue, 5 Feb 2019 21:37:40 +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 79EF323B7D; Tue, 5 Feb 2019 21:37:40 +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 x15LbelK058947; Tue, 5 Feb 2019 21:37:40 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15LbZHF058919; Tue, 5 Feb 2019 21:37:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201902052137.x15LbZHF058919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 5 Feb 2019 21:37:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343811 - in head: libexec/talkd share/man/man9 sys/dev/flash sys/dev/mmc sys/dev/pccbb sys/dev/puc sys/dev/sio sys/dev/uart sys/dev/usb/controller sys/dev/wi usr.sbin/dumpcis X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: libexec/talkd share/man/man9 sys/dev/flash sys/dev/mmc sys/dev/pccbb sys/dev/puc sys/dev/sio sys/dev/uart sys/dev/usb/controller sys/dev/wi usr.sbin/dumpcis X-SVN-Commit-Revision: 343811 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 87EDA6BB18 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.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 21:37:41 -0000 Author: imp Date: Tue Feb 5 21:37:34 2019 New Revision: 343811 URL: https://svnweb.freebsd.org/changeset/base/343811 Log: Remove All Rights Reserved Remove the all rights reserved clause from my copyright, and make other minor tweaks needed where that might have created ambiguity. Modified: head/libexec/talkd/extern.h head/share/man/man9/config_intrhook.9 head/sys/dev/flash/mx25l.c head/sys/dev/flash/n25q.c head/sys/dev/mmc/bridge.h head/sys/dev/mmc/mmc.c head/sys/dev/mmc/mmc_private.h head/sys/dev/mmc/mmc_subr.c head/sys/dev/mmc/mmc_subr.h head/sys/dev/mmc/mmcbrvar.h head/sys/dev/mmc/mmcreg.h head/sys/dev/mmc/mmcsd.c head/sys/dev/mmc/mmcvar.h head/sys/dev/pccbb/pccbbdevid.h head/sys/dev/puc/puc_pci.c head/sys/dev/sio/sio_isa.c head/sys/dev/sio/sio_pccard.c head/sys/dev/sio/sio_pci.c head/sys/dev/sio/sio_puc.c head/sys/dev/uart/uart_bus_acpi.c head/sys/dev/uart/uart_bus_pccard.c head/sys/dev/uart/uart_bus_puc.c head/sys/dev/usb/controller/generic_ohci.c head/sys/dev/usb/controller/ohci_s3c24x0.c head/sys/dev/wi/if_wivar.h head/usr.sbin/dumpcis/main.c Modified: head/libexec/talkd/extern.h ============================================================================== --- head/libexec/talkd/extern.h Tue Feb 5 21:28:29 2019 (r343810) +++ head/libexec/talkd/extern.h Tue Feb 5 21:37:34 2019 (r343811) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2002 M. Warner Losh. All rights reserved. + * Copyright (c) 2002 M. Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/share/man/man9/config_intrhook.9 ============================================================================== --- head/share/man/man9/config_intrhook.9 Tue Feb 5 21:28:29 2019 (r343810) +++ head/share/man/man9/config_intrhook.9 Tue Feb 5 21:37:34 2019 (r343811) @@ -1,5 +1,5 @@ .\" -.\" Copyright (C) 2006 M. Warner Losh . All rights reserved. +.\" Copyright (C) 2006 M. Warner Losh . .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/sys/dev/flash/mx25l.c ============================================================================== --- head/sys/dev/flash/mx25l.c Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/flash/mx25l.c Tue Feb 5 21:37:34 2019 (r343811) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * Copyright (c) 2006 M. Warner Losh. * Copyright (c) 2009 Oleksandr Tymoshenko. All rights reserved. * Copyright (c) 2018 Ian Lepore. All rights reserved. * Modified: head/sys/dev/flash/n25q.c ============================================================================== --- head/sys/dev/flash/n25q.c Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/flash/n25q.c Tue Feb 5 21:37:34 2019 (r343811) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * Copyright (c) 2006 M. Warner Losh. * Copyright (c) 2009 Oleksandr Tymoshenko. All rights reserved. * Copyright (c) 2017 Ruslan Bukin * Copyright (c) 2018 Ian Lepore. All rights reserved. Modified: head/sys/dev/mmc/bridge.h ============================================================================== --- head/sys/dev/mmc/bridge.h Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/mmc/bridge.h Tue Feb 5 21:37:34 2019 (r343811) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * Copyright (c) 2006 M. Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/mmc/mmc.c ============================================================================== --- head/sys/dev/mmc/mmc.c Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/mmc/mmc.c Tue Feb 5 21:37:34 2019 (r343811) @@ -2,7 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2006 Bernd Walter. All rights reserved. - * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * Copyright (c) 2006 M. Warner Losh. * Copyright (c) 2017 Marius Strobl * * Redistribution and use in source and binary forms, with or without Modified: head/sys/dev/mmc/mmc_private.h ============================================================================== --- head/sys/dev/mmc/mmc_private.h Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/mmc/mmc_private.h Tue Feb 5 21:37:34 2019 (r343811) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Bernd Walter. All rights reserved. - * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * Copyright (c) 2006 M. Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/mmc/mmc_subr.c ============================================================================== --- head/sys/dev/mmc/mmc_subr.c Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/mmc/mmc_subr.c Tue Feb 5 21:37:34 2019 (r343811) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Bernd Walter. All rights reserved. - * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * Copyright (c) 2006 M. Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/mmc/mmc_subr.h ============================================================================== --- head/sys/dev/mmc/mmc_subr.h Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/mmc/mmc_subr.h Tue Feb 5 21:37:34 2019 (r343811) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2006 Bernd Walter. All rights reserved. - * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * Copyright (c) 2006 M. Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/mmc/mmcbrvar.h ============================================================================== --- head/sys/dev/mmc/mmcbrvar.h Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/mmc/mmcbrvar.h Tue Feb 5 21:37:34 2019 (r343811) @@ -2,7 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2006 Bernd Walter. All rights reserved. - * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * Copyright (c) 2006 M. Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/mmc/mmcreg.h ============================================================================== --- head/sys/dev/mmc/mmcreg.h Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/mmc/mmcreg.h Tue Feb 5 21:37:34 2019 (r343811) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * Copyright (c) 2006 M. Warner Losh. * Copyright (c) 2017 Marius Strobl * Copyright (c) 2015-2016 Ilya Bakulin * Modified: head/sys/dev/mmc/mmcsd.c ============================================================================== --- head/sys/dev/mmc/mmcsd.c Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/mmc/mmcsd.c Tue Feb 5 21:37:34 2019 (r343811) @@ -2,7 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2006 Bernd Walter. All rights reserved. - * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * Copyright (c) 2006 M. Warner Losh. * Copyright (c) 2017 Marius Strobl * * Redistribution and use in source and binary forms, with or without Modified: head/sys/dev/mmc/mmcvar.h ============================================================================== --- head/sys/dev/mmc/mmcvar.h Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/mmc/mmcvar.h Tue Feb 5 21:37:34 2019 (r343811) @@ -2,7 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2006 Bernd Walter. All rights reserved. - * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * Copyright (c) 2006 M. Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/pccbb/pccbbdevid.h ============================================================================== --- head/sys/dev/pccbb/pccbbdevid.h Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/pccbb/pccbbdevid.h Tue Feb 5 21:37:34 2019 (r343811) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2001-2004 M. Warner Losh. All rights reserved. + * Copyright (c) 2001-2004 M. Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/puc/puc_pci.c ============================================================================== --- head/sys/dev/puc/puc_pci.c Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/puc/puc_pci.c Tue Feb 5 21:37:34 2019 (r343811) @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-3-Clause * * Copyright (c) 2002 JF Hay. All rights reserved. - * Copyright (c) 2000 M. Warner Losh. All rights reserved. + * Copyright (c) 2000 M. Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/sio/sio_isa.c ============================================================================== --- head/sys/dev/sio/sio_isa.c Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/sio/sio_isa.c Tue Feb 5 21:37:34 2019 (r343811) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2001 M. Warner Losh. All rights reserved. + * Copyright (c) 2001 M. Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/sio/sio_pccard.c ============================================================================== --- head/sys/dev/sio/sio_pccard.c Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/sio/sio_pccard.c Tue Feb 5 21:37:34 2019 (r343811) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2001 M. Warner Losh. All rights reserved. + * Copyright (c) 2001 M. Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/sio/sio_pci.c ============================================================================== --- head/sys/dev/sio/sio_pci.c Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/sio/sio_pci.c Tue Feb 5 21:37:34 2019 (r343811) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2001 M. Warner Losh. All rights reserved. + * Copyright (c) 2001 M. Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/sio/sio_puc.c ============================================================================== --- head/sys/dev/sio/sio_puc.c Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/sio/sio_puc.c Tue Feb 5 21:37:34 2019 (r343811) @@ -2,7 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2002 JF Hay. All rights reserved. - * Copyright (c) 2001 M. Warner Losh. All rights reserved. + * Copyright (c) 2001 M. Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/uart/uart_bus_acpi.c ============================================================================== --- head/sys/dev/uart/uart_bus_acpi.c Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/uart/uart_bus_acpi.c Tue Feb 5 21:37:34 2019 (r343811) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2001 M. Warner Losh. All rights reserved. + * Copyright (c) 2001 M. Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/uart/uart_bus_pccard.c ============================================================================== --- head/sys/dev/uart/uart_bus_pccard.c Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/uart/uart_bus_pccard.c Tue Feb 5 21:37:34 2019 (r343811) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2001 M. Warner Losh. All rights reserved. + * Copyright (c) 2001 M. Warner Losh. * Copyright (c) 2003 Norikatsu Shigemura, Takenori Watanabe All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/dev/uart/uart_bus_puc.c ============================================================================== --- head/sys/dev/uart/uart_bus_puc.c Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/uart/uart_bus_puc.c Tue Feb 5 21:37:34 2019 (r343811) @@ -3,7 +3,7 @@ * * Copyright (c) 2006 Marcel Moolenaar. All rights reserved. * Copyright (c) 2002 JF Hay. All rights reserved. - * Copyright (c) 2001 M. Warner Losh. All rights reserved. + * Copyright (c) 2001 M. Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/usb/controller/generic_ohci.c ============================================================================== --- head/sys/dev/usb/controller/generic_ohci.c Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/usb/controller/generic_ohci.c Tue Feb 5 21:37:34 2019 (r343811) @@ -1,7 +1,6 @@ /*- - * Copyright (c) 2006 M. Warner Losh. All rights reserved. - * Copyright (c) 2016 Emmanuel Vadot - * All rights reserved. + * Copyright (c) 2006 M. Warner Losh. + * Copyright (c) 2016 Emmanuel Vadot All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/usb/controller/ohci_s3c24x0.c ============================================================================== --- head/sys/dev/usb/controller/ohci_s3c24x0.c Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/usb/controller/ohci_s3c24x0.c Tue Feb 5 21:37:34 2019 (r343811) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * Copyright (c) 2006 M. Warner Losh. * Copyright (c) 2009 Andrew Turner. All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/dev/wi/if_wivar.h ============================================================================== --- head/sys/dev/wi/if_wivar.h Tue Feb 5 21:28:29 2019 (r343810) +++ head/sys/dev/wi/if_wivar.h Tue Feb 5 21:37:34 2019 (r343811) @@ -1,8 +1,7 @@ /*- * SPDX-License-Identifier: BSD-4-Clause * - * Copyright (c) 2002 - * M Warner Losh . All rights reserved. + * Copyright (c) 2002 M Warner Losh . * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * Modified: head/usr.sbin/dumpcis/main.c ============================================================================== --- head/usr.sbin/dumpcis/main.c Tue Feb 5 21:28:29 2019 (r343810) +++ head/usr.sbin/dumpcis/main.c Tue Feb 5 21:37:34 2019 (r343811) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * Copyright (c) 2006 M. Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From owner-svn-src-head@freebsd.org Tue Feb 5 21:37:48 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CECD14D16C1; Tue, 5 Feb 2019 21:37:48 +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 9DEB86BB81; Tue, 5 Feb 2019 21:37:47 +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 D9BA123B7E; Tue, 5 Feb 2019 21:37:45 +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 x15LbjKP059000; Tue, 5 Feb 2019 21:37:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15LbjYq058999; Tue, 5 Feb 2019 21:37:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201902052137.x15LbjYq058999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 5 Feb 2019 21:37:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343812 - head/sys/dev/usb/controller X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/usb/controller X-SVN-Commit-Revision: 343812 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9DEB86BB81 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.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 21:37:48 -0000 Author: imp Date: Tue Feb 5 21:37:45 2019 New Revision: 343812 URL: https://svnweb.freebsd.org/changeset/base/343812 Log: Remove obsolete controller We removed support for the super-old samsung s3xxxx parts, but this is a straggler. Remove it too. Deleted: head/sys/dev/usb/controller/ohci_s3c24x0.c From owner-svn-src-head@freebsd.org Tue Feb 5 22:45:28 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2675914D2E15; Tue, 5 Feb 2019 22:45:28 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it1-f179.google.com (mail-it1-f179.google.com [209.85.166.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E0156DE98; Tue, 5 Feb 2019 22:45:27 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it1-f179.google.com with SMTP id z7so1793362iti.0; Tue, 05 Feb 2019 14:45:27 -0800 (PST) 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=Ykbl72MbcwWlBWpzWcgQmjiNZnKduViFuR3vTkmO7SU=; b=lRKZUL2c1KRLONEHdhK25rWIqmFJKij8vdrKpuNWGqCWxU3bkZExch3oA/ssnz+jPM 9bYvGd0URejZXOZM8HEvYFcZ+NRHjCrWAmQI0HGMSGmp/eMXp9NYV40E3pJH5jXMwma2 RzewyWP0QO9jX2wyf+ip11moa0Csq5iVqK1q33XdwnjXHHQkMxd1VpFssKviAnHg/7Wr 9emIc7RfXiiaruN6wVcYsdhz9QPE6+N67dS+nKupWoPhN+7PaI0Ot0QYszuuLXixLD3U fr5xlB5P5QBmKxO0IW12puo17EpdlhXAyLtLbYBsOwmPbYUb76+5T6Gd6o2j4OG+tje0 RNcg== X-Gm-Message-State: AHQUAubT5N+CHbLd2bGz3aYgunDhPwfI2Za8eW1yHaI7HMamqf3EbJkF poqMwnDlLtJAjw2R7sz6zjIc1ct1arCBWXIa/ZjLg98B X-Google-Smtp-Source: AHgI3IZxOxjcClasbv3mTgmT3kEf+Y5Vi42uLHtJrMdbgcmaS5aHhGkSFMyh2xVk3QUWNrO7pPwBCC8Bfw5roJlsyjw= X-Received: by 2002:a02:a607:: with SMTP id c7mr3190285jam.118.1549406719400; Tue, 05 Feb 2019 14:45:19 -0800 (PST) MIME-Version: 1.0 References: <201812302308.wBUN87oG084339@repo.freebsd.org> In-Reply-To: <201812302308.wBUN87oG084339@repo.freebsd.org> From: Ed Maste Date: Tue, 5 Feb 2019 17:45:06 -0500 Message-ID: Subject: Re: svn commit: r342634 - in head/sys: arm/broadcom/bcm2835 arm/nvidia arm/ti dev/sdhci To: Marius Strobl Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 3E0156DE98 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.179 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-5.90 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,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]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-2.92)[ip: (-8.81), ipnet: 209.85.128.0/17(-3.77), asn: 15169(-1.95), country: US(-0.07)]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; RCVD_IN_DNSWL_NONE(0.00)[179.166.85.209.list.dnswl.org : 127.0.5.0]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; MIME_TRACE(0.00)[0:+]; 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]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 22:45:28 -0000 On Sun, 30 Dec 2018 at 18:08, Marius Strobl wrote: > > Author: marius > Date: Sun Dec 30 23:08:06 2018 > New Revision: 342634 > URL: https://svnweb.freebsd.org/changeset/base/342634 > > Log: > o Don't allocate resources for SDMA in sdhci(4) if the controller or the ... It seems this change introduced a panic on boot on the Jetson TK1 platform, see PR 235542. Can you please take a look at the PR and suggest next steps for debugging? From owner-svn-src-head@freebsd.org Tue Feb 5 22:53:37 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A69D414D31FD; Tue, 5 Feb 2019 22:53:37 +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 17D336E4D8; Tue, 5 Feb 2019 22:53:37 +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 090892490C; Tue, 5 Feb 2019 22:53:37 +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 x15Mraxq001129; Tue, 5 Feb 2019 22:53:36 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15Mrabl001127; Tue, 5 Feb 2019 22:53:36 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201902052253.x15Mrabl001127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 5 Feb 2019 22:53:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343814 - in head/sys/cam: ata scsi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/cam: ata scsi X-SVN-Commit-Revision: 343814 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 17D336E4D8 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.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2019 22:53:37 -0000 Author: imp Date: Tue Feb 5 22:53:36 2019 New Revision: 343814 URL: https://svnweb.freebsd.org/changeset/base/343814 Log: Add quirk for Sansisk X400 drives Certain versions of Sandisk x400 firmware can hang under extremely heavly load of large I/Os for prolonged periods of time. Newer / current versions work fine, and should be used where possible. Where not possible, this quirk ensures that I/O requests are limited to 128k to avoids the bug, even under extreme load. Since MAXPHYS is 128k, only users with custom kernels are at risk on the older firmware. Once all known users of the older firmware have upgraded, this quirk will be removed. Sponsored by: Netflix, Inc. Modified: head/sys/cam/ata/ata_da.c head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Tue Feb 5 22:08:49 2019 (r343813) +++ head/sys/cam/ata/ata_da.c Tue Feb 5 22:53:36 2019 (r343814) @@ -119,7 +119,8 @@ typedef enum { ADA_Q_NCQ_TRIM_BROKEN = 0x02, ADA_Q_LOG_BROKEN = 0x04, ADA_Q_SMR_DM = 0x08, - ADA_Q_NO_TRIM = 0x10 + ADA_Q_NO_TRIM = 0x10, + ADA_Q_128KB = 0x20 } ada_quirks; #define ADA_Q_BIT_STRING \ @@ -128,7 +129,8 @@ typedef enum { "\002NCQ_TRIM_BROKEN" \ "\003LOG_BROKEN" \ "\004SMR_DM" \ - "\005NO_TRIM" + "\005NO_TRIM" \ + "\006128KB" typedef enum { ADA_CCB_RAHEAD = 0x01, @@ -277,6 +279,11 @@ struct ada_quirk_entry { static struct ada_quirk_entry ada_quirk_table[] = { { + /* Sandisk X400 */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "SanDisk?SD8SB8U1T00*", "X4162000*" }, + /*quirks*/ADA_Q_128KB + }, + { /* Hitachi Advanced Format (4k) drives */ { T_DIRECT, SIP_MEDIA_FIXED, "*", "Hitachi H??????????E3*", "*" }, /*quirks*/ADA_Q_4K @@ -1815,6 +1822,8 @@ adaregister(struct cam_periph *periph, void *arg) maxio = min(maxio, 65536 * softc->params.secsize); else /* 28bit ATA command limit */ maxio = min(maxio, 256 * softc->params.secsize); + if (softc->quirks & ADA_Q_128KB) + maxio = min(maxio, 128 * 1024); softc->disk->d_maxsize = maxio; softc->disk->d_unit = periph->unit_number; softc->disk->d_flags = DISKFLAG_DIRECT_COMPLETION | DISKFLAG_CANZONE; Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Tue Feb 5 22:08:49 2019 (r343813) +++ head/sys/cam/scsi/scsi_da.c Tue Feb 5 22:53:36 2019 (r343814) @@ -130,7 +130,8 @@ typedef enum { DA_Q_NO_UNMAP = 0x20, DA_Q_RETRY_BUSY = 0x40, DA_Q_SMR_DM = 0x80, - DA_Q_STRICT_UNMAP = 0x100 + DA_Q_STRICT_UNMAP = 0x100, + DA_Q_128KB = 0x200 } da_quirks; #define DA_Q_BIT_STRING \ @@ -143,7 +144,8 @@ typedef enum { "\006NO_UNMAP" \ "\007RETRY_BUSY" \ "\010SMR_DM" \ - "\011STRICT_UNMAP" + "\011STRICT_UNMAP" \ + "\012128KB" typedef enum { DA_CCB_PROBE_RC = 0x01, @@ -871,6 +873,11 @@ static struct da_quirk_entry da_quirk_table[] = }, /* ATA/SATA devices over SAS/USB/... */ { + /* Sandisk X400 */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "SanDisk SD8SB8U1*", "*" }, + /*quirks*/DA_Q_128KB + }, + { /* Hitachi Advanced Format (4k) drives */ { T_DIRECT, SIP_MEDIA_FIXED, "Hitachi", "H??????????E3*", "*" }, /*quirks*/DA_Q_4K @@ -2825,6 +2832,8 @@ daregister(struct cam_periph *periph, void *arg) softc->maxio = MAXPHYS; /* for safety */ else softc->maxio = cpi.maxio; + if (softc->quirks & DA_Q_128KB) + softc->maxio = min(softc->maxio, 128 * 1024); softc->disk->d_maxsize = softc->maxio; softc->disk->d_unit = periph->unit_number; softc->disk->d_flags = DISKFLAG_DIRECT_COMPLETION | DISKFLAG_CANZONE; From owner-svn-src-head@freebsd.org Wed Feb 6 01:34:15 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49F2514D7606; Wed, 6 Feb 2019 01:34:15 +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 DFB7F745F1; Wed, 6 Feb 2019 01:34:14 +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 CC63B26413; Wed, 6 Feb 2019 01:34:14 +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 x161YE83084494; Wed, 6 Feb 2019 01:34:14 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x161YEp4084493; Wed, 6 Feb 2019 01:34:14 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902060134.x161YEp4084493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 01:34:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343815 - head/sys/dev/iwn X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/dev/iwn X-SVN-Commit-Revision: 343815 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DFB7F745F1 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 01:34:15 -0000 Author: avos Date: Wed Feb 6 01:34:14 2019 New Revision: 343815 URL: https://svnweb.freebsd.org/changeset/base/343815 Log: iwn(4): plug initialization path vs interrupt handler races There are few places in interrupt handler where the driver lock is dropped; ensure that device is still running before processing remaining ring entries. PR: 192641 MFC after: 5 days Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Tue Feb 5 22:53:36 2019 (r343814) +++ head/sys/dev/iwn/if_iwn.c Wed Feb 6 01:34:14 2019 (r343815) @@ -3990,6 +3990,7 @@ iwn_notif_intr(struct iwn_softc *sc) struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); uint16_t hw; + int is_stopped; bus_dmamap_sync(sc->rxq.stat_dma.tag, sc->rxq.stat_dma.map, BUS_DMASYNC_POSTREAD); @@ -4021,6 +4022,11 @@ iwn_notif_intr(struct iwn_softc *sc) case IWN_MPDU_RX_DONE: /* An 802.11 frame has been received. */ iwn_rx_done(sc, desc, data); + + is_stopped = (sc->sc_flags & IWN_FLAG_RUNNING) == 0; + if (__predict_false(is_stopped)) + return; + break; case IWN_RX_COMPRESSED_BA: @@ -4061,6 +4067,11 @@ iwn_notif_intr(struct iwn_softc *sc) IWN_UNLOCK(sc); ieee80211_beacon_miss(ic); IWN_LOCK(sc); + + is_stopped = (sc->sc_flags & + IWN_FLAG_RUNNING) == 0; + if (__predict_false(is_stopped)) + return; } } break; @@ -4127,6 +4138,11 @@ iwn_notif_intr(struct iwn_softc *sc) IWN_UNLOCK(sc); ieee80211_scan_next(vap); IWN_LOCK(sc); + + is_stopped = (sc->sc_flags & IWN_FLAG_RUNNING) == 0; + if (__predict_false(is_stopped)) + return; + break; } case IWN5000_CALIBRATION_RESULT: From owner-svn-src-head@freebsd.org Wed Feb 6 03:52:16 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8E3B14DAF42; Wed, 6 Feb 2019 03:52:15 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 8F9B68246E; Wed, 6 Feb 2019 03:52:15 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 825C727CDE; Wed, 6 Feb 2019 03:52:15 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x163qFgL058196; Wed, 6 Feb 2019 03:52:15 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x163qFMA058193; Wed, 6 Feb 2019 03:52:15 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201902060352.x163qFMA058193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 6 Feb 2019 03:52:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343824 - in head/sys/powerpc: include ofw powerpc X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in head/sys/powerpc: include ofw powerpc X-SVN-Commit-Revision: 343824 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8F9B68246E 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.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 03:52:16 -0000 Author: jhibbits Date: Wed Feb 6 03:52:14 2019 New Revision: 343824 URL: https://svnweb.freebsd.org/changeset/base/343824 Log: powerpc: Bind IRQs to only one interrupt on QorIQ SoCs The QorIQ SoCs don't actually support multicast interrupts, and the references state explicitly that multicast is undefined behavior. Avoid the undefined behavior by binding to only a single CPU, using a quirk to determine if this is necessary. MFC after: 3 weeks Modified: head/sys/powerpc/include/openpicvar.h head/sys/powerpc/ofw/openpic_ofw.c head/sys/powerpc/powerpc/openpic.c Modified: head/sys/powerpc/include/openpicvar.h ============================================================================== --- head/sys/powerpc/include/openpicvar.h Wed Feb 6 02:35:56 2019 (r343823) +++ head/sys/powerpc/include/openpicvar.h Wed Feb 6 03:52:14 2019 (r343824) @@ -34,6 +34,8 @@ #define OPENPIC_IRQMAX 256 /* h/w allows more */ +#define OPENPIC_QUIRK_SINGLE_BIND 1 /* Bind interrupts to only 1 CPU */ + /* Names match the macros in openpicreg.h. */ struct openpic_timer { uint32_t tcnt; @@ -55,6 +57,7 @@ struct openpic_softc { u_int sc_ncpu; u_int sc_nirq; int sc_psim; + u_int sc_quirks; /* Saved states. */ uint32_t sc_saved_config; Modified: head/sys/powerpc/ofw/openpic_ofw.c ============================================================================== --- head/sys/powerpc/ofw/openpic_ofw.c Wed Feb 6 02:35:56 2019 (r343823) +++ head/sys/powerpc/ofw/openpic_ofw.c Wed Feb 6 03:52:14 2019 (r343824) @@ -128,14 +128,19 @@ openpic_ofw_probe(device_t dev) static int openpic_ofw_attach(device_t dev) { + struct openpic_softc *sc; phandle_t xref, node; node = ofw_bus_get_node(dev); + sc = device_get_softc(dev); if (OF_getencprop(node, "phandle", &xref, sizeof(xref)) == -1 && OF_getencprop(node, "ibm,phandle", &xref, sizeof(xref)) == -1 && OF_getencprop(node, "linux,phandle", &xref, sizeof(xref)) == -1) xref = node; + + if (ofw_bus_is_compatible(dev, "fsl,mpic")) + sc->sc_quirks = OPENPIC_QUIRK_SINGLE_BIND; return (openpic_common_attach(dev, xref)); } Modified: head/sys/powerpc/powerpc/openpic.c ============================================================================== --- head/sys/powerpc/powerpc/openpic.c Wed Feb 6 02:35:56 2019 (r343823) +++ head/sys/powerpc/powerpc/openpic.c Wed Feb 6 03:52:14 2019 (r343824) @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -236,6 +237,7 @@ void openpic_bind(device_t dev, u_int irq, cpuset_t cpumask, void **priv __unused) { struct openpic_softc *sc; + uint32_t mask; /* If we aren't directly connected to the CPU, this won't work */ if (dev != root_pic) @@ -247,7 +249,23 @@ openpic_bind(device_t dev, u_int irq, cpuset_t cpumask * XXX: openpic_write() is very special and just needs a 32 bits mask. * For the moment, just play dirty and get the first half word. */ - openpic_write(sc, OPENPIC_IDEST(irq), cpumask.__bits[0] & 0xffffffff); + mask = cpumask.__bits[0] & 0xffffffff; + if (sc->sc_quirks & OPENPIC_QUIRK_SINGLE_BIND) { + int i = mftb() % CPU_COUNT(&cpumask); + int cpu, ncpu; + + ncpu = 0; + CPU_FOREACH(cpu) { + if (!(mask & (1 << cpu))) + continue; + if (ncpu == i) + break; + ncpu++; + } + mask &= (1 << cpu); + } + + openpic_write(sc, OPENPIC_IDEST(irq), mask); } void From owner-svn-src-head@freebsd.org Wed Feb 6 03:57:52 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA45F14B000B; Wed, 6 Feb 2019 03:57:52 +0000 (UTC) (envelope-from yuripv@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 43EC182678; Wed, 6 Feb 2019 03:57:52 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3064027CF7; Wed, 6 Feb 2019 03:57:52 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x163vqOH058483; Wed, 6 Feb 2019 03:57:52 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x163vqrq058482; Wed, 6 Feb 2019 03:57:52 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <201902060357.x163vqrq058482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Wed, 6 Feb 2019 03:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343825 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 343825 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 43EC182678 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.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 03:57:52 -0000 Author: yuripv Date: Wed Feb 6 03:57:51 2019 New Revision: 343825 URL: https://svnweb.freebsd.org/changeset/base/343825 Log: pwm.9: fix markup in interfaces description Reviewed by: manu Differential revision: https://reviews.freebsd.org/D18830 Modified: head/share/man/man9/pwm.9 Modified: head/share/man/man9/pwm.9 ============================================================================== --- head/share/man/man9/pwm.9 Wed Feb 6 03:52:14 2019 (r343824) +++ head/share/man/man9/pwm.9 Wed Feb 6 03:57:51 2019 (r343825) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2018 +.Dd January 12, 2019 .Dt PWM 9 .Os .Sh NAME @@ -79,7 +79,7 @@ Get the current flags for the channel. Enable the PWM channel. .It Fn PWM_CHANNEL_ISENABLED "device_t dev" "int channel" "bool *enable" Test if the PWM channel is enabled. -.It PWM_CHANNEL_MAX "device_t dev" "int channel" "int *nchannel" +.It Fn PWM_CHANNEL_MAX "device_t dev" "int channel" "int *nchannel" Get the maximum number of channels supported by the controller. .El .Sh HISTORY From owner-svn-src-head@freebsd.org Wed Feb 6 04:00:38 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3A4C14B00E6; Wed, 6 Feb 2019 04:00:37 +0000 (UTC) (envelope-from yuripv@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 975188281C; Wed, 6 Feb 2019 04:00:37 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8AC7A27D13; Wed, 6 Feb 2019 04:00:37 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1640b2Q059402; Wed, 6 Feb 2019 04:00:37 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1640bNA059401; Wed, 6 Feb 2019 04:00:37 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <201902060400.x1640bNA059401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Wed, 6 Feb 2019 04:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343826 - head/usr.sbin/pwm X-SVN-Group: head X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: head/usr.sbin/pwm X-SVN-Commit-Revision: 343826 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 975188281C 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 04:00:38 -0000 Author: yuripv Date: Wed Feb 6 04:00:37 2019 New Revision: 343826 URL: https://svnweb.freebsd.org/changeset/base/343826 Log: pwm.8: fix markup in synopsis, add -f description Reviewed by: bcr, manu Differential revision: https://reviews.freebsd.org/D18829 Modified: head/usr.sbin/pwm/pwm.8 Modified: head/usr.sbin/pwm/pwm.8 ============================================================================== --- head/usr.sbin/pwm/pwm.8 Wed Feb 6 03:57:51 2019 (r343825) +++ head/usr.sbin/pwm/pwm.8 Wed Feb 6 04:00:37 2019 (r343826) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2018 +.Dd January 12, 2019 .Dt PWM 8 .Os .Sh NAME @@ -44,20 +44,25 @@ .Nm .Op Fl f Ar device .Fl c Ar channel -.Fl p period +.Fl p Ar period .Nm .Op Fl f Ar device .Fl c Ar channel -.Fl d duty +.Fl d Ar duty .Sh DESCRIPTION The .Nm utility can be used to configure pwm controllers. .Pp The options are as follow: -.Bl -tag -width ".Fl f Ar device" +.Bl -tag -width "-c channel" .It Fl c Ar channel Channel number to operate on +.It Fl f Ar device +Device to operate on. +If not specified, +.Pa /dev/pwmc0 +is used. .It Fl E Enable the pwm channel .It Fl D @@ -73,16 +78,19 @@ Configure the duty (in nanoseconds or percentage) of t .Bl -bullet .It Show the configuration of the pwm channel: -.Pp +.Bd -literal pwm -f /dev/pwmc0 -C +.Ed .It Configure a 50000 ns period and a 25000 duty cycle: -.Pp +.Bd -literal pwm -f /dev/pwmc0 -p 50000 -d 25000 +.Ed .It Configure a 50% duty cycle: -.Pp +.Bd -literal pwm -f /dev/pwmc0 -d 50% +.Ed .El .Sh SEE ALSO .Xr pwm 9 , From owner-svn-src-head@freebsd.org Wed Feb 6 04:36:30 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FC5F14B102D; Wed, 6 Feb 2019 04:36:30 +0000 (UTC) (envelope-from jah@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 8D1778373C; Wed, 6 Feb 2019 04:36:29 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 62A4C456; Wed, 6 Feb 2019 04:36:29 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x164aTUP078974; Wed, 6 Feb 2019 04:36:29 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x164aTmw078973; Wed, 6 Feb 2019 04:36:29 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201902060436.x164aTmw078973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Wed, 6 Feb 2019 04:36:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343827 - head/lib/libcasper/services/cap_syslog X-SVN-Group: head X-SVN-Commit-Author: jah X-SVN-Commit-Paths: head/lib/libcasper/services/cap_syslog X-SVN-Commit-Revision: 343827 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8D1778373C 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.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 04:36:30 -0000 Author: jah Date: Wed Feb 6 04:36:28 2019 New Revision: 343827 URL: https://svnweb.freebsd.org/changeset/base/343827 Log: r341692 changed cap_syslog(3) to preserve the stdio descriptors inherited from its parent so that LOG_PERROR would work. However, this caused dhclient(8)'s stdio streams to remain open across daemonization, breaking the ability to capture its foreground output as done in netconfig_ipv4. Fix this by reverting r341692 and instead passing the parent's stderr descriptor as an argument to cap_openlog() only when LOG_PERROR is specified in logopt. PR: 234514 Suggested by: markj Reported by: Shawn Webb Reviewed by: markj, oshogbo MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D18989 Modified: head/lib/libcasper/services/cap_syslog/cap_syslog.c Modified: head/lib/libcasper/services/cap_syslog/cap_syslog.c ============================================================================== --- head/lib/libcasper/services/cap_syslog/cap_syslog.c Wed Feb 6 04:00:37 2019 (r343826) +++ head/lib/libcasper/services/cap_syslog/cap_syslog.c Wed Feb 6 04:36:28 2019 (r343827) @@ -88,6 +88,9 @@ cap_openlog(cap_channel_t *chan, const char *ident, in } nvlist_add_number(nvl, "logopt", logopt); nvlist_add_number(nvl, "facility", facility); + if (logopt & LOG_PERROR) { + nvlist_add_descriptor(nvl, "stderr", STDERR_FILENO); + } nvl = cap_xfer_nvlist(chan, nvl); if (nvl == NULL) { return; @@ -131,6 +134,7 @@ cap_setlogmask(cap_channel_t *chan, int maskpri) */ static char *LogTag; +static int prev_stderr = -1; static void slog_vsyslog(const nvlist_t *limits __unused, const nvlist_t *nvlin, @@ -146,6 +150,8 @@ slog_openlog(const nvlist_t *limits __unused, const nv nvlist_t *nvlout __unused) { const char *ident; + uint64_t logopt; + int stderr_fd; ident = dnvlist_get_string(nvlin, "ident", NULL); if (ident != NULL) { @@ -153,8 +159,19 @@ slog_openlog(const nvlist_t *limits __unused, const nv LogTag = strdup(ident); } - openlog(LogTag, nvlist_get_number(nvlin, "logopt"), - nvlist_get_number(nvlin, "facility")); + logopt = nvlist_get_number(nvlin, "logopt"); + if (logopt & LOG_PERROR) { + stderr_fd = dnvlist_get_descriptor(nvlin, "stderr", -1); + if (prev_stderr == -1) + prev_stderr = dup(STDERR_FILENO); + if (prev_stderr != -1) + (void)dup2(stderr_fd, STDERR_FILENO); + } else if (prev_stderr != -1) { + (void)dup2(prev_stderr, STDERR_FILENO); + close(prev_stderr); + prev_stderr = -1; + } + openlog(LogTag, logopt, nvlist_get_number(nvlin, "facility")); } static void @@ -166,6 +183,12 @@ slog_closelog(const nvlist_t *limits __unused, const n free(LogTag); LogTag = NULL; + + if (prev_stderr != -1) { + (void)dup2(prev_stderr, STDERR_FILENO); + close(prev_stderr); + prev_stderr = -1; + } } static void @@ -198,4 +221,4 @@ syslog_command(const char *cmd, const nvlist_t *limits return (0); } -CREATE_SERVICE("system.syslog", NULL, syslog_command, CASPER_SERVICE_STDIO); +CREATE_SERVICE("system.syslog", NULL, syslog_command, 0); From owner-svn-src-head@freebsd.org Wed Feb 6 06:03:45 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB04F14B8087; Wed, 6 Feb 2019 06:03:45 +0000 (UTC) (envelope-from mmel@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 0FBC985BDB; Wed, 6 Feb 2019 06:03:45 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E7EF8138F; Wed, 6 Feb 2019 06:03:44 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1663iHI025875; Wed, 6 Feb 2019 06:03:44 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1663i1T025874; Wed, 6 Feb 2019 06:03:44 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201902060603.x1663i1T025874@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 6 Feb 2019 06:03:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343828 - head/sys/dts/arm X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: head/sys/dts/arm X-SVN-Commit-Revision: 343828 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0FBC985BDB 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.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 06:03:45 -0000 Author: mmel Date: Wed Feb 6 06:03:44 2019 New Revision: 343828 URL: https://svnweb.freebsd.org/changeset/base/343828 Log: Adapt FreeBSD specific DT stub for Jetson TK1 board to be consistent with update of devicetree to 4.19 in r340337. Our build system doesn't provide dependencies for included DTS files, so nobody noticed this issue for long time. PR: 235362 MFC after: 1 week Modified: head/sys/dts/arm/tegra124-jetson-tk1-fbsd.dts Modified: head/sys/dts/arm/tegra124-jetson-tk1-fbsd.dts ============================================================================== --- head/sys/dts/arm/tegra124-jetson-tk1-fbsd.dts Wed Feb 6 04:36:28 2019 (r343827) +++ head/sys/dts/arm/tegra124-jetson-tk1-fbsd.dts Wed Feb 6 06:03:44 2019 (r343828) @@ -38,7 +38,7 @@ stdout = &uartd; }; - memory { + memory@80000000 { /* reg = <0x0 0x80000000 0x0 0x80000000>; */ reg = <0x0 0x80000000 0x0 0x70000000>; }; From owner-svn-src-head@freebsd.org Wed Feb 6 12:01:39 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FEBD14D0BF7; Wed, 6 Feb 2019 12:01:39 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "alchemy.franken.de", Issuer "alchemy.franken.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48CDB6A85D; Wed, 6 Feb 2019 12:01:38 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.15.2/8.15.2/ALCHEMY.FRANKEN.DE) with ESMTPS id x16C1VEb075256 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 6 Feb 2019 13:01:31 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.15.2/8.15.2/Submit) id x16C1VVd075255; Wed, 6 Feb 2019 13:01:31 +0100 (CET) (envelope-from marius) Date: Wed, 6 Feb 2019 13:01:31 +0100 From: Marius Strobl To: Ed Maste Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r342634 - in head/sys: arm/broadcom/bcm2835 arm/nvidia arm/ti dev/sdhci Message-ID: <20190206120131.GP87995@alchemy.franken.de> References: <201812302308.wBUN87oG084339@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (alchemy.franken.de [0.0.0.0]); Wed, 06 Feb 2019 13:01:32 +0100 (CET) X-Rspamd-Queue-Id: 48CDB6A85D 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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 12:01:39 -0000 On Tue, Feb 05, 2019 at 05:45:06PM -0500, Ed Maste wrote: > On Sun, 30 Dec 2018 at 18:08, Marius Strobl wrote: > > > > Author: marius > > Date: Sun Dec 30 23:08:06 2018 > > New Revision: 342634 > > URL: https://svnweb.freebsd.org/changeset/base/342634 > > > > Log: > > o Don't allocate resources for SDMA in sdhci(4) if the controller or the > ... > > It seems this change introduced a panic on boot on the Jetson TK1 > platform, see PR 235542. Can you please take a look at the PR and > suggest next steps for debugging? Done, however, to the best of my knowledge, that panic is due to a bug in the ARMv6 bus_dma(9) implementation an ARM maintainer needs to look at. Marius From owner-svn-src-head@freebsd.org Wed Feb 6 13:01:22 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3EE2414D366F; Wed, 6 Feb 2019 13:01:22 +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 D97F36CD51; Wed, 6 Feb 2019 13:01:21 +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 B2C7D5B63; Wed, 6 Feb 2019 13:01:21 +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 x16D1LkW044350; Wed, 6 Feb 2019 13:01:21 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x16D1LWv044349; Wed, 6 Feb 2019 13:01:21 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902061301.x16D1LWv044349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 6 Feb 2019 13:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343837 - head/sys/net80211 X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/net80211 X-SVN-Commit-Revision: 343837 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D97F36CD51 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.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 13:01:22 -0000 Author: avos Date: Wed Feb 6 13:01:21 2019 New Revision: 343837 URL: https://svnweb.freebsd.org/changeset/base/343837 Log: net80211(4): validate supplied roam:rate values from ifconfig(8) MFC after: 4 days Modified: head/sys/net80211/ieee80211_ioctl.c Modified: head/sys/net80211/ieee80211_ioctl.c ============================================================================== --- head/sys/net80211/ieee80211_ioctl.c Wed Feb 6 12:31:07 2019 (r343836) +++ head/sys/net80211/ieee80211_ioctl.c Wed Feb 6 13:01:21 2019 (r343837) @@ -2204,18 +2204,6 @@ ieee80211_ioctl_setregdomain(struct ieee80211vap *vap, } static int -ieee80211_ioctl_setroam(struct ieee80211vap *vap, - const struct ieee80211req *ireq) -{ - if (ireq->i_len != sizeof(vap->iv_roamparms)) - return EINVAL; - /* XXX validate params */ - /* XXX? ENETRESET to push to device? */ - return copyin(ireq->i_data, vap->iv_roamparms, - sizeof(vap->iv_roamparms)); -} - -static int checkrate(const struct ieee80211_rateset *rs, int rate) { int i; @@ -2242,6 +2230,73 @@ checkmcs(const struct ieee80211_htrateset *rs, int mcs if (IEEE80211_RV(rs->rs_rates[i]) == rate_val) return 1; return 0; +} + +static int +ieee80211_ioctl_setroam(struct ieee80211vap *vap, + const struct ieee80211req *ireq) +{ + struct ieee80211com *ic = vap->iv_ic; + struct ieee80211_roamparams_req *parms; + struct ieee80211_roamparam *src, *dst; + const struct ieee80211_htrateset *rs_ht; + const struct ieee80211_rateset *rs; + int changed, error, mode, is11n, nmodes; + + if (ireq->i_len != sizeof(vap->iv_roamparms)) + return EINVAL; + + parms = IEEE80211_MALLOC(sizeof(*parms), M_TEMP, + IEEE80211_M_NOWAIT | IEEE80211_M_ZERO); + if (parms == NULL) + return ENOMEM; + + error = copyin(ireq->i_data, parms, ireq->i_len); + if (error != 0) + goto fail; + + changed = 0; + nmodes = IEEE80211_MODE_MAX; + + /* validate parameters and check if anything changed */ + for (mode = IEEE80211_MODE_11A; mode < nmodes; mode++) { + if (isclr(ic->ic_modecaps, mode)) + continue; + src = &parms->params[mode]; + dst = &vap->iv_roamparms[mode]; + rs = &ic->ic_sup_rates[mode]; /* NB: 11n maps to legacy */ + rs_ht = &ic->ic_sup_htrates; + is11n = (mode == IEEE80211_MODE_11NA || + mode == IEEE80211_MODE_11NG); + /* XXX TODO: 11ac */ + if (src->rate != dst->rate) { + if (!checkrate(rs, src->rate) && + (!is11n || !checkmcs(rs_ht, src->rate))) { + error = EINVAL; + goto fail; + } + changed++; + } + if (src->rssi != dst->rssi) + changed++; + } + if (changed) { + /* + * Copy new parameters in place and notify the + * driver so it can push state to the device. + */ + /* XXX locking? */ + for (mode = IEEE80211_MODE_11A; mode < nmodes; mode++) { + if (isset(ic->ic_modecaps, mode)) + vap->iv_roamparms[mode] = parms->params[mode]; + } + + if (vap->iv_roaming == IEEE80211_ROAMING_DEVICE) + error = ERESTART; + } + +fail: IEEE80211_FREE(parms, M_TEMP); + return error; } static int From owner-svn-src-head@freebsd.org Wed Feb 6 16:30:09 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE6DD14D8A4E; Wed, 6 Feb 2019 16:30:09 +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 625757439F; Wed, 6 Feb 2019 16:30:09 +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 578817F0A; Wed, 6 Feb 2019 16:30:09 +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 x16GU9r3051464; Wed, 6 Feb 2019 16:30:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x16GU93Y051463; Wed, 6 Feb 2019 16:30:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201902061630.x16GU93Y051463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 6 Feb 2019 16:30:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343838 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 343838 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 625757439F 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.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 16:30:10 -0000 Author: emaste Date: Wed Feb 6 16:30:08 2019 New Revision: 343838 URL: https://svnweb.freebsd.org/changeset/base/343838 Log: Retire CTM option after r342126 Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Wed Feb 6 13:01:21 2019 (r343837) +++ head/share/mk/src.opts.mk Wed Feb 6 16:30:08 2019 (r343838) @@ -83,7 +83,6 @@ __DEFAULT_YES_OPTIONS = \ CPP \ CROSS_COMPILER \ CRYPT \ - CTM \ CUSE \ CXX \ CXGBETOOL \ From owner-svn-src-head@freebsd.org Wed Feb 6 17:21:27 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B75714D9D64; Wed, 6 Feb 2019 17:21:27 +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 D612575E9B; Wed, 6 Feb 2019 17:21:26 +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 CC4CA88D0; Wed, 6 Feb 2019 17:21:26 +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 x16HLQTD081490; Wed, 6 Feb 2019 17:21:26 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x16HLQgO081488; Wed, 6 Feb 2019 17:21:26 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201902061721.x16HLQgO081488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 6 Feb 2019 17:21:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343839 - in head/sys: amd64/conf conf i386/conf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: amd64/conf conf i386/conf X-SVN-Commit-Revision: 343839 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D612575E9B 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 17:21:27 -0000 Author: emaste Date: Wed Feb 6 17:21:25 2019 New Revision: 343839 URL: https://svnweb.freebsd.org/changeset/base/343839 Log: Retire SPX_HACK option unused after r342244 Modified: head/sys/amd64/conf/NOTES head/sys/conf/options head/sys/i386/conf/NOTES Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Wed Feb 6 16:30:08 2019 (r343838) +++ head/sys/amd64/conf/NOTES Wed Feb 6 17:21:25 2019 (r343839) @@ -612,9 +612,6 @@ options EFIRT # Enable 32-bit runtime support for FreeBSD/i386 binaries. options COMPAT_FREEBSD32 -# Emulate spx device for client side of SVR3 local X interface -#XXX#options SPX_HACK - # Enable (32-bit) a.out binary support options COMPAT_AOUT Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed Feb 6 16:30:08 2019 (r343838) +++ head/sys/conf/options Wed Feb 6 17:21:25 2019 (r343839) @@ -201,7 +201,6 @@ SCHED_STATS opt_sched.h SCHED_ULE opt_sched.h SLEEPQUEUE_PROFILING SLHCI_DEBUG opt_slhci.h -SPX_HACK STACK opt_stack.h SUIDDIR MSGMNB opt_sysvipc.h Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Wed Feb 6 16:30:08 2019 (r343838) +++ head/sys/i386/conf/NOTES Wed Feb 6 17:21:25 2019 (r343839) @@ -885,9 +885,6 @@ options NKPT=31 ##################################################################### # ABI Emulation -# Emulate spx device for client side of SVR3 local X interface -options SPX_HACK - # Enable (32-bit) a.out binary support options COMPAT_AOUT From owner-svn-src-head@freebsd.org Wed Feb 6 17:29:52 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30EB814D9E85 for ; Wed, 6 Feb 2019 17:29:52 +0000 (UTC) (envelope-from will@firepipe.net) 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 "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5D77776187 for ; Wed, 6 Feb 2019 17:29:51 +0000 (UTC) (envelope-from will@firepipe.net) Received: by mail-qk1-x72f.google.com with SMTP id m9so4756148qkl.4 for ; Wed, 06 Feb 2019 09:29:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=firepipe-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lDbqXr/eoSBPwNgBJa2f/so2vV4juU3i2pRhuUU2IaM=; b=d3ktz26SsTPVXAT7rVER1W8CwP/vwojaiDtx+haeB0V5bcwit8+Sbc+pY6AZ5JGJeb zw1rce6TldunPiIK5Y8lVsGsKuLfXfHPB+LDFgQCsCzt3JN2Nk/eWpPQTEZEDvrEcqgo esuX2Rh6YZhzzcmd8vvhKNhl6MbsaJ8arfpg4HFG1BrGuybqJFFPXW9yeJ4rfXC/ynFp kGpkpy70VNKpXakyCRPf+rhojBnKGXI13DlQeomgGV0AQ8UW6TXkrRYf5+NoP9yaDqHT 6qu1sOtbqwZq2pEB/Y+93xKFf4sOBVdU58b6SLz/8AUmvj6vJo4vt2k3tLeqiw1j1ElV N3aQ== 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=lDbqXr/eoSBPwNgBJa2f/so2vV4juU3i2pRhuUU2IaM=; b=tlDg/DMsYuG8/lRBfGmY4v8iLy8R5Hm8YAnapklkOLCEKbDUU7HCclEEEhN7IhqQZa pZX11Cd6gnAGTB9clD8z6Pk+vGCaSUHDxqNFV7Jfr8s6+B9kd/PX0HnUDNcQgEsO0fBY pSYhhQLnmAkfCCAWTj1SFHeOE2QIQj260JooGcY6nCrMaLJfi/8S7rJsFFbgmlmbNHAD 8QuQWvrNFTIakIVscCHUG0FMtTfkqQ2ErXjthzShTyaqhsxJhyCYYYuOX01VVtXHGZnX bKUUOFEd7n6bM8r+imt1DsLgw0whum7ySCt6nKtn2GfVwAi8XReTism8cCHqrEqyhvPu qunA== X-Gm-Message-State: AHQUAua/bMI4HcSYcbfps79i4+6kRydJJm6ExPZtm89eO8wHTKWK1tyF nvJTrx4cz/7CpuT0P5F+0xchiCdWlM/6pAteoZNhXQ== X-Google-Smtp-Source: AHgI3IZPDIb7JMiW080JquuFQICFnq8r2QIQ98tVGCUmIqjwqUk7qdE65Bal2o1gZz+tbwAJWgDPHuEvMZwGAHX7Gu0= X-Received: by 2002:a37:de19:: with SMTP id h25mr8519442qkj.146.1549474187722; Wed, 06 Feb 2019 09:29:47 -0800 (PST) MIME-Version: 1.0 References: <201711112330.vABNUwXC077395@repo.freebsd.org> <20190205202145.A1080@besplex.bde.org> <20190206024025.X3175@besplex.bde.org> In-Reply-To: <20190206024025.X3175@besplex.bde.org> From: Will Andrews Date: Wed, 6 Feb 2019 11:29:32 -0600 Message-ID: Subject: Re: svn commit: r325728 - head/lib/libkvm To: Bruce Evans Cc: Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 5D77776187 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=firepipe-net.20150623.gappssmtp.com header.s=20150623 header.b=d3ktz26S X-Spamd-Result: default: False [-6.03 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[firepipe-net.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[firepipe.net]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[firepipe-net.20150623.gappssmtp.com:+]; MX_GOOD(-0.01)[cached: aspmx.l.google.com]; RCVD_IN_DNSWL_NONE(0.00)[f.2.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.93)[-0.928,0]; R_SPF_NA(0.00)[]; FREEMAIL_TO(0.00)[optusnet.com.au]; 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]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(-2.79)[ip: (-9.41), ipnet: 2607:f8b0::/32(-2.50), asn: 15169(-1.96), country: US(-0.07)] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 17:29:52 -0000 On Tue, Feb 5, 2019 at 10:25 AM Bruce Evans wrote: > Signed kp_offset seems wrong. Apart from it not reaching the top of 64- > bit address spaces, adding unsigned kp_len to it gives an unsigned type. > It's appropriate, because in this context, we return page information including addresses that would be valid pointer references, but are not included in the core file. Minidumps omit large numbers of physical pages, so calls to kvm_walk_pages() will generate large numbers of kvm_page instances that have an offset of -1. --Will. From owner-svn-src-head@freebsd.org Wed Feb 6 18:50:50 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDBA714DBB3E; Wed, 6 Feb 2019 18:50: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 9156380EC6; Wed, 6 Feb 2019 18:50:49 +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 DED4B96DB; Wed, 6 Feb 2019 18:50: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 x16Iom33025622; Wed, 6 Feb 2019 18:50:48 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x16IomNP025621; Wed, 6 Feb 2019 18:50:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201902061850.x16IomNP025621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 6 Feb 2019 18:50:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343842 - head/usr.bin/vtfontcvt X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.bin/vtfontcvt X-SVN-Commit-Revision: 343842 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9156380EC6 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.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 18:50:50 -0000 Author: emaste Date: Wed Feb 6 18:50:48 2019 New Revision: 343842 URL: https://svnweb.freebsd.org/changeset/base/343842 Log: vtfontcvt: whitespace cleanup PR: 205707 Submitted by: Dmitry Wagin Modified: head/usr.bin/vtfontcvt/vtfontcvt.c Modified: head/usr.bin/vtfontcvt/vtfontcvt.c ============================================================================== --- head/usr.bin/vtfontcvt/vtfontcvt.c Wed Feb 6 18:43:30 2019 (r343841) +++ head/usr.bin/vtfontcvt/vtfontcvt.c Wed Feb 6 18:50:48 2019 (r343842) @@ -63,10 +63,10 @@ struct glyph { TAILQ_HEAD(glyph_list, glyph); static SLIST_HEAD(, glyph) glyph_hash[FONTCVT_NHASH]; static struct glyph_list glyphs[VFNT_MAPS] = { - TAILQ_HEAD_INITIALIZER(glyphs[0]), - TAILQ_HEAD_INITIALIZER(glyphs[1]), - TAILQ_HEAD_INITIALIZER(glyphs[2]), - TAILQ_HEAD_INITIALIZER(glyphs[3]), + TAILQ_HEAD_INITIALIZER(glyphs[0]), + TAILQ_HEAD_INITIALIZER(glyphs[1]), + TAILQ_HEAD_INITIALIZER(glyphs[2]), + TAILQ_HEAD_INITIALIZER(glyphs[3]), }; static unsigned int glyph_total, glyph_count[4], glyph_unique, glyph_dupe; @@ -79,10 +79,10 @@ struct mapping { TAILQ_HEAD(mapping_list, mapping); static struct mapping_list maps[VFNT_MAPS] = { - TAILQ_HEAD_INITIALIZER(maps[0]), - TAILQ_HEAD_INITIALIZER(maps[1]), - TAILQ_HEAD_INITIALIZER(maps[2]), - TAILQ_HEAD_INITIALIZER(maps[3]), + TAILQ_HEAD_INITIALIZER(maps[0]), + TAILQ_HEAD_INITIALIZER(maps[1]), + TAILQ_HEAD_INITIALIZER(maps[2]), + TAILQ_HEAD_INITIALIZER(maps[3]), }; static unsigned int mapping_total, map_count[4], map_folded_count[4], mapping_unique, mapping_dupe; From owner-svn-src-head@freebsd.org Wed Feb 6 19:22:16 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B22714DC996; Wed, 6 Feb 2019 19:22: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 1E24482782; Wed, 6 Feb 2019 19:22:16 +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 CF0459D75; Wed, 6 Feb 2019 19:22: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 x16JMF7M050315; Wed, 6 Feb 2019 19:22:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x16JMFt8050314; Wed, 6 Feb 2019 19:22:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201902061922.x16JMFt8050314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 6 Feb 2019 19:22:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343843 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 343843 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1E24482782 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.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 19:22:16 -0000 Author: emaste Date: Wed Feb 6 19:22:15 2019 New Revision: 343843 URL: https://svnweb.freebsd.org/changeset/base/343843 Log: riscv: default to non-executable stack There's no need to worry about potential backwards compatibility issues in a brand-new architecture, so avoid stack PROT_EXEC as with arm64. Discussed with: br Modified: head/sys/riscv/riscv/elf_machdep.c Modified: head/sys/riscv/riscv/elf_machdep.c ============================================================================== --- head/sys/riscv/riscv/elf_machdep.c Wed Feb 6 18:50:48 2019 (r343842) +++ head/sys/riscv/riscv/elf_machdep.c Wed Feb 6 19:22:15 2019 (r343843) @@ -77,7 +77,7 @@ struct sysentvec elf64_freebsd_sysvec = { .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = USRSTACK, .sv_psstrings = PS_STRINGS, - .sv_stackprot = VM_PROT_ALL, + .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, .sv_copyout_strings = exec_copyout_strings, .sv_setregs = exec_setregs, .sv_fixlimit = NULL, From owner-svn-src-head@freebsd.org Wed Feb 6 20:18:23 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D387B14DD760; Wed, 6 Feb 2019 20:18:23 +0000 (UTC) (envelope-from gavin@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 6FD5483EA5; Wed, 6 Feb 2019 20:18:23 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5EF50A5E5; Wed, 6 Feb 2019 20:18:23 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x16KINsb084770; Wed, 6 Feb 2019 20:18:23 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x16KIMFr084768; Wed, 6 Feb 2019 20:18:22 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201902062018.x16KIMFr084768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 6 Feb 2019 20:18:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343844 - in head/sys/dev/usb: . net X-SVN-Group: head X-SVN-Commit-Author: gavin X-SVN-Commit-Paths: in head/sys/dev/usb: . net X-SVN-Commit-Revision: 343844 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6FD5483EA5 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.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 20:18:24 -0000 Author: gavin Date: Wed Feb 6 20:18:22 2019 New Revision: 343844 URL: https://svnweb.freebsd.org/changeset/base/343844 Log: Support the Lenovo OneLink in ure(4). MFC after: 1 week Modified: head/sys/dev/usb/net/if_ure.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/net/if_ure.c ============================================================================== --- head/sys/dev/usb/net/if_ure.c Wed Feb 6 19:22:15 2019 (r343843) +++ head/sys/dev/usb/net/if_ure.c Wed Feb 6 20:18:22 2019 (r343844) @@ -69,6 +69,7 @@ static const STRUCT_USB_HOST_ID ure_devs[] = { #define URE_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) } URE_DEV(LENOVO, RTL8153, 0), URE_DEV(LENOVO, TBT3LAN, 0), + URE_DEV(LENOVO, ONELINK, 0), URE_DEV(LENOVO, USBCLAN, 0), URE_DEV(NVIDIA, RTL8153, 0), URE_DEV(REALTEK, RTL8152, URE_FLAG_8152), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Feb 6 19:22:15 2019 (r343843) +++ head/sys/dev/usb/usbdevs Wed Feb 6 20:18:22 2019 (r343844) @@ -2782,6 +2782,7 @@ product LEADTEK 9531 0x2101 9531 GPS product LENOVO GIGALAN 0x304b USB 3.0 Ethernet product LENOVO ETHERNET 0x7203 USB 2.0 Ethernet product LENOVO RTL8153 0x7205 USB 3.0 Ethernet +product LENOVO ONELINK 0x720a USB 3.0 Ethernet product LENOVO TBT3LAN 0x3069 LAN port in Thinkpad TB3 dock product LENOVO USBCLAN 0x3062 LAN port in Thinkpad USB-C dock From owner-svn-src-head@freebsd.org Wed Feb 6 21:24:46 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BE0214DEC1A; Wed, 6 Feb 2019 21:24:46 +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 A5F9B867EC; Wed, 6 Feb 2019 21:24:45 +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 8C9CBB1CC; Wed, 6 Feb 2019 21:24:45 +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 x16LOjXA022316; Wed, 6 Feb 2019 21:24:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x16LOjAs022315; Wed, 6 Feb 2019 21:24:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201902062124.x16LOjAs022315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Wed, 6 Feb 2019 21:24:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343845 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 343845 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A5F9B867EC 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.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 21:24:46 -0000 Author: ngie Date: Wed Feb 6 21:24:44 2019 New Revision: 343845 URL: https://svnweb.freebsd.org/changeset/base/343845 Log: Clean up all directories created by `make hier` The logic I introduced in r322511 unfortunately left chflags schg'ed directories behind created by `make hier` (in the stock /etc/mtree files, this is limited to /var/empty). The proposed change calls `chflags -R 0` and `rm -Rf ...` to clean all of the directories that could not be removed by `${MAKE} clean`. `${MAKE} clean` in bsd.obj.mk calls `cleandir`/`cleanobj`, which handles the first directory tree walk/removal. Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18641 Modified: head/share/mk/suite.test.mk Modified: head/share/mk/suite.test.mk ============================================================================== --- head/share/mk/suite.test.mk Wed Feb 6 20:18:22 2019 (r343844) +++ head/share/mk/suite.test.mk Wed Feb 6 21:24:44 2019 (r343845) @@ -120,5 +120,7 @@ beforecheck: # etc. aftercheck: @cd ${.CURDIR} && ${MAKE} clean + @chflags -R 0 "${DESTDIR}" + @rm -Rf "${DESTDIR}" .endif From owner-svn-src-head@freebsd.org Thu Feb 7 02:00:24 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2108C14BB178; Thu, 7 Feb 2019 02:00:24 +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 B7B8F8EF63; Thu, 7 Feb 2019 02:00:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ACBD6E14D; Thu, 7 Feb 2019 02:00:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1720N7U062962; Thu, 7 Feb 2019 02:00:23 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1720Nox062961; Thu, 7 Feb 2019 02:00:23 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902070200.x1720Nox062961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 7 Feb 2019 02:00:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343850 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 343850 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B7B8F8EF63 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.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 02:00:24 -0000 Author: kib Date: Thu Feb 7 02:00:23 2019 New Revision: 343850 URL: https://svnweb.freebsd.org/changeset/base/343850 Log: contigmalloc: handle M_EXEC. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D19092 Modified: head/sys/vm/vm_kern.c Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Thu Feb 7 01:55:11 2019 (r343849) +++ head/sys/vm/vm_kern.c Thu Feb 7 02:00:23 2019 (r343850) @@ -184,6 +184,7 @@ kmem_alloc_attr_domain(int domain, vm_size_t size, int vm_offset_t addr, i, offset; vm_page_t m; int pflags, tries; + vm_prot_t prot; size = round_page(size); vmem = vm_dom[domain].vmd_kernel_arena; @@ -193,6 +194,7 @@ kmem_alloc_attr_domain(int domain, vm_size_t size, int pflags = malloc2vm_flags(flags) | VM_ALLOC_NOBUSY | VM_ALLOC_WIRED; pflags &= ~(VM_ALLOC_NOWAIT | VM_ALLOC_WAITOK | VM_ALLOC_WAITFAIL); pflags |= VM_ALLOC_NOWAIT; + prot = (flags & M_EXEC) != 0 ? VM_PROT_ALL : VM_PROT_RW; VM_OBJECT_WLOCK(object); for (i = 0; i < size; i += PAGE_SIZE) { tries = 0; @@ -220,8 +222,8 @@ retry: if ((flags & M_ZERO) && (m->flags & PG_ZERO) == 0) pmap_zero_page(m); m->valid = VM_PAGE_BITS_ALL; - pmap_enter(kernel_pmap, addr + i, m, VM_PROT_RW, - VM_PROT_RW | PMAP_ENTER_WIRED, 0); + pmap_enter(kernel_pmap, addr + i, m, prot, + prot | PMAP_ENTER_WIRED, 0); } VM_OBJECT_WUNLOCK(object); return (addr); From owner-svn-src-head@freebsd.org Thu Feb 7 02:09:35 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 868C514BB7E1; Thu, 7 Feb 2019 02:09:35 +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 2C1328F507; Thu, 7 Feb 2019 02:09:35 +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 1F353E30C; Thu, 7 Feb 2019 02:09:35 +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 x1729YL3068325; Thu, 7 Feb 2019 02:09:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1729YSX068323; Thu, 7 Feb 2019 02:09:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902070209.x1729YSX068323@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 7 Feb 2019 02:09:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343851 - in head/sys: i386/acpica x86/acpica X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: i386/acpica x86/acpica X-SVN-Commit-Revision: 343851 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2C1328F507 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.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 02:09:35 -0000 Author: kib Date: Thu Feb 7 02:09:34 2019 New Revision: 343851 URL: https://svnweb.freebsd.org/changeset/base/343851 Log: Fix resume on i386 PAE. It was broken before PAE/no-PAE merge, but since now PAE is the default, resume is apparently becomes for all machines. The corrected issues: - the trampoline page is not mapped executable, so machine faults when paging is on; - MSR.EFER and %cr4 both should be loaded before paging is enabled, otherwise paging structures are invalid (cr4.PAE and EFER.NX). - MSR.EFER and %cr4 should be only loaded if present. I attempt to handle this by not touching the registers if the value is zero. There are some more bits still not quite correct, e.g. unconditional access to %cr4 in resumectx. Reported and debugging help by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/i386/acpica/acpi_wakecode.S head/sys/x86/acpica/acpi_wakeup.c Modified: head/sys/i386/acpica/acpi_wakecode.S ============================================================================== --- head/sys/i386/acpica/acpi_wakecode.S Thu Feb 7 02:00:23 2019 (r343850) +++ head/sys/i386/acpica/acpi_wakecode.S Thu Feb 7 02:09:34 2019 (r343851) @@ -143,16 +143,26 @@ wakeup_32: mov $bootdata32 - bootgdt, %eax mov %ax, %ds - /* Get PCB and return address. */ - movl wakeup_pcb - wakeup_start(%ebx), %ecx - movl wakeup_ret - wakeup_start(%ebx), %edx - - /* Restore CR4 and CR3. */ - movl wakeup_cr4 - wakeup_start(%ebx), %eax + /* Restore EFER, CR4 and CR3. */ + movl wakeup_efer - wakeup_start(%ebx), %eax + movl wakeup_efer - wakeup_start + 4(%ebx), %edx + cmpl $0, %eax + jne 1f + cmpl $0, %edx + je 2f +1: movl $MSR_EFER, %ecx + wrmsr +2: movl wakeup_cr4 - wakeup_start(%ebx), %eax + cmpl $0, %eax + je 3f mov %eax, %cr4 - movl wakeup_cr3 - wakeup_start(%ebx), %eax +3: movl wakeup_cr3 - wakeup_start(%ebx), %eax mov %eax, %cr3 + /* Get PCB and return address. */ + movl wakeup_ret - wakeup_start(%ebx), %edx + movl wakeup_pcb - wakeup_start(%ebx), %ecx + /* Enable paging. */ mov %cr0, %eax orl $CR0_PG, %eax @@ -187,6 +197,9 @@ bootgdtdesc: .long bootgdt - wakeup_start /* Offset plus %ds << 4 */ ALIGN_DATA +wakeup_efer: + .long 0 + .long 0 wakeup_cr4: .long 0 wakeup_cr3: Modified: head/sys/x86/acpica/acpi_wakeup.c ============================================================================== --- head/sys/x86/acpica/acpi_wakeup.c Thu Feb 7 02:00:23 2019 (r343850) +++ head/sys/x86/acpica/acpi_wakeup.c Thu Feb 7 02:09:34 2019 (r343851) @@ -260,6 +260,8 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) WAKECODE_FIXUP(wakeup_efer, uint64_t, rdmsr(MSR_EFER) & ~(EFER_LMA)); #else + if ((amd_feature & AMDID_NX) != 0) + WAKECODE_FIXUP(wakeup_efer, uint64_t, rdmsr(MSR_EFER)); WAKECODE_FIXUP(wakeup_cr4, register_t, pcb->pcb_cr4); #endif WAKECODE_FIXUP(wakeup_pcb, struct pcb *, pcb); @@ -375,8 +377,12 @@ acpi_alloc_wakeup_handler(void *wakepages[ACPI_WAKEPAG * page-aligned. */ for (i = 0; i < ACPI_WAKEPAGES; i++) { - wakepages[i] = contigmalloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT, - 0x500, 0xa0000, PAGE_SIZE, 0ul); + wakepages[i] = contigmalloc(PAGE_SIZE, M_DEVBUF, + M_NOWAIT +#ifdef __i386__ + | M_EXEC +#endif + , 0x500, 0xa0000, PAGE_SIZE, 0ul); if (wakepages[i] == NULL) { printf("%s: can't alloc wake memory\n", __func__); goto freepages; From owner-svn-src-head@freebsd.org Thu Feb 7 02:17:36 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A1AB14BBC0E; Thu, 7 Feb 2019 02:17:36 +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 EBBA78F9F1; Thu, 7 Feb 2019 02:17:35 +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 E1395E4BF; Thu, 7 Feb 2019 02:17:35 +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 x172HZPT073273; Thu, 7 Feb 2019 02:17:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x172HZmA073270; Thu, 7 Feb 2019 02:17:35 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902070217.x172HZmA073270@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 7 Feb 2019 02:17:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343852 - in head/sys: i386/i386 kern x86/include X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: i386/i386 kern x86/include X-SVN-Commit-Revision: 343852 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EBBA78F9F1 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.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 02:17:36 -0000 Author: kib Date: Thu Feb 7 02:17:34 2019 New Revision: 343852 URL: https://svnweb.freebsd.org/changeset/base/343852 Log: Port sysctl kern.elf32.read_exec from amd64 to i386. Make it more comprehensive on i386, by not setting nx bit for any mapping, not just adding PF_X to all kernel-loaded ELF segments. This is needed for the compatibility with older i386 programs that assume that read access implies exec, e.g. old X servers with hand-rolled module loader. Reported and tested by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/i386/i386/pmap.c head/sys/kern/imgact_elf.c head/sys/x86/include/x86_var.h Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Thu Feb 7 02:09:34 2019 (r343851) +++ head/sys/i386/i386/pmap.c Thu Feb 7 02:17:34 2019 (r343852) @@ -3247,7 +3247,7 @@ retry: if ((prot & VM_PROT_WRITE) == 0) newpde &= ~(PG_RW | PG_M); #ifdef PMAP_PAE_COMP - if ((prot & VM_PROT_EXECUTE) == 0) + if ((prot & VM_PROT_EXECUTE) == 0 && !i386_read_exec) newpde |= pg_nx; #endif if (newpde != oldpde) { @@ -3389,7 +3389,7 @@ retry: pbits &= ~(PG_RW | PG_M); } #ifdef PMAP_PAE_COMP - if ((prot & VM_PROT_EXECUTE) == 0) + if ((prot & VM_PROT_EXECUTE) == 0 && !i386_read_exec) pbits |= pg_nx; #endif @@ -3604,7 +3604,7 @@ __CONCAT(PMTYPE, enter)(pmap_t pmap, vm_offset_t va, v KASSERT((newpte & (PG_M | PG_RW)) != PG_M, ("pmap_enter: flags includes VM_PROT_WRITE but prot doesn't")); #ifdef PMAP_PAE_COMP - if ((prot & VM_PROT_EXECUTE) == 0) + if ((prot & VM_PROT_EXECUTE) == 0 && !i386_read_exec) newpte |= pg_nx; #endif if ((flags & PMAP_ENTER_WIRED) != 0) @@ -3841,7 +3841,7 @@ pmap_enter_4mpage(pmap_t pmap, vm_offset_t va, vm_page if ((m->oflags & VPO_UNMANAGED) == 0) newpde |= PG_MANAGED; #ifdef PMAP_PAE_COMP - if ((prot & VM_PROT_EXECUTE) == 0) + if ((prot & VM_PROT_EXECUTE) == 0 && !i386_read_exec) newpde |= pg_nx; #endif if (pmap != kernel_pmap) @@ -4099,7 +4099,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, v if ((m->oflags & VPO_UNMANAGED) == 0) newpte |= PG_MANAGED; #ifdef PMAP_PAE_COMP - if ((prot & VM_PROT_EXECUTE) == 0) + if ((prot & VM_PROT_EXECUTE) == 0 && !i386_read_exec) newpte |= pg_nx; #endif if (pmap != kernel_pmap) Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Thu Feb 7 02:09:34 2019 (r343851) +++ head/sys/kern/imgact_elf.c Thu Feb 7 02:17:34 2019 (r343852) @@ -130,13 +130,11 @@ SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_A nxstack, CTLFLAG_RW, &__elfN(nxstack), 0, __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": enable non-executable stack"); -#if __ELF_WORD_SIZE == 32 -#if defined(__amd64__) +#if __ELF_WORD_SIZE == 32 && (defined(__amd64__) || defined(__i386__)) int i386_read_exec = 0; SYSCTL_INT(_kern_elf32, OID_AUTO, read_exec, CTLFLAG_RW, &i386_read_exec, 0, "enable execution from readable segments"); #endif -#endif static Elf_Brandinfo *elf_brand_list[MAX_BRANDS]; @@ -2516,11 +2514,9 @@ __elfN(trans_prot)(Elf_Word flags) prot |= VM_PROT_WRITE; if (flags & PF_R) prot |= VM_PROT_READ; -#if __ELF_WORD_SIZE == 32 -#if defined(__amd64__) +#if __ELF_WORD_SIZE == 32 && (defined(__amd64__) || defined(__i386__)) if (i386_read_exec && (flags & PF_R)) prot |= VM_PROT_EXECUTE; -#endif #endif return (prot); } Modified: head/sys/x86/include/x86_var.h ============================================================================== --- head/sys/x86/include/x86_var.h Thu Feb 7 02:09:34 2019 (r343851) +++ head/sys/x86/include/x86_var.h Thu Feb 7 02:17:34 2019 (r343852) @@ -83,6 +83,7 @@ extern int _ugssel; extern int use_xsave; extern uint64_t xsave_mask; extern u_int max_apic_id; +extern int i386_read_exec; extern int pti; extern int hw_ibrs_active; extern int hw_ssb_active; From owner-svn-src-head@freebsd.org Thu Feb 7 02:30:35 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8C6914BC940; Thu, 7 Feb 2019 02:30:34 +0000 (UTC) (envelope-from jchandra@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 8748468366; Thu, 7 Feb 2019 02:30:34 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 61A35E699; Thu, 7 Feb 2019 02:30:34 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x172UYhI078563; Thu, 7 Feb 2019 02:30:34 GMT (envelope-from jchandra@FreeBSD.org) Received: (from jchandra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x172UXYb078561; Thu, 7 Feb 2019 02:30:33 GMT (envelope-from jchandra@FreeBSD.org) Message-Id: <201902070230.x172UXYb078561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jchandra set sender to jchandra@FreeBSD.org using -f From: "Jayachandran C." Date: Thu, 7 Feb 2019 02:30:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343853 - in head/sys: arm64/acpica conf dev/acpica X-SVN-Group: head X-SVN-Commit-Author: jchandra X-SVN-Commit-Paths: in head/sys: arm64/acpica conf dev/acpica X-SVN-Commit-Revision: 343853 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8748468366 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.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 02:30:35 -0000 Author: jchandra Date: Thu Feb 7 02:30:33 2019 New Revision: 343853 URL: https://svnweb.freebsd.org/changeset/base/343853 Log: arm64 acpi: Add support for IORT table Add new file arm64/acpica/acpi_iort.c to support the "IO Remapping Table" (IORT). The table is specified in ARM document "ARM DEN 0049D" titled "IO Remapping Table Platform Design Document". The IORT table has information on the associations between PCI root complexes, SMMU blocks and GIC ITS blocks in the system. The changes are to parse and save the information in the IORT table. The API to use this information is added to sys/dev/acpica/acpivar.h. The acpi_iort.c also has code to check the GIC ITS nodes seen in the IORT table with corresponding entries in MADT table (for validity) and with entries in SRAT table (for proximity information). Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D18002 Added: head/sys/arm64/acpica/acpi_iort.c (contents, props changed) Modified: head/sys/conf/files.arm64 head/sys/dev/acpica/acpivar.h Added: head/sys/arm64/acpica/acpi_iort.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/acpica/acpi_iort.c Thu Feb 7 02:30:33 2019 (r343853) @@ -0,0 +1,502 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (C) 2018 Marvell International Ltd. + * + * Author: Jayachandran C Nair + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "opt_acpi.h" + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include + +/* + * Track next XREF available for ITS groups. + */ +static u_int acpi_its_xref = ACPI_MSI_XREF; + +/* + * Some types of IORT nodes have a set of mappings. Each of them map + * a range of device IDs [base..end] from the current node to another + * node. The corresponding device IDs on destination node starts at + * outbase. + */ +struct iort_map_entry { + u_int base; + u_int end; + u_int outbase; + u_int flags; + u_int out_node_offset; + struct iort_node *out_node; +}; + +/* + * The ITS group node does not have any outgoing mappings. It has a + * of a list of GIC ITS blocks which can handle the device ID. We + * will store the PIC XREF used by the block and the blocks proximity + * data here, so that it can be retrieved together. + */ +struct iort_its_entry { + u_int its_id; + u_int xref; + int pxm; +}; + +/* + * IORT node. Each node has some device specific data depending on the + * type of the node. The node can also have a set of mappings, OR in + * case of ITS group nodes a set of ITS entries. + * The nodes are kept in a TAILQ by type. + */ +struct iort_node { + TAILQ_ENTRY(iort_node) next; /* next entry with same type */ + enum AcpiIortNodeType type; /* ACPI type */ + u_int node_offset; /* offset in IORT - node ID */ + u_int nentries; /* items in array below */ + u_int usecount; /* for bookkeeping */ + union { + ACPI_IORT_ROOT_COMPLEX pci_rc; /* PCI root complex */ + ACPI_IORT_SMMU smmu; + ACPI_IORT_SMMU_V3 smmu_v3; + } data; + union { + struct iort_map_entry *mappings; /* node mappings */ + struct iort_its_entry *its; /* ITS IDs array */ + } entries; +}; + +/* Lists for each of the types. */ +static TAILQ_HEAD(, iort_node) pci_nodes = TAILQ_HEAD_INITIALIZER(pci_nodes); +static TAILQ_HEAD(, iort_node) smmu_nodes = TAILQ_HEAD_INITIALIZER(smmu_nodes); +static TAILQ_HEAD(, iort_node) its_groups = TAILQ_HEAD_INITIALIZER(its_groups); + +/* + * Lookup an ID in the mappings array. If successful, map the input ID + * to the output ID and return the output node found. + */ +static struct iort_node * +iort_entry_lookup(struct iort_node *node, u_int id, u_int *outid) +{ + struct iort_map_entry *entry; + int i; + + entry = node->entries.mappings; + for (i = 0; i < node->nentries; i++, entry++) { + if (entry->base <= id && id <= entry->end) + break; + } + if (i == node->nentries) + return (NULL); + if ((entry->flags & ACPI_IORT_ID_SINGLE_MAPPING) == 0) + *outid = entry->outbase + (id - entry->base); + else + *outid = entry->outbase; + return (entry->out_node); +} + +/* + * Map a PCI RID to a SMMU node or an ITS node, based on outtype. + */ +static struct iort_node * +iort_pci_rc_map(u_int seg, u_int rid, u_int outtype, u_int *outid) +{ + struct iort_node *node, *out_node; + u_int nxtid; + + out_node = NULL; + TAILQ_FOREACH(node, &pci_nodes, next) { + if (node->data.pci_rc.PciSegmentNumber != seg) + continue; + out_node = iort_entry_lookup(node, rid, &nxtid); + if (out_node != NULL) + break; + } + + /* Could not find a PCI RC node with segment and device ID. */ + if (out_node == NULL) + return (NULL); + + /* Node can be SMMU or ITS. If SMMU, we need another lookup. */ + if (outtype == ACPI_IORT_NODE_ITS_GROUP && + (out_node->type == ACPI_IORT_NODE_SMMU_V3 || + out_node->type == ACPI_IORT_NODE_SMMU)) { + out_node = iort_entry_lookup(out_node, nxtid, &nxtid); + if (out_node == NULL) + return (NULL); + } + + KASSERT(out_node->type == outtype, ("mapping fail")); + *outid = nxtid; + return (out_node); +} + +#ifdef notyet +/* + * Not implemented, map a PCIe device to the SMMU it is associated with. + */ +int +acpi_iort_map_smmu(u_int seg, u_int devid, void **smmu, u_int *sid) +{ + /* XXX: convert oref to SMMU device */ + return (ENXIO); +} +#endif + +/* + * Allocate memory for a node, initialize and copy mappings. 'start' + * argument provides the table start used to calculate the node offset. + */ +static void +iort_copy_data(struct iort_node *node, ACPI_IORT_NODE *node_entry) +{ + ACPI_IORT_ID_MAPPING *map_entry; + struct iort_map_entry *mapping; + int i; + + map_entry = ACPI_ADD_PTR(ACPI_IORT_ID_MAPPING, node_entry, + node_entry->MappingOffset); + node->nentries = node_entry->MappingCount; + node->usecount = 0; + mapping = malloc(sizeof(*mapping) * node->nentries, M_DEVBUF, + M_WAITOK | M_ZERO); + node->entries.mappings = mapping; + for (i = 0; i < node->nentries; i++, mapping++, map_entry++) { + mapping->base = map_entry->InputBase; + mapping->end = map_entry->InputBase + map_entry->IdCount - 1; + mapping->outbase = map_entry->OutputBase; + mapping->out_node_offset = map_entry->OutputReference; + mapping->flags = map_entry->Flags; + mapping->out_node = NULL; + } +} + +/* + * Allocate and copy an ITS group. + */ +static void +iort_copy_its(struct iort_node *node, ACPI_IORT_NODE *node_entry) +{ + struct iort_its_entry *its; + ACPI_IORT_ITS_GROUP *itsg_entry; + UINT32 *id; + int i; + + itsg_entry = (ACPI_IORT_ITS_GROUP *)node_entry->NodeData; + node->nentries = itsg_entry->ItsCount; + node->usecount = 0; + its = malloc(sizeof(*its) * node->nentries, M_DEVBUF, M_WAITOK | M_ZERO); + node->entries.its = its; + id = &itsg_entry->Identifiers[0]; + for (i = 0; i < node->nentries; i++, its++, id++) { + its->its_id = *id; + its->pxm = -1; + its->xref = 0; + } +} + +/* + * Walk the IORT table and add nodes to corresponding list. + */ +static void +iort_add_nodes(ACPI_IORT_NODE *node_entry, u_int node_offset) +{ + ACPI_IORT_ROOT_COMPLEX *pci_rc; + ACPI_IORT_SMMU *smmu; + ACPI_IORT_SMMU_V3 *smmu_v3; + struct iort_node *node; + + node = malloc(sizeof(*node), M_DEVBUF, M_WAITOK | M_ZERO); + node->type = node_entry->Type; + node->node_offset = node_offset; + + /* copy nodes depending on type */ + switch(node_entry->Type) { + case ACPI_IORT_NODE_PCI_ROOT_COMPLEX: + pci_rc = (ACPI_IORT_ROOT_COMPLEX *)node_entry->NodeData; + memcpy(&node->data.pci_rc, pci_rc, sizeof(*pci_rc)); + iort_copy_data(node, node_entry); + TAILQ_INSERT_TAIL(&pci_nodes, node, next); + break; + case ACPI_IORT_NODE_SMMU: + smmu = (ACPI_IORT_SMMU *)node_entry->NodeData; + memcpy(&node->data.smmu, smmu, sizeof(*smmu)); + iort_copy_data(node, node_entry); + TAILQ_INSERT_TAIL(&smmu_nodes, node, next); + break; + case ACPI_IORT_NODE_SMMU_V3: + smmu_v3 = (ACPI_IORT_SMMU_V3 *)node_entry->NodeData; + memcpy(&node->data.smmu_v3, smmu_v3, sizeof(*smmu_v3)); + iort_copy_data(node, node_entry); + TAILQ_INSERT_TAIL(&smmu_nodes, node, next); + break; + case ACPI_IORT_NODE_ITS_GROUP: + iort_copy_its(node, node_entry); + TAILQ_INSERT_TAIL(&its_groups, node, next); + break; + default: + printf("ACPI: IORT: Dropping unhandled type %u\n", + node_entry->Type); + free(node, M_DEVBUF); + break; + } +} + +/* + * For the mapping entry given, walk thru all the possible destination + * nodes and resolve the output reference. + */ +static void +iort_resolve_node(struct iort_map_entry *entry, int check_smmu) +{ + struct iort_node *node, *np; + + node = NULL; + if (check_smmu) { + TAILQ_FOREACH(np, &smmu_nodes, next) { + if (entry->out_node_offset == np->node_offset) { + node = np; + break; + } + } + } + if (node == NULL) { + TAILQ_FOREACH(np, &its_groups, next) { + if (entry->out_node_offset == np->node_offset) { + node = np; + break; + } + } + } + if (node != NULL) { + node->usecount++; + entry->out_node = node; + } else { + printf("ACPI: IORT: Firmware Bug: no mapping for node %u\n", + entry->out_node_offset); + } +} + +/* + * Resolve all output node references to node pointers. + */ +static void +iort_post_process_mappings(void) +{ + struct iort_node *node; + int i; + + TAILQ_FOREACH(node, &pci_nodes, next) + for (i = 0; i < node->nentries; i++) + iort_resolve_node(&node->entries.mappings[i], TRUE); + TAILQ_FOREACH(node, &smmu_nodes, next) + for (i = 0; i < node->nentries; i++) + iort_resolve_node(&node->entries.mappings[i], FALSE); + /* TODO: named nodes */ +} + +/* + * Walk MADT table, assign PIC xrefs to all ITS entries. + */ +static void +madt_resolve_its_xref(ACPI_SUBTABLE_HEADER *entry, void *arg) +{ + ACPI_MADT_GENERIC_TRANSLATOR *gict; + struct iort_node *its_node; + struct iort_its_entry *its_entry; + u_int xref; + int i, matches; + + if (entry->Type != ACPI_MADT_TYPE_GENERIC_TRANSLATOR) + return; + + gict = (ACPI_MADT_GENERIC_TRANSLATOR *)entry; + matches = 0; + xref = acpi_its_xref++; + TAILQ_FOREACH(its_node, &its_groups, next) { + its_entry = its_node->entries.its; + for (i = 0; i < its_node->nentries; i++, its_entry++) { + if (its_entry->its_id == gict->TranslationId) { + its_entry->xref = xref; + matches++; + } + } + } + if (matches == 0) + printf("ACPI: IORT: Unused ITS block, ID %u\n", + gict->TranslationId); +} + +/* + * Walk SRAT, assign proximity to all ITS entries. + */ +static void +srat_resolve_its_pxm(ACPI_SUBTABLE_HEADER *entry, void *arg) +{ + ACPI_SRAT_GIC_ITS_AFFINITY *gicits; + struct iort_node *its_node; + struct iort_its_entry *its_entry; + int i, matches; + + if (entry->Type != ACPI_SRAT_TYPE_GIC_ITS_AFFINITY) + return; + + matches = 0; + gicits = (ACPI_SRAT_GIC_ITS_AFFINITY *)entry; + TAILQ_FOREACH(its_node, &its_groups, next) { + its_entry = its_node->entries.its; + for (i = 0; i < its_node->nentries; i++, its_entry++) { + if (its_entry->its_id == gicits->ItsId) { + its_entry->pxm = acpi_map_pxm_to_vm_domainid( + gicits->ProximityDomain); + matches++; + } + } + } + if (matches == 0) + printf("ACPI: IORT: ITS block %u in SRAT not found in IORT!\n", + gicits->ItsId); +} + +/* + * Cross check the ITS Id with MADT and (if available) SRAT. + */ +static int +iort_post_process_its(void) +{ + ACPI_TABLE_MADT *madt; + ACPI_TABLE_SRAT *srat; + vm_paddr_t madt_pa, srat_pa; + + /* Check ITS block in MADT */ + madt_pa = acpi_find_table(ACPI_SIG_MADT); + KASSERT(madt_pa != 0, ("no MADT!")); + madt = acpi_map_table(madt_pa, ACPI_SIG_MADT); + KASSERT(madt != NULL, ("can't map MADT!")); + acpi_walk_subtables(madt + 1, (char *)madt + madt->Header.Length, + madt_resolve_its_xref, NULL); + acpi_unmap_table(madt); + + /* Get proximtiy if available */ + srat_pa = acpi_find_table(ACPI_SIG_SRAT); + if (srat_pa != 0) { + srat = acpi_map_table(srat_pa, ACPI_SIG_SRAT); + KASSERT(srat != NULL, ("can't map SRAT!")); + acpi_walk_subtables(srat + 1, (char *)srat + srat->Header.Length, + srat_resolve_its_pxm, NULL); + acpi_unmap_table(srat); + } + return (0); +} + +/* + * Find, parse, and save IO Remapping Table ("IORT"). + */ +static int +acpi_parse_iort(void *dummy __unused) +{ + ACPI_TABLE_IORT *iort; + ACPI_IORT_NODE *node_entry; + vm_paddr_t iort_pa; + u_int node_offset; + + iort_pa = acpi_find_table(ACPI_SIG_IORT); + if (iort_pa == 0) + return (ENXIO); + + iort = acpi_map_table(iort_pa, ACPI_SIG_IORT); + if (iort == NULL) { + printf("ACPI: Unable to map the IORT table!\n"); + return (ENXIO); + } + for (node_offset = iort->NodeOffset; + node_offset < iort->Header.Length; + node_offset += node_entry->Length) { + node_entry = ACPI_ADD_PTR(ACPI_IORT_NODE, iort, node_offset); + iort_add_nodes(node_entry, node_offset); + } + acpi_unmap_table(iort); + iort_post_process_mappings(); + iort_post_process_its(); + return (0); +} +SYSINIT(acpi_parse_iort, SI_SUB_DRIVERS, SI_ORDER_FIRST, acpi_parse_iort, NULL); + +/* + * Provide ITS ID to PIC xref mapping. + */ +int +acpi_iort_its_lookup(u_int its_id, u_int *xref, int *pxm) +{ + struct iort_node *its_node; + struct iort_its_entry *its_entry; + int i; + + TAILQ_FOREACH(its_node, &its_groups, next) { + its_entry = its_node->entries.its; + for (i = 0; i < its_node->nentries; i++, its_entry++) { + if (its_entry->its_id == its_id) { + *xref = its_entry->xref; + *pxm = its_entry->pxm; + return (0); + } + } + } + return (ENOENT); +} + +/* + * Find mapping for a PCIe device given segment and device ID + * returns the XREF for MSI interrupt setup and the device ID to + * use for the interrupt setup + */ +int +acpi_iort_map_pci_msi(u_int seg, u_int rid, u_int *xref, u_int *devid) +{ + struct iort_node *node; + + node = iort_pci_rc_map(seg, rid, ACPI_IORT_NODE_ITS_GROUP, devid); + if (node == NULL) + return (ENOENT); + + /* This should be an ITS node */ + KASSERT(node->type == ACPI_IORT_NODE_ITS_GROUP, ("bad group")); + + /* return first node, we don't handle more than that now. */ + *xref = node->entries.its[0].xref; + return (0); +} Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Thu Feb 7 02:17:34 2019 (r343852) +++ head/sys/conf/files.arm64 Thu Feb 7 02:30:33 2019 (r343853) @@ -98,6 +98,7 @@ arm/mv/mv_cp110_clock.c optional SOC_MARVELL_8K fdt arm/mv/mv_thermal.c optional SOC_MARVELL_8K mv_thermal fdt arm/mv/armada38x/armada38x_rtc.c optional mv_rtc fdt arm/xilinx/uart_dev_cdnc.c optional uart soc_xilinx_zynq +arm64/acpica/acpi_iort.c optional acpi arm64/acpica/acpi_machdep.c optional acpi arm64/acpica/OsdEnvironment.c optional acpi arm64/acpica/acpi_wakeup.c optional acpi Modified: head/sys/dev/acpica/acpivar.h ============================================================================== --- head/sys/dev/acpica/acpivar.h Thu Feb 7 02:17:34 2019 (r343852) +++ head/sys/dev/acpica/acpivar.h Thu Feb 7 02:30:33 2019 (r343853) @@ -544,5 +544,12 @@ int acpi_get_cpus(device_t dev, device_t child, enum size_t setsize, cpuset_t *cpuset); int acpi_get_domain(device_t dev, device_t child, int *domain); +#ifdef __aarch64__ +/* + * ARM specific ACPI interfaces, relating to IORT table. + */ +int acpi_iort_map_pci_msi(u_int seg, u_int rid, u_int *xref, u_int *devid); +int acpi_iort_its_lookup(u_int its_id, u_int *xref, int *pxm); +#endif #endif /* _KERNEL */ #endif /* !_ACPIVAR_H_ */ From owner-svn-src-head@freebsd.org Thu Feb 7 02:56:11 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 488B214BDAE9; Thu, 7 Feb 2019 02:56:11 +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 DF6DA6A84C; Thu, 7 Feb 2019 02:56: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 BA3E7EBFC; Thu, 7 Feb 2019 02:56: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 x172uAhF093940; Thu, 7 Feb 2019 02:56:10 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x172uAQH093939; Thu, 7 Feb 2019 02:56:10 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902070256.x172uAQH093939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 7 Feb 2019 02:56:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343855 - head/lib/libc/x86/sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/lib/libc/x86/sys X-SVN-Commit-Revision: 343855 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DF6DA6A84C 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.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 02:56:11 -0000 Author: kib Date: Thu Feb 7 02:56:10 2019 New Revision: 343855 URL: https://svnweb.freebsd.org/changeset/base/343855 Log: Use ifunc to select the barrier instruction for RDTSC. This optimizes out runtime switch and removes yet another cpuid from libc. Note that this is the first use of ifunc in i386 libc, so ifunc-capable toolchain is required for building runnable userspace on i386, same as on amd64. Discussed with: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libc/x86/sys/__vdso_gettc.c Modified: head/lib/libc/x86/sys/__vdso_gettc.c ============================================================================== --- head/lib/libc/x86/sys/__vdso_gettc.c Thu Feb 7 02:36:59 2019 (r343854) +++ head/lib/libc/x86/sys/__vdso_gettc.c Thu Feb 7 02:56:10 2019 (r343855) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2012 Konstantin Belousov - * Copyright (c) 2016, 2017 The FreeBSD Foundation + * Copyright (c) 2016, 2017, 2019 The FreeBSD Foundation * All rights reserved. * * Portions of this software were developed by Konstantin Belousov @@ -50,15 +50,9 @@ __FBSDID("$FreeBSD$"); #ifdef WANT_HYPERV #include #endif +#include #include "libc_private.h" -static enum LMB { - LMB_UNKNOWN, - LMB_NONE, - LMB_MFENCE, - LMB_LFENCE -} lfence_works = LMB_UNKNOWN; - static void cpuidp(u_int leaf, u_int p[4]) { @@ -84,68 +78,35 @@ cpuidp(u_int leaf, u_int p[4]) : "0" (leaf)); } -static enum LMB -select_lmb(void) +static void +rdtsc_mb_lfence(void) { - u_int p[4]; - static const char intel_id[] = "GenuntelineI"; - cpuidp(0, p); - return (memcmp(p + 1, intel_id, sizeof(intel_id) - 1) == 0 ? - LMB_LFENCE : LMB_MFENCE); + lfence(); } static void -init_fence(void) +rdtsc_mb_mfence(void) { -#if defined(__i386__) - u_int cpuid_supported, p[4]; - lfence_works = LMB_NONE; - __asm __volatile( - " pushfl\n" - " popl %%eax\n" - " movl %%eax,%%ecx\n" - " xorl $0x200000,%%eax\n" - " pushl %%eax\n" - " popfl\n" - " pushfl\n" - " popl %%eax\n" - " xorl %%eax,%%ecx\n" - " je 1f\n" - " movl $1,%0\n" - " jmp 2f\n" - "1: movl $0,%0\n" - "2:\n" - : "=r" (cpuid_supported) : : "eax", "ecx", "cc"); - if (cpuid_supported) { - cpuidp(0x1, p); - if ((p[3] & CPUID_SSE2) != 0) - lfence_works = select_lmb(); - } -#elif defined(__amd64__) - lfence_works = select_lmb(); -#else -#error "Arch" -#endif + mfence(); } static void -rdtsc_mb(void) +rdtsc_mb_none(void) { +} -again: - if (__predict_true(lfence_works == LMB_LFENCE)) { - lfence(); - return; - } else if (lfence_works == LMB_MFENCE) { - mfence(); - return; - } else if (lfence_works == LMB_NONE) { - return; - } - init_fence(); - goto again; +DEFINE_UIFUNC(static, void, rdtsc_mb, (void), static) +{ + u_int p[4]; + static const char intel_id[] = "GenuntelineI"; + + if ((cpu_feature & CPUID_SSE2) == 0) + return (rdtsc_mb_none); + cpuidp(0, p); + return (memcmp(p + 1, intel_id, sizeof(intel_id) - 1) == 0 ? + rdtsc_mb_lfence : rdtsc_mb_mfence); } static u_int From owner-svn-src-head@freebsd.org Thu Feb 7 03:02:20 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 246DA14BDFFD; Thu, 7 Feb 2019 03:02:20 +0000 (UTC) (envelope-from jchandra@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 EE8846AE45; Thu, 7 Feb 2019 03:01:54 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E4222ECE3; Thu, 7 Feb 2019 03:01:54 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1731s5B096095; Thu, 7 Feb 2019 03:01:54 GMT (envelope-from jchandra@FreeBSD.org) Received: (from jchandra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1731sBq096092; Thu, 7 Feb 2019 03:01:54 GMT (envelope-from jchandra@FreeBSD.org) Message-Id: <201902070301.x1731sBq096092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jchandra set sender to jchandra@FreeBSD.org using -f From: "Jayachandran C." Date: Thu, 7 Feb 2019 03:01:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343856 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: jchandra X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 343856 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EE8846AE45 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.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 03:02:20 -0000 Author: jchandra Date: Thu Feb 7 03:01:54 2019 New Revision: 343856 URL: https://svnweb.freebsd.org/changeset/base/343856 Log: arm64 gicv3: add IORT and NUMA support acpi_iort.c has added support to query GIC proximity and MSI XREF ID for GIC ITS blocks. Use this when GIC ITS blocks are initialized from ACPI. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D18003 Modified: head/sys/arm64/arm64/gic_v3_acpi.c head/sys/arm64/arm64/gic_v3_var.h head/sys/arm64/arm64/gicv3_its.c Modified: head/sys/arm64/arm64/gic_v3_acpi.c ============================================================================== --- head/sys/arm64/arm64/gic_v3_acpi.c Thu Feb 7 02:56:10 2019 (r343855) +++ head/sys/arm64/arm64/gic_v3_acpi.c Thu Feb 7 03:01:54 2019 (r343856) @@ -305,6 +305,8 @@ gic_v3_add_children(ACPI_SUBTABLE_HEADER *entry, void struct gic_v3_acpi_devinfo *di; struct gic_v3_softc *sc; device_t child, dev; + u_int xref; + int err, pxm; if (entry->Type == ACPI_MADT_TYPE_GENERIC_TRANSLATOR) { /* We have an ITS, add it as a child */ @@ -321,7 +323,14 @@ gic_v3_add_children(ACPI_SUBTABLE_HEADER *entry, void resource_list_add(&di->di_rl, SYS_RES_MEMORY, 0, gict->BaseAddress, gict->BaseAddress + 128 * 1024 - 1, 128 * 1024); - di->di_gic_dinfo.gic_domain = -1; + err = acpi_iort_its_lookup(gict->TranslationId, &xref, &pxm); + if (err == 0) { + di->di_gic_dinfo.gic_domain = pxm; + di->di_gic_dinfo.msi_xref = xref; + } else { + di->di_gic_dinfo.gic_domain = -1; + di->di_gic_dinfo.msi_xref = ACPI_MSI_XREF; + } sc->gic_nchildren++; device_set_ivars(child, di); } Modified: head/sys/arm64/arm64/gic_v3_var.h ============================================================================== --- head/sys/arm64/arm64/gic_v3_var.h Thu Feb 7 02:56:10 2019 (r343855) +++ head/sys/arm64/arm64/gic_v3_var.h Thu Feb 7 03:01:54 2019 (r343856) @@ -87,6 +87,7 @@ struct gic_v3_softc { struct gic_v3_devinfo { int gic_domain; + int msi_xref; }; #define GIC_INTR_ISRC(sc, irq) (&sc->gic_irqs[irq].gi_isrc) Modified: head/sys/arm64/arm64/gicv3_its.c ============================================================================== --- head/sys/arm64/arm64/gicv3_its.c Thu Feb 7 02:56:10 2019 (r343855) +++ head/sys/arm64/arm64/gicv3_its.c Thu Feb 7 03:01:54 2019 (r343856) @@ -1722,6 +1722,7 @@ static int gicv3_its_acpi_attach(device_t dev) { struct gicv3_its_softc *sc; + struct gic_v3_devinfo *di; int err; sc = device_get_softc(dev); @@ -1729,13 +1730,13 @@ gicv3_its_acpi_attach(device_t dev) if (err != 0) return (err); - sc->sc_pic = intr_pic_register(dev, - device_get_unit(dev) + ACPI_MSI_XREF); + di = device_get_ivars(dev); + sc->sc_pic = intr_pic_register(dev, di->msi_xref); intr_pic_add_handler(device_get_parent(dev), sc->sc_pic, gicv3_its_intr, sc, sc->sc_irq_base, sc->sc_irq_length); /* Register this device to handle MSI interrupts */ - intr_msi_register(dev, device_get_unit(dev) + ACPI_MSI_XREF); + intr_msi_register(dev, di->msi_xref); return (0); } From owner-svn-src-head@freebsd.org Thu Feb 7 03:32:46 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B882E14BF07B; Thu, 7 Feb 2019 03:32:46 +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 59DDD6C1A9; Thu, 7 Feb 2019 03:32:46 +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 4D540F39C; Thu, 7 Feb 2019 03:32:46 +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 x173WkTD015585; Thu, 7 Feb 2019 03:32:46 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x173WkxK015584; Thu, 7 Feb 2019 03:32:46 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201902070332.x173WkxK015584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 7 Feb 2019 03:32:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343857 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 343857 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 59DDD6C1A9 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.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 03:32:47 -0000 Author: glebius Date: Thu Feb 7 03:32:45 2019 New Revision: 343857 URL: https://svnweb.freebsd.org/changeset/base/343857 Log: Report cache zones in UMA stats sysctl, that 'vmstat -z' uses. This should had been part of r251826. Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Thu Feb 7 03:01:54 2019 (r343856) +++ head/sys/vm/uma_core.c Thu Feb 7 03:32:45 2019 (r343857) @@ -3874,19 +3874,61 @@ sysctl_vm_zone_count(SYSCTL_HANDLER_ARGS) LIST_FOREACH(z, &kz->uk_zones, uz_link) count++; } + LIST_FOREACH(z, &uma_cachezones, uz_link) + count++; + rw_runlock(&uma_rwlock); return (sysctl_handle_int(oidp, &count, 0, req)); } +static void +uma_vm_zone_stats(struct uma_type_header *uth, uma_zone_t z, struct sbuf *sbuf, + struct uma_percpu_stat *ups, bool internal) +{ + uma_zone_domain_t zdom; + uma_cache_t cache; + int i; + + + for (i = 0; i < vm_ndomains; i++) { + zdom = &z->uz_domain[i]; + uth->uth_zone_free += zdom->uzd_nitems; + } + uth->uth_allocs = counter_u64_fetch(z->uz_allocs); + uth->uth_frees = counter_u64_fetch(z->uz_frees); + uth->uth_fails = counter_u64_fetch(z->uz_fails); + uth->uth_sleeps = z->uz_sleeps; + /* + * While it is not normally safe to access the cache + * bucket pointers while not on the CPU that owns the + * cache, we only allow the pointers to be exchanged + * without the zone lock held, not invalidated, so + * accept the possible race associated with bucket + * exchange during monitoring. + */ + for (i = 0; i < mp_maxid + 1; i++) { + bzero(&ups[i], sizeof(*ups)); + if (internal || CPU_ABSENT(i)) + continue; + cache = &z->uz_cpu[i]; + if (cache->uc_allocbucket != NULL) + ups[i].ups_cache_free += + cache->uc_allocbucket->ub_cnt; + if (cache->uc_freebucket != NULL) + ups[i].ups_cache_free += + cache->uc_freebucket->ub_cnt; + ups[i].ups_allocs = cache->uc_allocs; + ups[i].ups_frees = cache->uc_frees; + } +} + static int sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS) { struct uma_stream_header ush; struct uma_type_header uth; struct uma_percpu_stat *ups; - uma_zone_domain_t zdom; struct sbuf sbuf; - uma_cache_t cache; uma_keg_t kz; uma_zone_t z; int count, error, i; @@ -3905,6 +3947,9 @@ sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS) count++; } + LIST_FOREACH(z, &uma_cachezones, uz_link) + count++; + /* * Insert stream header. */ @@ -3939,44 +3984,26 @@ sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS) if ((z->uz_flags & UMA_ZONE_SECONDARY) && (LIST_FIRST(&kz->uk_zones) != z)) uth.uth_zone_flags = UTH_ZONE_SECONDARY; - - for (i = 0; i < vm_ndomains; i++) { - zdom = &z->uz_domain[i]; - uth.uth_zone_free += zdom->uzd_nitems; - } - uth.uth_allocs = counter_u64_fetch(z->uz_allocs); - uth.uth_frees = counter_u64_fetch(z->uz_frees); - uth.uth_fails = counter_u64_fetch(z->uz_fails); - uth.uth_sleeps = z->uz_sleeps; - /* - * While it is not normally safe to access the cache - * bucket pointers while not on the CPU that owns the - * cache, we only allow the pointers to be exchanged - * without the zone lock held, not invalidated, so - * accept the possible race associated with bucket - * exchange during monitoring. - */ - for (i = 0; i < mp_maxid + 1; i++) { - bzero(&ups[i], sizeof(*ups)); - if (kz->uk_flags & UMA_ZFLAG_INTERNAL || - CPU_ABSENT(i)) - continue; - cache = &z->uz_cpu[i]; - if (cache->uc_allocbucket != NULL) - ups[i].ups_cache_free += - cache->uc_allocbucket->ub_cnt; - if (cache->uc_freebucket != NULL) - ups[i].ups_cache_free += - cache->uc_freebucket->ub_cnt; - ups[i].ups_allocs = cache->uc_allocs; - ups[i].ups_frees = cache->uc_frees; - } + uma_vm_zone_stats(&uth, z, &sbuf, ups, + kz->uk_flags & UMA_ZFLAG_INTERNAL); ZONE_UNLOCK(z); (void)sbuf_bcat(&sbuf, &uth, sizeof(uth)); for (i = 0; i < mp_maxid + 1; i++) (void)sbuf_bcat(&sbuf, &ups[i], sizeof(ups[i])); } } + LIST_FOREACH(z, &uma_cachezones, uz_link) { + bzero(&uth, sizeof(uth)); + ZONE_LOCK(z); + strlcpy(uth.uth_name, z->uz_name, UTH_MAX_NAME); + uth.uth_size = z->uz_size; + uma_vm_zone_stats(&uth, z, &sbuf, ups, false); + ZONE_UNLOCK(z); + (void)sbuf_bcat(&sbuf, &uth, sizeof(uth)); + for (i = 0; i < mp_maxid + 1; i++) + (void)sbuf_bcat(&sbuf, &ups[i], sizeof(ups[i])); + } + rw_runlock(&uma_rwlock); error = sbuf_finish(&sbuf); sbuf_delete(&sbuf); From owner-svn-src-head@freebsd.org Thu Feb 7 03:55:06 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FAFB14BFF8A; Thu, 7 Feb 2019 03:55: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 D8CE16CEFF; Thu, 7 Feb 2019 03:55: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 CE7DCF725; Thu, 7 Feb 2019 03:55: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 x173t5i8026469; Thu, 7 Feb 2019 03:55:05 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x173t5AN026467; Thu, 7 Feb 2019 03:55:05 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201902070355.x173t5AN026467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 7 Feb 2019 03:55:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343858 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 343858 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D8CE16CEFF 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.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 03:55:06 -0000 Author: glebius Date: Thu Feb 7 03:55:05 2019 New Revision: 343858 URL: https://svnweb.freebsd.org/changeset/base/343858 Log: Now that there is only one way to allocate a slab, remove uz_slab method. Discussed with: jeff Modified: head/sys/vm/uma_core.c head/sys/vm/uma_int.h Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Thu Feb 7 03:32:45 2019 (r343857) +++ head/sys/vm/uma_core.c Thu Feb 7 03:55:05 2019 (r343858) @@ -1746,7 +1746,6 @@ zone_ctor(void *mem, int size, void *udata, int flags) zone->uz_name = arg->name; zone->uz_ctor = arg->ctor; zone->uz_dtor = arg->dtor; - zone->uz_slab = zone_fetch_slab; zone->uz_init = NULL; zone->uz_fini = NULL; zone->uz_sleeps = 0; @@ -2797,7 +2796,7 @@ zone_import(uma_zone_t zone, void **bucket, int max, i keg = NULL; /* Try to keep the buckets totally full */ for (i = 0; i < max; ) { - if ((slab = zone->uz_slab(zone, keg, domain, flags)) == NULL) + if ((slab = zone_fetch_slab(zone, keg, domain, flags)) == NULL) break; keg = slab->us_keg; #ifdef NUMA Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Thu Feb 7 03:32:45 2019 (r343857) +++ head/sys/vm/uma_int.h Thu Feb 7 03:55:05 2019 (r343858) @@ -304,7 +304,6 @@ struct uma_slab { #endif typedef struct uma_slab * uma_slab_t; -typedef uma_slab_t (*uma_slaballoc)(uma_zone_t, uma_keg_t, int, int); struct uma_zone_domain { LIST_HEAD(,uma_bucket) uzd_buckets; /* full buckets */ @@ -345,7 +344,7 @@ struct uma_zone { void *uz_arg; /* Import/release argument. */ uma_init uz_init; /* Initializer for each item */ uma_fini uz_fini; /* Finalizer for each item. */ - uma_slaballoc uz_slab; /* Allocate a slab from the backend. */ + void *uz_spare; uint64_t uz_bkt_count; /* Items in bucket cache */ uint64_t uz_bkt_max; /* Maximum bucket cache size */ From owner-svn-src-head@freebsd.org Thu Feb 7 03:58:30 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2254614C20D4; Thu, 7 Feb 2019 03:58:30 +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 B71AD6D0FD; Thu, 7 Feb 2019 03:58: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 A62CEF72D; Thu, 7 Feb 2019 03:58: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 x173wT62026634; Thu, 7 Feb 2019 03:58:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x173wTj7026633; Thu, 7 Feb 2019 03:58:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902070358.x173wTj7026633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 7 Feb 2019 03:58:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343859 - head/lib/libc/x86/sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/lib/libc/x86/sys X-SVN-Commit-Revision: 343859 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B71AD6D0FD 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.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 03:58:30 -0000 Author: kib Date: Thu Feb 7 03:58:29 2019 New Revision: 343859 URL: https://svnweb.freebsd.org/changeset/base/343859 Log: Add comment noting that the strange spelling of GenuineIntel is for reason. Requested by: rpokala Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libc/x86/sys/__vdso_gettc.c Modified: head/lib/libc/x86/sys/__vdso_gettc.c ============================================================================== --- head/lib/libc/x86/sys/__vdso_gettc.c Thu Feb 7 03:55:05 2019 (r343858) +++ head/lib/libc/x86/sys/__vdso_gettc.c Thu Feb 7 03:58:29 2019 (r343859) @@ -100,6 +100,7 @@ rdtsc_mb_none(void) DEFINE_UIFUNC(static, void, rdtsc_mb, (void), static) { u_int p[4]; + /* Not a typo, string matches our cpuidp() registers use. */ static const char intel_id[] = "GenuntelineI"; if ((cpu_feature & CPUID_SSE2) == 0) From owner-svn-src-head@freebsd.org Thu Feb 7 04:50:17 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8224714C408F; Thu, 7 Feb 2019 04:50:17 +0000 (UTC) (envelope-from jchandra@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 254E56E923; Thu, 7 Feb 2019 04:50:17 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 188D4FFFD; Thu, 7 Feb 2019 04:50:17 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x174oGAX052245; Thu, 7 Feb 2019 04:50:16 GMT (envelope-from jchandra@FreeBSD.org) Received: (from jchandra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x174oGHj052244; Thu, 7 Feb 2019 04:50:16 GMT (envelope-from jchandra@FreeBSD.org) Message-Id: <201902070450.x174oGHj052244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jchandra set sender to jchandra@FreeBSD.org using -f From: "Jayachandran C." Date: Thu, 7 Feb 2019 04:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343860 - head/sys/dev/pci X-SVN-Group: head X-SVN-Commit-Author: jchandra X-SVN-Commit-Paths: head/sys/dev/pci X-SVN-Commit-Revision: 343860 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 254E56E923 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 04:50:17 -0000 Author: jchandra Date: Thu Feb 7 04:50:16 2019 New Revision: 343860 URL: https://svnweb.freebsd.org/changeset/base/343860 Log: pci_host_generic_acpi: use IORT data for MSI/MSI-X Use the information from IORT parsing to translate the PCI RID to GIC ITS device ID. And similarly, use the information to find the PIC XREF identifier to be used for PCI devices. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D18004 Modified: head/sys/dev/pci/pci_host_generic_acpi.c Modified: head/sys/dev/pci/pci_host_generic_acpi.c ============================================================================== --- head/sys/dev/pci/pci_host_generic_acpi.c Thu Feb 7 03:58:29 2019 (r343859) +++ head/sys/dev/pci/pci_host_generic_acpi.c Thu Feb 7 04:50:16 2019 (r343860) @@ -348,14 +348,52 @@ generic_pcie_acpi_route_interrupt(device_t bus, device return (acpi_pcib_route_interrupt(bus, dev, pin, &sc->ap_prt)); } +static u_int +generic_pcie_get_xref(device_t pci, device_t child) +{ + struct generic_pcie_acpi_softc *sc; + uintptr_t rid; + u_int xref, devid; + int err; + + sc = device_get_softc(pci); + err = pcib_get_id(pci, child, PCI_ID_RID, &rid); + if (err != 0) + return (ACPI_MSI_XREF); + err = acpi_iort_map_pci_msi(sc->base.ecam, rid, &xref, &devid); + if (err != 0) + return (ACPI_MSI_XREF); + return (xref); +} + +static u_int +generic_pcie_map_id(device_t pci, device_t child, uintptr_t *id) +{ + struct generic_pcie_acpi_softc *sc; + uintptr_t rid; + u_int xref, devid; + int err; + + sc = device_get_softc(pci); + err = pcib_get_id(pci, child, PCI_ID_RID, &rid); + if (err != 0) + return (err); + err = acpi_iort_map_pci_msi(sc->base.ecam, rid, &xref, &devid); + if (err == 0) + *id = devid; + else + *id = rid; /* RID not in IORT, likely FW bug, ignore */ + return (0); +} + static int generic_pcie_acpi_alloc_msi(device_t pci, device_t child, int count, int maxcount, int *irqs) { #if defined(INTRNG) - return (intr_alloc_msi(pci, child, ACPI_MSI_XREF, count, maxcount, - irqs)); + return (intr_alloc_msi(pci, child, generic_pcie_get_xref(pci, child), + count, maxcount, irqs)); #else return (ENXIO); #endif @@ -367,7 +405,8 @@ generic_pcie_acpi_release_msi(device_t pci, device_t c { #if defined(INTRNG) - return (intr_release_msi(pci, child, ACPI_MSI_XREF, count, irqs)); + return (intr_release_msi(pci, child, generic_pcie_get_xref(pci, child), + count, irqs)); #else return (ENXIO); #endif @@ -379,7 +418,8 @@ generic_pcie_acpi_map_msi(device_t pci, device_t child { #if defined(INTRNG) - return (intr_map_msi(pci, child, ACPI_MSI_XREF, irq, addr, data)); + return (intr_map_msi(pci, child, generic_pcie_get_xref(pci, child), irq, + addr, data)); #else return (ENXIO); #endif @@ -390,7 +430,8 @@ generic_pcie_acpi_alloc_msix(device_t pci, device_t ch { #if defined(INTRNG) - return (intr_alloc_msix(pci, child, ACPI_MSI_XREF, irq)); + return (intr_alloc_msix(pci, child, generic_pcie_get_xref(pci, child), + irq)); #else return (ENXIO); #endif @@ -401,7 +442,8 @@ generic_pcie_acpi_release_msix(device_t pci, device_t { #if defined(INTRNG) - return (intr_release_msix(pci, child, ACPI_MSI_XREF, irq)); + return (intr_release_msix(pci, child, generic_pcie_get_xref(pci, child), + irq)); #else return (ENXIO); #endif @@ -412,14 +454,8 @@ generic_pcie_acpi_get_id(device_t pci, device_t child, uintptr_t *id) { - /* - * Use the PCI RID to find the MSI ID for now, we support only 1:1 - * mapping - * - * On aarch64, more complex mapping would come from IORT table - */ if (type == PCI_ID_MSI) - return (pcib_get_id(pci, child, PCI_ID_RID, id)); + return (generic_pcie_map_id(pci, child, id)); else return (pcib_get_id(pci, child, type, id)); } From owner-svn-src-head@freebsd.org Thu Feb 7 05:06:31 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDE4414C4A40; Thu, 7 Feb 2019 05:06:30 +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 7EABF6F24A; Thu, 7 Feb 2019 05:06:30 +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 3CF9418364; Thu, 7 Feb 2019 05:06:30 +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 x1756UHS062757; Thu, 7 Feb 2019 05:06:30 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1756TaL062754; Thu, 7 Feb 2019 05:06:29 GMT (envelope-from np@FreeBSD.org) Message-Id: <201902070506.x1756TaL062754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 7 Feb 2019 05:06:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343861 - in head/sys/dev/cxgbe: . common X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: in head/sys/dev/cxgbe: . common X-SVN-Commit-Revision: 343861 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7EABF6F24A 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.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 05:06:31 -0000 Author: np Date: Thu Feb 7 05:06:29 2019 New Revision: 343861 URL: https://svnweb.freebsd.org/changeset/base/343861 Log: cxgbe(4): Auto-dump the device log on a mailbox timeout or when the firmware reports an error in pcie_fw. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/common/t4_hw.c head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Thu Feb 7 04:50:16 2019 (r343860) +++ head/sys/dev/cxgbe/adapter.h Thu Feb 7 05:06:29 2019 (r343861) @@ -1164,6 +1164,7 @@ void free_atid(struct adapter *, int); void release_tid(struct adapter *, int, struct sge_wrq *); int cxgbe_media_change(struct ifnet *); void cxgbe_media_status(struct ifnet *, struct ifmediareq *); +void t4_os_dump_devlog(struct adapter *); #ifdef DEV_NETMAP /* t4_netmap.c */ Modified: head/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- head/sys/dev/cxgbe/common/t4_hw.c Thu Feb 7 04:50:16 2019 (r343860) +++ head/sys/dev/cxgbe/common/t4_hw.c Thu Feb 7 05:06:29 2019 (r343861) @@ -212,9 +212,11 @@ static void t4_report_fw_error(struct adapter *adap) pcie_fw = t4_read_reg(adap, A_PCIE_FW); if (pcie_fw & F_PCIE_FW_ERR) { + adap->flags &= ~FW_OK; CH_ERR(adap, "firmware reports adapter error: %s (0x%08x)\n", reason[G_PCIE_FW_EVAL(pcie_fw)], pcie_fw); - adap->flags &= ~FW_OK; + if (pcie_fw != 0xffffffff) + t4_os_dump_devlog(adap); } } @@ -488,13 +490,19 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int * the error and also check to see if the firmware reported any * errors ... */ - ret = (pcie_fw & F_PCIE_FW_ERR) ? -ENXIO : -ETIMEDOUT; CH_ERR(adap, "command %#x in mbox %d timed out (0x%08x).\n", *(const u8 *)cmd, mbox, pcie_fw); CH_DUMP_MBOX(adap, mbox, 0, "cmdsent", cmd_rpl, true); CH_DUMP_MBOX(adap, mbox, data_reg, "current", NULL, true); - t4_report_fw_error(adap); + if (pcie_fw & F_PCIE_FW_ERR) { + ret = -ENXIO; + t4_report_fw_error(adap); + } else { + ret = -ETIMEDOUT; + t4_os_dump_devlog(adap); + } + t4_fatal_err(adap, true); return ret; } Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Feb 7 04:50:16 2019 (r343860) +++ head/sys/dev/cxgbe/t4_main.c Thu Feb 7 05:06:29 2019 (r343861) @@ -7625,19 +7625,18 @@ static const char * const devlog_facility_strings[] = }; static int -sysctl_devlog(SYSCTL_HANDLER_ARGS) +sbuf_devlog(struct adapter *sc, struct sbuf *sb, int flags) { - struct adapter *sc = arg1; + int i, j, rc, nentries, first = 0; struct devlog_params *dparams = &sc->params.devlog; struct fw_devlog_e *buf, *e; - int i, j, rc, nentries, first = 0; - struct sbuf *sb; uint64_t ftstamp = UINT64_MAX; if (dparams->addr == 0) return (ENXIO); - buf = malloc(dparams->size, M_CXGBE, M_NOWAIT); + MPASS(flags == M_WAITOK || flags == M_NOWAIT); + buf = malloc(dparams->size, M_CXGBE, M_ZERO | flags); if (buf == NULL) return (ENOMEM); @@ -7666,15 +7665,6 @@ sysctl_devlog(SYSCTL_HANDLER_ARGS) if (buf[first].timestamp == 0) goto done; /* nothing in the log */ - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - goto done; - - sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); - if (sb == NULL) { - rc = ENOMEM; - goto done; - } sbuf_printf(sb, "%10s %15s %8s %8s %s\n", "Seq#", "Tstamp", "Level", "Facility", "Message"); @@ -7697,12 +7687,49 @@ sysctl_devlog(SYSCTL_HANDLER_ARGS) if (++i == nentries) i = 0; } while (i != first); - - rc = sbuf_finish(sb); - sbuf_delete(sb); done: free(buf, M_CXGBE); return (rc); +} + +static int +sysctl_devlog(SYSCTL_HANDLER_ARGS) +{ + struct adapter *sc = arg1; + int rc; + struct sbuf *sb; + + rc = sysctl_wire_old_buffer(req, 0); + if (rc != 0) + return (rc); + sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); + if (sb == NULL) + return (ENOMEM); + + rc = sbuf_devlog(sc, sb, M_WAITOK); + if (rc == 0) + rc = sbuf_finish(sb); + sbuf_delete(sb); + return (rc); +} + +void +t4_os_dump_devlog(struct adapter *sc) +{ + int rc; + struct sbuf sb; + + if (sbuf_new(&sb, NULL, 4096, SBUF_AUTOEXTEND) != &sb) + return; + rc = sbuf_devlog(sc, &sb, M_NOWAIT); + if (rc == 0) { + rc = sbuf_finish(&sb); + if (rc == 0) { + log(LOG_DEBUG, "%s: device log follows.\n%s", + device_get_nameunit(sc->dev), sbuf_data(&sb)); + } + } + sbuf_delete(&sb); } static int From owner-svn-src-head@freebsd.org Thu Feb 7 05:40:53 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 409DC14C5AEA; Thu, 7 Feb 2019 05:40:53 +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 D3EE2700C0; Thu, 7 Feb 2019 05:40:52 +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 C87C1188AA; Thu, 7 Feb 2019 05:40:52 +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 x175eqsE079475; Thu, 7 Feb 2019 05:40:52 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x175eqLR079473; Thu, 7 Feb 2019 05:40:52 GMT (envelope-from np@FreeBSD.org) Message-Id: <201902070540.x175eqLR079473@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 7 Feb 2019 05:40:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343862 - in head/sys/dev/cxgbe: . common X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: in head/sys/dev/cxgbe: . common X-SVN-Commit-Revision: 343862 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D3EE2700C0 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 05:40:53 -0000 Author: np Date: Thu Feb 7 05:40:51 2019 New Revision: 343862 URL: https://svnweb.freebsd.org/changeset/base/343862 Log: cxgbe(4): Auto-dump the CIM block's logic analyzer on a TIMER0 interrupt. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/common/t4_hw.c head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Thu Feb 7 05:06:29 2019 (r343861) +++ head/sys/dev/cxgbe/adapter.h Thu Feb 7 05:40:51 2019 (r343862) @@ -1164,6 +1164,7 @@ void free_atid(struct adapter *, int); void release_tid(struct adapter *, int, struct sge_wrq *); int cxgbe_media_change(struct ifnet *); void cxgbe_media_status(struct ifnet *, struct ifmediareq *); +bool t4_os_dump_cimla(struct adapter *, int, bool); void t4_os_dump_devlog(struct adapter *); #ifdef DEV_NETMAP Modified: head/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- head/sys/dev/cxgbe/common/t4_hw.c Thu Feb 7 05:06:29 2019 (r343861) +++ head/sys/dev/cxgbe/common/t4_hw.c Thu Feb 7 05:40:51 2019 (r343862) @@ -4356,6 +4356,10 @@ static bool sge_intr_handler(struct adapter *adap, int */ static bool cim_intr_handler(struct adapter *adap, int arg, bool verbose) { + static const struct intr_action cim_host_intr_actions[] = { + { F_TIMER0INT, 0, t4_os_dump_cimla }, + { 0 }, + }; static const struct intr_details cim_host_intr_details[] = { /* T6+ */ { F_PCIE2CIMINTFPARERR, "CIM IBQ PCIe interface parity error" }, @@ -4400,7 +4404,7 @@ static bool cim_intr_handler(struct adapter *adap, int .enable_reg = A_CIM_HOST_INT_ENABLE, .fatal = 0, .details = cim_host_intr_details, - .actions = NULL, + .actions = cim_host_intr_actions, }; static const struct intr_details cim_host_upacc_intr_details[] = { { F_EEPROMWRINT, "CIM EEPROM came out of busy state" }, Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Feb 7 05:06:29 2019 (r343861) +++ head/sys/dev/cxgbe/t4_main.c Thu Feb 7 05:40:51 2019 (r343862) @@ -648,7 +648,6 @@ static int sysctl_loadavg(SYSCTL_HANDLER_ARGS); static int sysctl_cctrl(SYSCTL_HANDLER_ARGS); static int sysctl_cim_ibq_obq(SYSCTL_HANDLER_ARGS); static int sysctl_cim_la(SYSCTL_HANDLER_ARGS); -static int sysctl_cim_la_t6(SYSCTL_HANDLER_ARGS); static int sysctl_cim_ma_la(SYSCTL_HANDLER_ARGS); static int sysctl_cim_pif_la(SYSCTL_HANDLER_ARGS); static int sysctl_cim_qcfg(SYSCTL_HANDLER_ARGS); @@ -6026,8 +6025,7 @@ t4_sysctls(struct adapter *sc) sysctl_cim_ibq_obq, "A", "CIM IBQ 5 (NCSI)"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_la", - CTLTYPE_STRING | CTLFLAG_RD, sc, 0, - chip_id(sc) <= CHELSIO_T5 ? sysctl_cim_la : sysctl_cim_la_t6, + CTLTYPE_STRING | CTLFLAG_RD, sc, 0, sysctl_cim_la, "A", "CIM logic analyzer"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_ma_la", @@ -7249,36 +7247,11 @@ done: return (rc); } -static int -sysctl_cim_la(SYSCTL_HANDLER_ARGS) +static void +sbuf_cim_la4(struct adapter *sc, struct sbuf *sb, uint32_t *buf, uint32_t cfg) { - struct adapter *sc = arg1; - u_int cfg; - struct sbuf *sb; - uint32_t *buf, *p; - int rc; + uint32_t *p; - MPASS(chip_id(sc) <= CHELSIO_T5); - - rc = -t4_cim_read(sc, A_UP_UP_DBG_LA_CFG, 1, &cfg); - if (rc != 0) - return (rc); - - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - - sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); - if (sb == NULL) - return (ENOMEM); - - buf = malloc(sc->params.cim_la_size * sizeof(uint32_t), M_CXGBE, - M_ZERO | M_WAITOK); - - rc = -t4_cim_read_la(sc, buf, NULL); - if (rc != 0) - goto done; - sbuf_printf(sb, "Status Data PC%s", cfg & F_UPDBGLACAPTPCONLY ? "" : " LS0Stat LS0Addr LS0Data"); @@ -7302,44 +7275,13 @@ sysctl_cim_la(SYSCTL_HANDLER_ARGS) p[6], p[7]); } } - - rc = sbuf_finish(sb); - sbuf_delete(sb); -done: - free(buf, M_CXGBE); - return (rc); } -static int -sysctl_cim_la_t6(SYSCTL_HANDLER_ARGS) +static void +sbuf_cim_la6(struct adapter *sc, struct sbuf *sb, uint32_t *buf, uint32_t cfg) { - struct adapter *sc = arg1; - u_int cfg; - struct sbuf *sb; - uint32_t *buf, *p; - int rc; + uint32_t *p; - MPASS(chip_id(sc) > CHELSIO_T5); - - rc = -t4_cim_read(sc, A_UP_UP_DBG_LA_CFG, 1, &cfg); - if (rc != 0) - return (rc); - - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - - sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); - if (sb == NULL) - return (ENOMEM); - - buf = malloc(sc->params.cim_la_size * sizeof(uint32_t), M_CXGBE, - M_ZERO | M_WAITOK); - - rc = -t4_cim_read_la(sc, buf, NULL); - if (rc != 0) - goto done; - sbuf_printf(sb, "Status Inst Data PC%s", cfg & F_UPDBGLACAPTPCONLY ? "" : " LS0Stat LS0Addr LS0Data LS1Stat LS1Addr LS1Data"); @@ -7365,12 +7307,76 @@ sysctl_cim_la_t6(SYSCTL_HANDLER_ARGS) p[2], p[1], p[0], p[5], p[4], p[3]); } } +} - rc = sbuf_finish(sb); - sbuf_delete(sb); +static int +sbuf_cim_la(struct adapter *sc, struct sbuf *sb, int flags) +{ + uint32_t cfg, *buf; + int rc; + + rc = -t4_cim_read(sc, A_UP_UP_DBG_LA_CFG, 1, &cfg); + if (rc != 0) + return (rc); + + MPASS(flags == M_WAITOK || flags == M_NOWAIT); + buf = malloc(sc->params.cim_la_size * sizeof(uint32_t), M_CXGBE, + M_ZERO | flags); + if (buf == NULL) + return (ENOMEM); + + rc = -t4_cim_read_la(sc, buf, NULL); + if (rc != 0) + goto done; + if (chip_id(sc) < CHELSIO_T6) + sbuf_cim_la4(sc, sb, buf, cfg); + else + sbuf_cim_la6(sc, sb, buf, cfg); + done: free(buf, M_CXGBE); return (rc); +} + +static int +sysctl_cim_la(SYSCTL_HANDLER_ARGS) +{ + struct adapter *sc = arg1; + struct sbuf *sb; + int rc; + + rc = sysctl_wire_old_buffer(req, 0); + if (rc != 0) + return (rc); + sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); + if (sb == NULL) + return (ENOMEM); + + rc = sbuf_cim_la(sc, sb, M_WAITOK); + if (rc == 0) + rc = sbuf_finish(sb); + sbuf_delete(sb); + return (rc); +} + +bool +t4_os_dump_cimla(struct adapter *sc, int arg, bool verbose) +{ + struct sbuf sb; + int rc; + + if (sbuf_new(&sb, NULL, 4096, SBUF_AUTOEXTEND) != &sb) + return (false); + rc = sbuf_cim_la(sc, &sb, M_NOWAIT); + if (rc == 0) { + rc = sbuf_finish(&sb); + if (rc == 0) { + log(LOG_DEBUG, "%s: CIM LA dump follows.\n%s", + device_get_nameunit(sc->dev), sbuf_data(&sb)); + } + } + sbuf_delete(&sb); + return (false); } static int From owner-svn-src-head@freebsd.org Thu Feb 7 10:45:20 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 014EF14D3CE5; Thu, 7 Feb 2019 10:45:20 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "alchemy.franken.de", Issuer "alchemy.franken.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DAB9782BDC; Thu, 7 Feb 2019 10:45:17 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.15.2/8.15.2/ALCHEMY.FRANKEN.DE) with ESMTPS id x17AjFcL000403 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 7 Feb 2019 11:45:15 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.15.2/8.15.2/Submit) id x17AjF8m000402; Thu, 7 Feb 2019 11:45:15 +0100 (CET) (envelope-from marius) Date: Thu, 7 Feb 2019 11:45:15 +0100 From: Marius Strobl To: Vincenzo Maffione Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343772 - head/sys/dev/netmap Message-ID: <20190207104515.GA92760@alchemy.franken.de> References: <201902051210.x15CAnPq052340@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201902051210.x15CAnPq052340@repo.freebsd.org> User-Agent: Mutt/1.9.2 (2017-12-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (alchemy.franken.de [0.0.0.0]); Thu, 07 Feb 2019 11:45:15 +0100 (CET) X-Rspamd-Queue-Id: DAB9782BDC X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-3.57 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; 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]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; AUTH_NA(1.00)[]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.85)[ip: (-6.33), ipnet: 194.94.0.0/15(-2.86), asn: 680(-0.07), country: DE(-0.01)]; MX_GOOD(-0.01)[alchemy.franken.de,hub-r.franken.de,rachael.franken.de]; NEURAL_HAM_SHORT(-0.91)[-0.909,0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[marius@freebsd.org,marius@alchemy.franken.de]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:680, ipnet:194.94.0.0/15, country:DE]; FROM_NEQ_ENVFROM(0.00)[marius@freebsd.org,marius@alchemy.franken.de] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 10:45:20 -0000 On Tue, Feb 05, 2019 at 12:10:49PM +0000, Vincenzo Maffione wrote: > Author: vmaffione > Date: Tue Feb 5 12:10:48 2019 > New Revision: 343772 > URL: https://svnweb.freebsd.org/changeset/base/343772 > > Log: > netmap: refactor logging macros and pipes > > Changelist: > - Replace ND, D and RD macros with nm_prdis, nm_prinf, nm_prerr > and nm_prlim, to avoid possible naming conflicts. > - Add netmap_krings_mode_commit() helper function and use that > to reduce code duplication. > - Refactor pipes control code to export some functions that > can be reused by the veth driver (on Linux) and epair(4). > - Add check to reject API requests with version less than 11. > - Small code refactoring for the null adapter. Hello Vincenzo, this change causes interface attachment output to look somewhat deformed ("000.000395 [3717] netmap_attach_ext" debug info and an extra newline): em0: port 0xe000-0xe01f mem 0xf7d00000-0xf7d1ffff,0xf7d20000-0xf7d23fff irq 17 at device 0.0 on pci3 em0: Using 1024 TX descriptors and 1024 RX descriptors em0: Using 2 RX queues 2 TX queues em0: Using MSI-X interrupts with 3 vectors em0: Ethernet address: 60:a4:4c:24:0b:4c 000.000395 [3717] netmap_attach_ext em0: netmap queues/slots: TX 2/1024, RX 2/1024 pcib5: irq 19 at device 28.7 on pci0 Could we please get this part back to match the pre-r343772 output again? Marius From owner-svn-src-head@freebsd.org Thu Feb 7 10:54:46 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB5D514D45CF; Thu, 7 Feb 2019 10:54:45 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 68E948344A; Thu, 7 Feb 2019 10:54:45 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: by mail-qt1-x82d.google.com with SMTP id 2so11374359qtb.5; Thu, 07 Feb 2019 02:54:45 -0800 (PST) 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=g3eyAm6PmZjFjJWFseFsfL+5wz92zr5K61TtkPzCWA4=; b=HFFEj6PyPIH8zn2pSNe/063x4k1GkETTUK5vSZBQCbIUwx1psvgFsc/DGsyQGSXgv1 J0AA7qjDVh+H0D8iVfYaA+UXfgwtnivl0Cb4Pn5UNLVEJckU8hgIe0TlZKThpafslSmQ NX7+e3QhFj0Qu7hv/XM2UQaC/Kgd0scfx7MhrSFrLxPo5u9ByItF8tEpH3Li/l99lC3Y x9GeDe9KvEp350+4Iau3YPEVFjjowa+wb+6gWjk6iLM6pM/BjXQpyzgbRVbUKjS+r+xU RJJLJotDXfXPRJzDbd5S9+9wssjSKe56YDXp3MwjmUJCrb9Mu2K2YBw8G4NaH0x/vgT4 dOTA== 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=g3eyAm6PmZjFjJWFseFsfL+5wz92zr5K61TtkPzCWA4=; b=PvBjThulY82ZctvSGmpC2blWhRvjCeiv8MUGP1tEeV8YoXCIBmGGeGPf4R1pe3U6nS neZagrF6lk/vVg7INVbsd+aWDqL70fkb/9YgHcga5f2U8poTQeHWEcT6VqAxePS7NU8u ZPg3knJmQAWZEvcPccAWysuAPj8KGj0qn6DLDr308LM7mRQCA516lwubKcvWzLLIEROk yFwwsgWqL8m6zAzT1qTiEDDzjN7RPt0RcSk7RVdqz1ZO5FuzirZYHD4EBWjXuJNumYTU OvCdMI+52XofKGLwl2Ra+CAasgXERGFUSRqKnwgGJ4Ppr7EQNFE/sTbn+IyD/XU0P12q iRHw== X-Gm-Message-State: AHQUAuZR/8GA6eXMulep8xhXhc+3ClL0pBiBmCPVYx6UJfT3RlnIllJB K6H5l6u4RHCOTdIcCBh14Kjw1hTERHfwEQ/AAEEBTA== X-Google-Smtp-Source: AHgI3IaeCyd3soXkHPjPRZaOauYlZY/gOLRHzFE+1leYcJLRHhU0HmItnePpnXtmcP65waRDQ84KlRPPpCzKdGam/Dg= X-Received: by 2002:aed:34e6:: with SMTP id x93mr11633939qtd.156.1549536884550; Thu, 07 Feb 2019 02:54:44 -0800 (PST) MIME-Version: 1.0 References: <201902051210.x15CAnPq052340@repo.freebsd.org> <20190207104515.GA92760@alchemy.franken.de> In-Reply-To: <20190207104515.GA92760@alchemy.franken.de> From: Vincenzo Maffione Date: Thu, 7 Feb 2019 11:54:32 +0100 Message-ID: Subject: Re: svn commit: r343772 - head/sys/dev/netmap To: Marius Strobl Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 68E948344A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.90 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.90)[-0.898,0]; REPLY(-4.00)[]; TAGGED_FROM(0.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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 10:54:46 -0000 Il giorno gio 7 feb 2019 alle ore 11:45 Marius Strobl ha scritto: > On Tue, Feb 05, 2019 at 12:10:49PM +0000, Vincenzo Maffione wrote: > > Author: vmaffione > > Date: Tue Feb 5 12:10:48 2019 > > New Revision: 343772 > > URL: https://svnweb.freebsd.org/changeset/base/343772 > > > > Log: > > netmap: refactor logging macros and pipes > > > > Changelist: > > - Replace ND, D and RD macros with nm_prdis, nm_prinf, nm_prerr > > and nm_prlim, to avoid possible naming conflicts. > > - Add netmap_krings_mode_commit() helper function and use that > > to reduce code duplication. > > - Refactor pipes control code to export some functions that > > can be reused by the veth driver (on Linux) and epair(4). > > - Add check to reject API requests with version less than 11. > > - Small code refactoring for the null adapter. > > Hello Vincenzo, > > this change causes interface attachment output to look somewhat > deformed ("000.000395 [3717] netmap_attach_ext" debug info and > an extra newline): > em0: port 0xe000-0xe01f mem > 0xf7d00000-0xf7d1ffff,0xf7d20000-0xf7d23fff irq 17 at device 0.0 on pci3 > em0: Using 1024 TX descriptors and 1024 RX descriptors > em0: Using 2 RX queues 2 TX queues > em0: Using MSI-X interrupts with 3 vectors > em0: Ethernet address: 60:a4:4c:24:0b:4c > 000.000395 [3717] netmap_attach_ext em0: netmap queues/slots: TX > 2/1024, RX 2/1024 > > pcib5: irq 19 at device 28.7 on pci0 > > Could we please get this part back to match the pre-r343772 > output again? > The additional newline slipped through, sorry for that. I was trying to make logging macros uniform across netmap, that's why I did that change (that's the only place in netmap where if_printf() is used). But I understand this is inconvenient for users, so I will revert this specific log line. Cheers, Vincenzo > > Marius > > -- Vincenzo From owner-svn-src-head@freebsd.org Thu Feb 7 11:28:54 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B187A14D6252; Thu, 7 Feb 2019 11:28:54 +0000 (UTC) (envelope-from vmaffione@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 4EF4B851FA; Thu, 7 Feb 2019 11:28:54 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 434B21C53F; Thu, 7 Feb 2019 11:28:54 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x17BSs0N061761; Thu, 7 Feb 2019 11:28:54 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17BSstM061760; Thu, 7 Feb 2019 11:28:54 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201902071128.x17BSstM061760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 7 Feb 2019 11:28:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343867 - head/sys/dev/netmap X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/sys/dev/netmap X-SVN-Commit-Revision: 343867 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4EF4B851FA 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.999,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 11:28:54 -0000 Author: vmaffione Date: Thu Feb 7 11:28:53 2019 New Revision: 343867 URL: https://svnweb.freebsd.org/changeset/base/343867 Log: netmap: revert netmap_attach_ext() to pre-r343772 Reported by: marius MFC after: 1 week Modified: head/sys/dev/netmap/netmap.c Modified: head/sys/dev/netmap/netmap.c ============================================================================== --- head/sys/dev/netmap/netmap.c Thu Feb 7 10:44:53 2019 (r343866) +++ head/sys/dev/netmap/netmap.c Thu Feb 7 11:28:53 2019 (r343867) @@ -3711,8 +3711,7 @@ netmap_attach_ext(struct netmap_adapter *arg, size_t s hwna->up.nm_dtor = netmap_hw_dtor; } - nm_prinf("%s: netmap queues/slots: TX %d/%d, RX %d/%d\n", - hwna->up.name, + if_printf(ifp, "netmap queues/slots: TX %d/%d, RX %d/%d\n", hwna->up.num_tx_rings, hwna->up.num_tx_desc, hwna->up.num_rx_rings, hwna->up.num_rx_desc); return 0; From owner-svn-src-head@freebsd.org Thu Feb 7 13:12:44 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BDE714D9F54; Thu, 7 Feb 2019 13:12:44 +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 2BFA38F31C; Thu, 7 Feb 2019 13:12:44 +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 195F0974; Thu, 7 Feb 2019 13:12:44 +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 x17DChjr018620; Thu, 7 Feb 2019 13:12:43 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17DChgd018619; Thu, 7 Feb 2019 13:12:43 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902071312.x17DChgd018619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 7 Feb 2019 13:12:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343868 - head/tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/tools/build/mk X-SVN-Commit-Revision: 343868 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2BFA38F31C 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.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 13:12:44 -0000 Author: avos Date: Thu Feb 7 13:12:43 2019 New Revision: 343868 URL: https://svnweb.freebsd.org/changeset/base/343868 Log: Correct ypldap(8) install path in OptionalObsoleteFiles.inc It's installed to /usr/sbin, not to /usr/bin (and was always here). While here, add missing manpages and /var/yp directory to the list. MFC after: 1 week Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 7 11:28:53 2019 (r343867) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 7 13:12:43 2019 (r343868) @@ -6522,7 +6522,6 @@ OLD_FILES+=usr/bin/ypcat OLD_FILES+=usr/bin/ypchfn OLD_FILES+=usr/bin/ypchpass OLD_FILES+=usr/bin/ypchsh -OLD_FILES+=usr/bin/ypldap OLD_FILES+=usr/bin/ypmatch OLD_FILES+=usr/bin/yppasswd OLD_FILES+=usr/bin/ypwhich @@ -6546,6 +6545,7 @@ OLD_FILES+=usr/sbin/rpc.ypxfrd OLD_FILES+=usr/sbin/yp_mkdb OLD_FILES+=usr/sbin/ypbind OLD_FILES+=usr/sbin/ypinit +OLD_FILES+=usr/sbin/ypldap OLD_FILES+=usr/sbin/yppoll OLD_FILES+=usr/sbin/yppush OLD_FILES+=usr/sbin/ypserv @@ -6558,6 +6558,7 @@ OLD_FILES+=usr/share/man/man1/ypmatch.1.gz OLD_FILES+=usr/share/man/man1/yppasswd.1.gz OLD_FILES+=usr/share/man/man1/ypwhich.1.gz OLD_FILES+=usr/share/man/man5/netid.5.gz +OLD_FILES+=usr/share/man/man5/ypldap.conf.5.gz OLD_FILES+=usr/share/man/man8/mknetid.8.gz OLD_FILES+=usr/share/man/man8/rpc.yppasswdd.8.gz OLD_FILES+=usr/share/man/man8/rpc.ypxfrd.8.gz @@ -6568,6 +6569,7 @@ OLD_FILES+=usr/share/man/man8/nis.8.gz OLD_FILES+=usr/share/man/man8/yp_mkdb.8.gz OLD_FILES+=usr/share/man/man8/ypbind.8.gz OLD_FILES+=usr/share/man/man8/ypinit.8.gz +OLD_FILES+=usr/share/man/man8/ypldap.8.gz OLD_FILES+=usr/share/man/man8/yppoll.8.gz OLD_FILES+=usr/share/man/man8/yppush.8.gz OLD_FILES+=usr/share/man/man8/ypserv.8.gz @@ -6575,6 +6577,7 @@ OLD_FILES+=usr/share/man/man8/ypset.8.gz OLD_FILES+=usr/share/man/man8/ypxfr.8.gz OLD_FILES+=var/yp/Makefile OLD_FILES+=var/yp/Makefile.dist +OLD_DIRS+=var/yp .endif .if ${MK_NLS} == no From owner-svn-src-head@freebsd.org Thu Feb 7 14:05:22 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8960A14DB957; Thu, 7 Feb 2019 14:05: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 2695E91BE8; Thu, 7 Feb 2019 14:05:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 08793120E; Thu, 7 Feb 2019 14:05:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x17E5Lfi045091; Thu, 7 Feb 2019 14:05:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17E5LG6045090; Thu, 7 Feb 2019 14:05:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201902071405.x17E5LG6045090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 7 Feb 2019 14:05:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343869 - head/tools/build/options X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/build/options X-SVN-Commit-Revision: 343869 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2695E91BE8 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.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 14:05:22 -0000 Author: emaste Date: Thu Feb 7 14:05:21 2019 New Revision: 343869 URL: https://svnweb.freebsd.org/changeset/base/343869 Log: Mention clang-format in WITH_CLANG_EXTRAS It's a useful tool and gives a further hint at the types of additional binaries enabled by the option. Modified: head/tools/build/options/WITH_CLANG_EXTRAS Modified: head/tools/build/options/WITH_CLANG_EXTRAS ============================================================================== --- head/tools/build/options/WITH_CLANG_EXTRAS Thu Feb 7 13:12:43 2019 (r343868) +++ head/tools/build/options/WITH_CLANG_EXTRAS Thu Feb 7 14:05:21 2019 (r343869) @@ -1,2 +1,3 @@ .\" $FreeBSD$ -Set to build additional clang and llvm tools, such as bugpoint. +Set to build additional clang and llvm tools, such as bugpoint and +clang-format. From owner-svn-src-head@freebsd.org Thu Feb 7 14:29:47 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D662A14DC4BB; Thu, 7 Feb 2019 14:29:46 +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 78C0592FD1; Thu, 7 Feb 2019 14:29:46 +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 675E615A7; Thu, 7 Feb 2019 14:29:46 +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 x17ETknw055493; Thu, 7 Feb 2019 14:29:46 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17ETkhH055492; Thu, 7 Feb 2019 14:29:46 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902071429.x17ETkhH055492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 7 Feb 2019 14:29:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343870 - head/usr.bin/ipcs X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/usr.bin/ipcs X-SVN-Commit-Revision: 343870 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 78C0592FD1 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_LONG(-1.00)[-0.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 14:29:47 -0000 Author: avos Date: Thu Feb 7 14:29:45 2019 New Revision: 343870 URL: https://svnweb.freebsd.org/changeset/base/343870 Log: ipcs(1): drop obsolete error checking This code is not reached since r77551. PR: 201728 MFC after: 5 days Modified: head/usr.bin/ipcs/ipcs.c Modified: head/usr.bin/ipcs/ipcs.c ============================================================================== --- head/usr.bin/ipcs/ipcs.c Thu Feb 7 14:05:21 2019 (r343869) +++ head/usr.bin/ipcs/ipcs.c Thu Feb 7 14:29:45 2019 (r343870) @@ -199,7 +199,7 @@ main(int argc, char *argv[]) } kget(X_MSGINFO, &msginfo, sizeof(msginfo)); - if ((display & (MSGINFO | MSGTOTAL))) { + if (display & (MSGINFO | MSGTOTAL)) { if (display & MSGTOTAL) print_kmsqtotal(msginfo); @@ -227,15 +227,10 @@ main(int argc, char *argv[]) printf("\n"); } - } else - if (display & (MSGINFO | MSGTOTAL)) { - fprintf(stderr, - "SVID messages facility " - "not configured in the system\n"); - } + } kget(X_SHMINFO, &shminfo, sizeof(shminfo)); - if ((display & (SHMINFO | SHMTOTAL))) { + if (display & (SHMINFO | SHMTOTAL)) { if (display & SHMTOTAL) print_kshmtotal(shminfo); @@ -262,15 +257,10 @@ main(int argc, char *argv[]) } printf("\n"); } - } else - if (display & (SHMINFO | SHMTOTAL)) { - fprintf(stderr, - "SVID shared memory facility " - "not configured in the system\n"); - } + } kget(X_SEMINFO, &seminfo, sizeof(seminfo)); - if ((display & (SEMINFO | SEMTOTAL))) { + if (display & (SEMINFO | SEMTOTAL)) { struct semid_kernel *kxsema; size_t kxsema_len; @@ -299,12 +289,7 @@ main(int argc, char *argv[]) printf("\n"); } - } else - if (display & (SEMINFO | SEMTOTAL)) { - fprintf(stderr, - "SVID semaphores facility " - "not configured in the system\n"); - } + } if (!use_sysctl) kvm_close(kd); From owner-svn-src-head@freebsd.org Thu Feb 7 14:40:29 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E42914DC89E; Thu, 7 Feb 2019 14:40:29 +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 B1178935E0; Thu, 7 Feb 2019 14:40:28 +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 9AEA9175B; Thu, 7 Feb 2019 14:40:28 +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 x17EeSIC060999; Thu, 7 Feb 2019 14:40:28 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17EeSJ3060998; Thu, 7 Feb 2019 14:40:28 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902071440.x17EeSJ3060998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 7 Feb 2019 14:40:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343871 - head/sbin/recoverdisk X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sbin/recoverdisk X-SVN-Commit-Revision: 343871 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B1178935E0 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_LONG(-1.00)[-0.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 14:40:29 -0000 Author: avos Date: Thu Feb 7 14:40:28 2019 New Revision: 343871 URL: https://svnweb.freebsd.org/changeset/base/343871 Log: recoverdisk(1): fclose() file supplied via '-r readlist' parameter when it's no longer needed PR: 204952 Reported by: David Binderman MFC after: 5 days Modified: head/sbin/recoverdisk/recoverdisk.c Modified: head/sbin/recoverdisk/recoverdisk.c ============================================================================== --- head/sbin/recoverdisk/recoverdisk.c Thu Feb 7 14:29:45 2019 (r343870) +++ head/sbin/recoverdisk/recoverdisk.c Thu Feb 7 14:40:28 2019 (r343871) @@ -125,6 +125,7 @@ read_worklist(off_t t) new_lump(s, l, state); d -= l; } + fclose(file); (void)fprintf(stderr, " done.\n"); /* * Return the number of bytes already read From owner-svn-src-head@freebsd.org Thu Feb 7 17:30:45 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4778014AF140; Thu, 7 Feb 2019 17:30:45 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 DAE2A6B262; Thu, 7 Feb 2019 17:30:44 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CBE943771; Thu, 7 Feb 2019 17:30:44 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x17HUiME050251; Thu, 7 Feb 2019 17:30:44 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17HUi0P050250; Thu, 7 Feb 2019 17:30:44 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201902071730.x17HUi0P050250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Thu, 7 Feb 2019 17:30:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343872 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 343872 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DAE2A6B262 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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 17:30:45 -0000 Author: luporl Date: Thu Feb 7 17:30:44 2019 New Revision: 343872 URL: https://svnweb.freebsd.org/changeset/base/343872 Log: [ppc64] fix /dev/kmem For direct mapped kernel addresses, ppc64 function was not performing the dmap to physical conversion, before jumping to the code that fetched the value from physical memory. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D19086 Modified: head/sys/powerpc/powerpc/mem.c Modified: head/sys/powerpc/powerpc/mem.c ============================================================================== --- head/sys/powerpc/powerpc/mem.c Thu Feb 7 14:40:28 2019 (r343871) +++ head/sys/powerpc/powerpc/mem.c Thu Feb 7 17:30:44 2019 (r343872) @@ -112,9 +112,9 @@ memrw(struct cdev *dev, struct uio *uio, int flags) continue; } if (dev2unit(dev) == CDEV_MINOR_MEM) { -kmem_direct_mapped: v = uio->uio_offset; + v = uio->uio_offset; - off = uio->uio_offset & PAGE_MASK; +kmem_direct_mapped: off = v & PAGE_MASK; cnt = PAGE_SIZE - ((vm_offset_t)iov->iov_base & PAGE_MASK); cnt = min(cnt, PAGE_SIZE - off); @@ -137,8 +137,10 @@ kmem_direct_mapped: v = uio->uio_offset; else if (dev2unit(dev) == CDEV_MINOR_KMEM) { va = uio->uio_offset; - if ((va < VM_MIN_KERNEL_ADDRESS) || (va > virtual_end)) + if ((va < VM_MIN_KERNEL_ADDRESS) || (va > virtual_end)) { + v = DMAP_TO_PHYS(va); goto kmem_direct_mapped; + } va = trunc_page(uio->uio_offset); eva = round_page(uio->uio_offset From owner-svn-src-head@freebsd.org Thu Feb 7 18:07:22 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 329EA14B1380; Thu, 7 Feb 2019 18:07:22 +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 AFF756C6BD; Thu, 7 Feb 2019 18:07:21 +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 1BE4A3DE8; Thu, 7 Feb 2019 18:07:18 +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 x17I7HaI071406; Thu, 7 Feb 2019 18:07:17 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17I7HT2071405; Thu, 7 Feb 2019 18:07:17 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201902071807.x17I7HT2071405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 7 Feb 2019 18:07:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343873 - head/sys/modules/dtb/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/modules/dtb/allwinner X-SVN-Commit-Revision: 343873 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AFF756C6BD 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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 18:07:22 -0000 Author: manu Date: Thu Feb 7 18:07:17 2019 New Revision: 343873 URL: https://svnweb.freebsd.org/changeset/base/343873 Log: arm64: dtb: allwinner: Add the new pine64-lts dtb file to the build MFC after: 1 month X-MFC-With: r342936 Modified: head/sys/modules/dtb/allwinner/Makefile Modified: head/sys/modules/dtb/allwinner/Makefile ============================================================================== --- head/sys/modules/dtb/allwinner/Makefile Thu Feb 7 17:30:44 2019 (r343872) +++ head/sys/modules/dtb/allwinner/Makefile Thu Feb 7 18:07:17 2019 (r343873) @@ -40,6 +40,7 @@ LINKS= \ DTS= \ allwinner/sun50i-a64-nanopi-a64.dts \ allwinner/sun50i-a64-olinuxino.dts \ + allwinner/sun50i-a64-pine64-lts.dts \ allwinner/sun50i-a64-pine64-plus.dts \ allwinner/sun50i-a64-pine64.dts \ allwinner/sun50i-a64-sopine-baseboard.dts \ From owner-svn-src-head@freebsd.org Thu Feb 7 18:54:26 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52DA814BB0EB; Thu, 7 Feb 2019 18:54:26 +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 EE8A76E2F2; Thu, 7 Feb 2019 18:54:25 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DE61046E5; Thu, 7 Feb 2019 18:54:25 +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 x17IsPa4097392; Thu, 7 Feb 2019 18:54:25 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17IsP3m097391; Thu, 7 Feb 2019 18:54:25 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201902071854.x17IsP3m097391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 7 Feb 2019 18:54:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343874 - head/etc/mtree X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/etc/mtree X-SVN-Commit-Revision: 343874 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EE8A76E2F2 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)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 18:54:26 -0000 Author: manu Date: Thu Feb 7 18:54:25 2019 New Revision: 343874 URL: https://svnweb.freebsd.org/changeset/base/343874 Log: mtree: Add dtb subdir to the mtree file makefs will fails otherwise Reported by: emaste MFC after: 1 week Modified: head/etc/mtree/BSD.root.dist Modified: head/etc/mtree/BSD.root.dist ============================================================================== --- head/etc/mtree/BSD.root.dist Thu Feb 7 18:07:17 2019 (r343873) +++ head/etc/mtree/BSD.root.dist Thu Feb 7 18:54:25 2019 (r343874) @@ -11,7 +11,11 @@ defaults .. dtb + allwinner tags=package=runtime + .. overlays tags=package=runtime + .. + rockchip tags=package=runtime .. .. firmware From owner-svn-src-head@freebsd.org Thu Feb 7 20:50:40 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1D2A14C332D; Thu, 7 Feb 2019 20:50:40 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 64A0C72B8A; Thu, 7 Feb 2019 20:50:40 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55D935A22; Thu, 7 Feb 2019 20:50:40 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x17KoedT056179; Thu, 7 Feb 2019 20:50:40 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17Koeod056178; Thu, 7 Feb 2019 20:50:40 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201902072050.x17Koeod056178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 7 Feb 2019 20:50:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343875 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 343875 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 64A0C72B8A 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]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 20:50:40 -0000 Author: andrew Date: Thu Feb 7 20:50:39 2019 New Revision: 343875 URL: https://svnweb.freebsd.org/changeset/base/343875 Log: Add a missing data barrier to the start of arm64_tlb_flushID. We need to ensure the page table store has happened before the tlbi. Reported by: jchandra Tested by: jchandra Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D19097 Modified: head/sys/arm64/arm64/cpufunc_asm.S Modified: head/sys/arm64/arm64/cpufunc_asm.S ============================================================================== --- head/sys/arm64/arm64/cpufunc_asm.S Thu Feb 7 18:54:25 2019 (r343874) +++ head/sys/arm64/arm64/cpufunc_asm.S Thu Feb 7 20:50:39 2019 (r343875) @@ -96,6 +96,7 @@ ENTRY(arm64_setttb) END(arm64_setttb) ENTRY(arm64_tlb_flushID) + dsb ishst #ifdef SMP tlbi vmalle1is #else From owner-svn-src-head@freebsd.org Thu Feb 7 20:58:46 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D20814C3727; Thu, 7 Feb 2019 20:58:46 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 1091773140; Thu, 7 Feb 2019 20:58:46 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00FA85BE1; Thu, 7 Feb 2019 20:58:46 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x17KwjGJ060322; Thu, 7 Feb 2019 20:58:45 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17KwjB6060321; Thu, 7 Feb 2019 20:58:45 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201902072058.x17KwjB6060321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 7 Feb 2019 20:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343876 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 343876 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1091773140 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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 20:58:46 -0000 Author: andrew Date: Thu Feb 7 20:58:45 2019 New Revision: 343876 URL: https://svnweb.freebsd.org/changeset/base/343876 Log: Add missing data barriers after storeing a new valid pagetable entry. When moving from an invalid to a valid entry we don't need to invalidate the tlb, however we do need to ensure the store is ordered before later memory accesses. This is because this later access may be to a virtual address within the newly mapped region. Add the needed barriers to places where we don't later invalidate the tlb. When we do invalidate the tlb there will be a barrier to correctly order this. This fixes a panic on boot on ThunderX2 when INVARIANTS is turned off: panic: vm_fault_hold: fault on nofault entry, addr: 0xffff000040c11000 Reported by: jchandra Tested by: jchandra Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D19097 Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Thu Feb 7 20:50:39 2019 (r343875) +++ head/sys/arm64/arm64/pmap.c Thu Feb 7 20:58:45 2019 (r343876) @@ -2862,6 +2862,7 @@ pmap_update_entry(pmap_t pmap, pd_entry_t *pte, pd_ent /* Create the new mapping */ pmap_load_store(pte, newpte); + dsb(ishst); critical_exit(); intr_restore(intr); @@ -3281,6 +3282,7 @@ validate: } else { /* New mappig */ pmap_load_store(l3, new_l3); + dsb(ishst); } #if VM_NRESERVLEVEL > 0 @@ -3435,6 +3437,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t * Map the superpage. */ (void)pmap_load_store(l2, new_l2); + dsb(ishst); atomic_add_long(&pmap_l2_mappings, 1); CTR2(KTR_PMAP, "pmap_enter_l2: success for va %#lx in pmap %p", From owner-svn-src-head@freebsd.org Thu Feb 7 21:05:45 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C23FD14C3C04; Thu, 7 Feb 2019 21:05:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 5C47873736; Thu, 7 Feb 2019 21:05:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 396ED5D9F; Thu, 7 Feb 2019 21:05:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x17L5jFP065263; Thu, 7 Feb 2019 21:05:45 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17L5imT065262; Thu, 7 Feb 2019 21:05:44 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201902072105.x17L5imT065262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 7 Feb 2019 21:05:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343877 - head/sbin/ipfw X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/sbin/ipfw X-SVN-Commit-Revision: 343877 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5C47873736 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]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 21:05:45 -0000 Author: bdrewery Date: Thu Feb 7 21:05:44 2019 New Revision: 343877 URL: https://svnweb.freebsd.org/changeset/base/343877 Log: ipfw table list: Fix showing header outside of 'all'. Properly pass down is_all to table_show_list(). This restores the behavior before r272840 so that only 'ipfw table all list' shows the headers. MFC after: 2 weeks Relnotes: yes Modified: head/sbin/ipfw/tables.c Modified: head/sbin/ipfw/tables.c ============================================================================== --- head/sbin/ipfw/tables.c Thu Feb 7 20:58:45 2019 (r343876) +++ head/sbin/ipfw/tables.c Thu Feb 7 21:05:44 2019 (r343877) @@ -282,13 +282,14 @@ ipfw_table_handler(int ac, char *av[]) } break; case TOK_LIST: + arg = is_all ? (void*)1 : (void*)0; if (is_all == 0) { ipfw_xtable_info i; if ((error = table_get_info(&oh, &i)) != 0) err(EX_OSERR, "failed to request table info"); - table_show_one(&i, NULL); + table_show_one(&i, arg); } else { - error = tables_foreach(table_show_one, NULL, 1); + error = tables_foreach(table_show_one, arg, 1); if (error != 0) err(EX_OSERR, "failed to request tables list"); } @@ -821,13 +822,14 @@ table_show_one(ipfw_xtable_info *i, void *arg) { ipfw_obj_header *oh; int error; + int is_all = (int)arg; if ((error = table_do_get_list(i, &oh)) != 0) { err(EX_OSERR, "Error requesting table %s list", i->tablename); return (error); } - table_show_list(oh, 1); + table_show_list(oh, is_all); free(oh); return (0); From owner-svn-src-head@freebsd.org Thu Feb 7 21:41:29 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED35314C52C0; Thu, 7 Feb 2019 21:41:28 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 A441D75430; Thu, 7 Feb 2019 21:41:28 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B377E6457; Thu, 7 Feb 2019 21:41:27 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x17LfRex085077; Thu, 7 Feb 2019 21:41:27 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17LfR8N085059; Thu, 7 Feb 2019 21:41:27 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201902072141.x17LfR8N085059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 7 Feb 2019 21:41:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343880 - head/sbin/ipfw X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/sbin/ipfw X-SVN-Commit-Revision: 343880 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A441D75430 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)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 21:41:29 -0000 Author: bdrewery Date: Thu Feb 7 21:41:27 2019 New Revision: 343880 URL: https://svnweb.freebsd.org/changeset/base/343880 Log: Fix build of r343877 MFC after: 2 weeks X-MFC-with: r343877 Pointyhat to: bdrewery Modified: head/sbin/ipfw/tables.c Modified: head/sbin/ipfw/tables.c ============================================================================== --- head/sbin/ipfw/tables.c Thu Feb 7 21:37:06 2019 (r343879) +++ head/sbin/ipfw/tables.c Thu Feb 7 21:41:27 2019 (r343880) @@ -282,7 +282,7 @@ ipfw_table_handler(int ac, char *av[]) } break; case TOK_LIST: - arg = is_all ? (void*)1 : (void*)0; + arg = is_all ? (void*)1 : NULL; if (is_all == 0) { ipfw_xtable_info i; if ((error = table_get_info(&oh, &i)) != 0) @@ -822,7 +822,9 @@ table_show_one(ipfw_xtable_info *i, void *arg) { ipfw_obj_header *oh; int error; - int is_all = (int)arg; + int is_all; + + is_all = arg == NULL ? 0 : 1; if ((error = table_do_get_list(i, &oh)) != 0) { err(EX_OSERR, "Error requesting table %s list", i->tablename); From owner-svn-src-head@freebsd.org Thu Feb 7 21:51:40 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A26D14C5919; Thu, 7 Feb 2019 21:51:40 +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 9CB6B75B7E; Thu, 7 Feb 2019 21:51:39 +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 8D9BE6618; Thu, 7 Feb 2019 21:51:39 +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 x17LpdB8089601; Thu, 7 Feb 2019 21:51:39 GMT (envelope-from sef@FreeBSD.org) Received: (from sef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17Lpdok089600; Thu, 7 Feb 2019 21:51:39 GMT (envelope-from sef@FreeBSD.org) Message-Id: <201902072151.x17Lpdok089600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sef set sender to sef@FreeBSD.org using -f From: Sean Eric Fagan Date: Thu, 7 Feb 2019 21:51:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343881 - head/lib/libutil X-SVN-Group: head X-SVN-Commit-Author: sef X-SVN-Commit-Paths: head/lib/libutil X-SVN-Commit-Revision: 343881 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9CB6B75B7E 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]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 21:51:40 -0000 Author: sef Date: Thu Feb 7 21:51:39 2019 New Revision: 343881 URL: https://svnweb.freebsd.org/changeset/base/343881 Log: 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 Reported by: Andre Albsmeier Reviewed by: mav, delphij MFC after: 1 month Sponsored by: iXsystems Inc Differential Revision: https://reviews.freebsd.org/D18785 Modified: head/lib/libutil/quotafile.c Modified: head/lib/libutil/quotafile.c ============================================================================== --- head/lib/libutil/quotafile.c Thu Feb 7 21:41:27 2019 (r343880) +++ head/lib/libutil/quotafile.c Thu Feb 7 21:51:39 2019 (r343881) @@ -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-head@freebsd.org Thu Feb 7 22:00:57 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 457A814C5CE6; Thu, 7 Feb 2019 22:00:57 +0000 (UTC) (envelope-from bdrewery@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 D4AB076170; Thu, 7 Feb 2019 22:00:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 6F4661E7F3; Thu, 7 Feb 2019 22:00:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 310A22AC4; Thu, 7 Feb 2019 22:00:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id oeCuskIiFppg; Thu, 7 Feb 2019 22:00:51 +0000 (UTC) Subject: Re: svn commit: r343881 - head/lib/libutil DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com 7707A2ABA To: Sean Eric Fagan , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201902072151.x17Lpdok089600@repo.freebsd.org> From: Bryan Drewery Openpgp: preference=signencrypt Autocrypt: addr=bdrewery@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJphmsBCADiFgmS4bIzwZijrS31SjEMzg+n5zNellgM+HkShwehpqCiyhXdWrvH6dTZ a6u50pbUIX7doTR7W7PQHCjCTqtpwvcj0eulZva+iHFp+XrbgSFHn+VVXgkYP2MFySyZRFab D2qqzJBEJofhpv4HvY6uQI5K99pMqKr1Z/lHqsijYYu4RH2OfwB5PinId7xeldzWEonVoCr+ rfxzO/UrgA6v/3layGZcKNHFjmc3NqoN1DXtdaEHqtjIozzbndVkH6lkFvIpIrI6i5ox8pwp VxsxLCr/4Musd5CWgHiet5kSw2SzNeA8FbxdLYCpXNVu+uBACEbCUP+CSNy3NVfEUxsBABEB AAG0JEJyeWFuIERyZXdlcnkgPGJkcmV3ZXJ5QEZyZWVCU0Qub3JnPokBVwQTAQoAQQIbAwUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBPkXPLLDqup6XIofCTXXcbtuRpfPBQJb5hLu BQkNPvODAAoJEDXXcbtuRpfP9rMH/3f7cfX5rzyEV5QNfV/wS4jFukLoPZ4+nCM/TKxH3pEX 2bLbeQbkk6La8cueQ5Lpoht5XFZ18Y5TbMittngltrlNzoDD0h9are24OkDFGim3afJU7tkj IGQa1if+re+vI5BhzYwRhj0oKXzBi39M5oePd3L1dXfx83rg2FPyZBdIejsz6fR74T3JVkbd 6k2l5/3Zk2uiNMy+eBfDRgYE1E6CP28kV0nCeGKZgSVso0kGUUHud7voKqGVpMvbd0mE4pp4 PE5YJaFPjrll9miaDAvdU8LGIq5n6+aXPLKoQ/QNl6mg6ifgI6FfKILOkTizLW8E5PBSNnCm NapQ55yjm125AQ0EUmmGawEIAKJUU9+Q19oW1RK5jTf3m56j+szIc8Y9DaLC8REUKl4UZJBK BqCl6c0cukVApOD92XoU6hJPm2rLEyp/IcYcPPNTnVu8D8h9oag2L8EiFN7+2hk0xG+lwjc8 uOIZycme7AIJsBU4AZ1v63lxm2k104hwpiatgbe71GIGl7p1MX6ousP/wGzXCOF25Dx9w02C eRe7zEMfhnFjSUhzdCC9han2+KaVB7qIqNR3b8NfbwRNlwPmHqlhXffUow9OsQjSnTK8WKNR lx7xzVccXIvWP2wECFrmqmzMmXpSrmIuiWEpFwZ9x2a0Pva8dCNRiCVTK51IlRXKjaAxiN1u IUrMm6UAEQEAAYkBJQQYAQoADwUCUmmGawIbDAUJCWYBgAAKCRA113G7bkaXz1Q+CADaYZCn bzIJQqwnoocVXL+Wkd+hCsoX6zsd8pNTY5tV5U1fgjxl1bVQ7jyZGrEQ7BjyvlhIfpfTo6aK oJfZpIxeDc3Tr+X7O2UHT5QYaWRcGO+X3+eKL5sLpvxda67RftClv2hgEr1i2hqjK5WmUCaN 2P9w+i7rmZ4ohpLXINOMeHjnQOtbxCCF7qXRsVfgEcpNKb31T3QwvsRjX0HqIjYFlKpa61Wz IPvWgBERjo0aAOkI4g7oVLjX5Z5gINGPy+xr8GJqhfZ3ZIEOwLCwTB71+Dk9gyLa5UiG8vo6 vGfA50H5OSC87LnNlI07b1Qb8mKVkqg13PbCkRpTMKEYaou9iQElBBgBCgAPAhsMBQJa6M4o BQkKYHs9AAoJEDXXcbtuRpfPpuQH/0d1RHcTTAHAyHrPQA4UMqH49tEj1d3gidx2ETnm00rj XTrnRreAAMgPCrPeLvYYiKeSBrHOkQ7E/Vuztr4F4Xenld3omOTon+cSyGKyA1btWNRskcUa zxJ/0DqgzerhWQj8CtWjmqRnGAqzvZQdIDLk1X4B2p1Ota4AvbTF9DqADskXfld/zPJQzYYy XRfyKTt0nWMyn5MHbsuKmpsOBqYXMf0X2EL2C6v3g5D/HedD6YVnW6KlgcDUR2sq6Fv9Ozhs 38TOXyeZgbFz0HDtkHEY5Mh3+sQjOh4takC+Dp1zDRP2U19JZzo9f6R/d05c0h2TD02oogPz AQ97xrFwZgaJATwEGAEKACYCGwwWIQT5Fzyyw6rqelyKHwk113G7bkaXzwUCW+YS+AUJDT7z jQAKCRA113G7bkaXzwo3B/4rwbDqXaXm6YC4s0jVOf1+MljeQIsbHPVQZ0IRigCpzCDSUFTK QOebA9iUj8JaF2DPwd6sjyUUv/XMCLl+SwzSijmVN0Kfk85XspzNef8XmteKK1mERkYnLWBw TNwp6qezg/CukNbobNH08ciT+z2fxtPuwqK5X9Q5R4Q7egth5XUTxbwLwIJerEfVs4HG+687 m9h1bWyYJemB24MgBu8fTaVxas8dSSwDHabdgyGMKIvqDHUUJQSMDbio0Iwhs7lx2p3Xd5Br wQLMiaUPnKBHqfVM8ADWldvHF6xa9keBUjnEedKwQNjYf76lGH6bLwbyZcLigKFdXY1R2ooT Xi+R Organization: FreeBSD Message-ID: <5ff60936-45d0-3aa8-0b1b-e937e5639da4@FreeBSD.org> Date: Thu, 7 Feb 2019 14:00:48 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <201902072151.x17Lpdok089600@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SFojDR4AseoYI3eXnL3yNdbd0WjzVvtfO" X-Rspamd-Queue-Id: D4AB076170 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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 22:00:57 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --SFojDR4AseoYI3eXnL3yNdbd0WjzVvtfO Content-Type: multipart/mixed; boundary="AGmTCOVb2l7uCpbLmRJQUtoaPtxAvk8Rm"; protected-headers="v1" From: Bryan Drewery To: Sean Eric Fagan , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <5ff60936-45d0-3aa8-0b1b-e937e5639da4@FreeBSD.org> Subject: Re: svn commit: r343881 - head/lib/libutil References: <201902072151.x17Lpdok089600@repo.freebsd.org> In-Reply-To: <201902072151.x17Lpdok089600@repo.freebsd.org> --AGmTCOVb2l7uCpbLmRJQUtoaPtxAvk8Rm Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2/7/19 1:51 PM, Sean Eric Fagan wrote: > Author: sef > Date: Thu Feb 7 21:51:39 2019 > New Revision: 343881 > URL: https://svnweb.freebsd.org/changeset/base/343881 >=20 > Log: > r339008 broke repquota for UFS. This rectifies that. > =20 > Refactor the function calls and tests so that, on UFS, the proper fie= lds > are filled out. > =20 > PR: 233849 > Reported by: Andre Albsmeier > Reviewed by: mav, delphij > MFC after: 1 month > Sponsored by: iXsystems Inc > Differential Revision: https://reviews.freebsd.org/D18785 >=20 > Modified: > head/lib/libutil/quotafile.c >=20 > Modified: head/lib/libutil/quotafile.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/lib/libutil/quotafile.c Thu Feb 7 21:41:27 2019 (r343880) > +++ head/lib/libutil/quotafile.c Thu Feb 7 21:51:39 2019 (r343881) > @@ -119,6 +119,7 @@ quota_open(struct fstab *fs, int quotatype, int ope= nfl > struct group *grp; > struct stat st; > int qcmd, serrno; > + int ufs; > =20 > if ((qf =3D calloc(1, sizeof(*qf))) =3D=3D NULL) > return (NULL); > @@ -129,15 +130,21 @@ quota_open(struct fstab *fs, int quotatype, int o= penfl > goto error; > qf->dev =3D st.st_dev; > qcmd =3D QCMD(Q_GETQUOTASIZE, quotatype); > + ufs =3D strcmp(fs->fs_vfstype, "ufs") =3D=3D 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 =3D hasquota(fs, quotatype, qf->qfname, > + sizeof(qf->qfname)); > + } > if (quotactl(qf->fsname, qcmd, 0, &qf->wordsize) =3D=3D 0) > return (qf); > - /* We only check the quota file for ufs */ > - if (strcmp(fs->fs_vfstype, "ufs")) { > + if (!ufs) { > errno =3D 0; > goto error; > - } > - serrno =3D hasquota(fs, quotatype, qf->qfname, sizeof(qf->qfname)); > - if (serrno =3D=3D 0) { > + } else if (serrno =3D=3D 0) { > errno =3D EOPNOTSUPP; > goto error; > } >=20 /usr/src/lib/libutil/quotafile.c:121: warning: 'serrno' may be used uninitialized in this function --=20 Regards, Bryan Drewery --AGmTCOVb2l7uCpbLmRJQUtoaPtxAvk8Rm-- --SFojDR4AseoYI3eXnL3yNdbd0WjzVvtfO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE+Rc8ssOq6npcih8JNddxu25Gl88FAlxcqpEACgkQNddxu25G l89rLwf/aJEccgXhp/U3vGVYi/YZ53GKi2/0icwxZRtLb6E0QTetfeP6mLH6qJyM KJrVwe9V4zBaYbG2S54PUH0OsleM9r8HUkBD1tECdme4Cbq3brHmfoo4LJqmEBcU eZVwMi68Ri/CI+3Ht4yG8vxPnn/TJ0QzbvbfKlOtiKtu8fs5Kn0LE9JhaTK3RVX5 NVDDnv7pGLEBQeVNf4USL2EsRCyYrWcJbpiN2YoBN/0HZClEEWm1CENRKMNcdST8 AmQZP7g8pIX3nZWjT3774VsFQ80TC8vQ1J3MzciTrwO2hKg90pJcloYm9iZR4ovx smP/GwAkA8eNmU6SDjxSsQunikIgzA== =r49E -----END PGP SIGNATURE----- --SFojDR4AseoYI3eXnL3yNdbd0WjzVvtfO-- From owner-svn-src-head@freebsd.org Thu Feb 7 22:10:21 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF43A14C618C; Thu, 7 Feb 2019 22:10:21 +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 5E067765CE; Thu, 7 Feb 2019 22:10:21 +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 4E96C6846; Thu, 7 Feb 2019 22:10:21 +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 x17MAL2Y096945; Thu, 7 Feb 2019 22:10:21 GMT (envelope-from sef@FreeBSD.org) Received: (from sef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17MALuO096944; Thu, 7 Feb 2019 22:10:21 GMT (envelope-from sef@FreeBSD.org) Message-Id: <201902072210.x17MALuO096944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sef set sender to sef@FreeBSD.org using -f From: Sean Eric Fagan Date: Thu, 7 Feb 2019 22:10:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343882 - head/lib/libutil X-SVN-Group: head X-SVN-Commit-Author: sef X-SVN-Commit-Paths: head/lib/libutil X-SVN-Commit-Revision: 343882 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5E067765CE 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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 22:10:21 -0000 Author: sef Date: Thu Feb 7 22:10:20 2019 New Revision: 343882 URL: https://svnweb.freebsd.org/changeset/base/343882 Log: r343881 had an uninitialized error. This fixes that. PR: 233849 Reported by: Andre Albsmeier MFC after: 1 month Sponsored by: iXsystems Inc Differential Revision: https://reviews.freebsd.org/D18785 Modified: head/lib/libutil/quotafile.c Modified: head/lib/libutil/quotafile.c ============================================================================== --- head/lib/libutil/quotafile.c Thu Feb 7 21:51:39 2019 (r343881) +++ head/lib/libutil/quotafile.c Thu Feb 7 22:10:20 2019 (r343882) @@ -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-head@freebsd.org Thu Feb 7 23:17:44 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D541214C88B9; Thu, 7 Feb 2019 23:17:44 +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 79E3981E83; Thu, 7 Feb 2019 23:17:44 +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 6C8AA7496; Thu, 7 Feb 2019 23:17:44 +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 x17NHihq034851; Thu, 7 Feb 2019 23:17:44 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17NHixb034850; Thu, 7 Feb 2019 23:17:44 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201902072317.x17NHixb034850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 7 Feb 2019 23:17:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343884 - head/lib/libc/stdio X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/lib/libc/stdio X-SVN-Commit-Revision: 343884 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 79E3981E83 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_SHORT(-0.94)[-0.937,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 23:17:45 -0000 Author: brooks Date: Thu Feb 7 23:17:44 2019 New Revision: 343884 URL: https://svnweb.freebsd.org/changeset/base/343884 Log: GC a historical artifact. Back in 1993, the fgetln (then fgetline) interface was changed to not return a C string. The change was accomplished by ifdefing out the code that did the termination. Changing the interface would violate our API stability rules so remove the old implementation. Sponsored by: DARPA, AFRL Modified: head/lib/libc/stdio/fgetln.c Modified: head/lib/libc/stdio/fgetln.c ============================================================================== --- head/lib/libc/stdio/fgetln.c Thu Feb 7 22:49:49 2019 (r343883) +++ head/lib/libc/stdio/fgetln.c Thu Feb 7 23:17:44 2019 (r343884) @@ -50,19 +50,12 @@ __FBSDID("$FreeBSD$"); /* * Expand the line buffer. Return -1 on error. -#ifdef notdef - * The `new size' does not account for a terminating '\0', - * so we add 1 here. -#endif */ int __slbexpand(FILE *fp, size_t newsize) { void *p; -#ifdef notdef - ++newsize; -#endif if (fp->_lb._size >= newsize) return (0); if (newsize > INT_MAX) { @@ -160,9 +153,6 @@ fgetln(FILE *fp, size_t *lenp) break; } *lenp = len; -#ifdef notdef - fp->_lb._base[len] = '\0'; -#endif ret = (char *)fp->_lb._base; end: FUNLOCKFILE_CANCELSAFE(); From owner-svn-src-head@freebsd.org Fri Feb 8 03:31:39 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4998614D2701; Fri, 8 Feb 2019 03:31:39 +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 E1628895D5; Fri, 8 Feb 2019 03:31:38 +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 D268EA0B8; Fri, 8 Feb 2019 03:31:38 +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 x183VcuD067029; Fri, 8 Feb 2019 03:31:38 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x183VcNM067028; Fri, 8 Feb 2019 03:31:38 GMT (envelope-from np@FreeBSD.org) Message-Id: <201902080331.x183VcNM067028@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 8 Feb 2019 03:31:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343889 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 343889 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E1628895D5 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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 03:31:39 -0000 Author: np Date: Fri Feb 8 03:31:38 2019 New Revision: 343889 URL: https://svnweb.freebsd.org/changeset/base/343889 Log: cxgbev(4): Initialize debug_flags from the environment like in the PF driver. Modified: head/sys/dev/cxgbe/t4_vf.c Modified: head/sys/dev/cxgbe/t4_vf.c ============================================================================== --- head/sys/dev/cxgbe/t4_vf.c Fri Feb 8 03:29:17 2019 (r343888) +++ head/sys/dev/cxgbe/t4_vf.c Fri Feb 8 03:31:38 2019 (r343889) @@ -479,6 +479,7 @@ t4vf_attach(device_t dev) sc->params.pci.mps = pci_get_max_payload(dev); sc->flags |= IS_VF; + TUNABLE_INT_FETCH("hw.cxgbe.dflags", &sc->debug_flags); sc->sge_gts_reg = VF_SGE_REG(A_SGE_VF_GTS); sc->sge_kdoorbell_reg = VF_SGE_REG(A_SGE_VF_KDOORBELL); From owner-svn-src-head@freebsd.org Fri Feb 8 04:06:51 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA8C414D306C; Fri, 8 Feb 2019 04:06:51 +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 797338BC6A; Fri, 8 Feb 2019 04:06:51 +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 D0E8CB418; Fri, 8 Feb 2019 04:06: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 x1846mQP086193; Fri, 8 Feb 2019 04:06:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1846mc5086192; Fri, 8 Feb 2019 04:06:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902080406.x1846mc5086192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 8 Feb 2019 04:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343890 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 343890 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 797338BC6A 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.975,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 04:06:52 -0000 Author: kib Date: Fri Feb 8 04:06:48 2019 New Revision: 343890 URL: https://svnweb.freebsd.org/changeset/base/343890 Log: do_execve(): lock vnode when needed. Code after exec_fail_dealloc label expects that the image vnode is locked if present. When copyout() of the strings or auxv vectors fails, goto to the error handling did not relocked the vnode as required. The copyout() can be made failing e.g. by creating an ELF image with PT_GNU_STACK segment disabling the write. Reported by: Jonathan Stuart (found by fuzzing) Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Fri Feb 8 03:31:38 2019 (r343889) +++ head/sys/kern/kern_exec.c Fri Feb 8 04:06:48 2019 (r343890) @@ -696,8 +696,10 @@ interpret: else error = suword(--stack_base, imgp->args->argc) == 0 ? 0 : EFAULT; - if (error != 0) + if (error != 0) { + vn_lock(imgp->vp, LK_SHARED | LK_RETRY); goto exec_fail_dealloc; + } if (args->fdp != NULL) { /* Install a brand new file descriptor table. */ From owner-svn-src-head@freebsd.org Fri Feb 8 04:18:19 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC80714D3319; Fri, 8 Feb 2019 04:18:18 +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 61EEF8EF54; Fri, 8 Feb 2019 04:18:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 540B2BE46; Fri, 8 Feb 2019 04:18:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x184IISV091525; Fri, 8 Feb 2019 04:18:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x184IH9K091522; Fri, 8 Feb 2019 04:18:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902080418.x184IH9K091522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 8 Feb 2019 04:18:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343891 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 343891 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 61EEF8EF54 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)[-0.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 04:18:19 -0000 Author: kib Date: Fri Feb 8 04:18:17 2019 New Revision: 343891 URL: https://svnweb.freebsd.org/changeset/base/343891 Log: Fix renameat(2) for CAPABILITIES kernels. When renameat(2) is used with: - absolute path for to; - tofd not set to AT_FDCWD; - the target exists kern_renameat() requires CAP_UNLINK capability on tofd, but corresponding namei ni_filecap is not initialized at all because the lookup is absolute. As result, the check was done against empty filecap and syscall fails erronously. Fix it by creating a return flags namei member and reporting if the lookup was absolute, then do not touch to.ni_filecaps at all. PR: 222258 Reviewed by: jilles, ngie Sponsored by: The FreeBSD Foundation MFC after: 1 week X-MFC-note: KBI breakage Differential revision: https://reviews.freebsd.org/D19096 Modified: head/sys/kern/vfs_lookup.c head/sys/kern/vfs_syscalls.c head/sys/sys/namei.h Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Fri Feb 8 04:06:48 2019 (r343890) +++ head/sys/kern/vfs_lookup.c Fri Feb 8 04:18:17 2019 (r343891) @@ -410,6 +410,7 @@ namei(struct nameidata *ndp) dp = NULL; cnp->cn_nameptr = cnp->cn_pnbuf; if (cnp->cn_pnbuf[0] == '/') { + ndp->ni_resflags |= NIRES_ABS; error = namei_handle_root(ndp, &dp); } else { if (ndp->ni_startdir != NULL) { @@ -1302,6 +1303,7 @@ NDINIT_ALL(struct nameidata *ndp, u_long op, u_long fl ndp->ni_dirp = namep; ndp->ni_dirfd = dirfd; ndp->ni_startdir = startdir; + ndp->ni_resflags = 0; filecaps_init(&ndp->ni_filecaps); ndp->ni_cnd.cn_thread = td; if (rightsp != NULL) Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Fri Feb 8 04:06:48 2019 (r343890) +++ head/sys/kern/vfs_syscalls.c Fri Feb 8 04:18:17 2019 (r343891) @@ -3544,10 +3544,10 @@ again: goto out; } #ifdef CAPABILITIES - if (newfd != AT_FDCWD) { + if (newfd != AT_FDCWD && (tond.ni_resflags & NIRES_ABS) == 0) { /* * If the target already exists we require CAP_UNLINKAT - * from 'newfd'. + * from 'newfd', when newfd was used for the lookup. */ error = cap_check(&tond.ni_filecaps.fc_rights, &cap_unlinkat_rights); Modified: head/sys/sys/namei.h ============================================================================== --- head/sys/sys/namei.h Fri Feb 8 04:06:48 2019 (r343890) +++ head/sys/sys/namei.h Fri Feb 8 04:18:17 2019 (r343891) @@ -88,6 +88,10 @@ struct nameidata { struct vnode *ni_vp; /* vnode of result */ struct vnode *ni_dvp; /* vnode of intermediate directory */ /* + * Results: flags returned from namei + */ + u_int ni_resflags; + /* * Shared between namei and lookup/commit routines. */ size_t ni_pathlen; /* remaining chars in path */ @@ -158,6 +162,11 @@ struct nameidata { #define TRAILINGSLASH 0x10000000 /* path ended in a slash */ #define NOCAPCHECK 0x20000000 /* do not perform capability checks */ #define PARAMASK 0x3ffffe00 /* mask of parameter descriptors */ + +/* + * Namei results flags + */ +#define NIRES_ABS 0x00000001 /* Path was absolute */ /* * Flags in ni_lcf, valid for the duration of the namei call. From owner-svn-src-head@freebsd.org Fri Feb 8 06:19:30 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09D1E14D5A53; Fri, 8 Feb 2019 06:19:30 +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 937566B887; Fri, 8 Feb 2019 06:19:29 +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 63CE1D28D; Fri, 8 Feb 2019 06:19:29 +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 x186JTak061666; Fri, 8 Feb 2019 06:19:29 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x186JSDC061664; Fri, 8 Feb 2019 06:19:28 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201902080619.x186JSDC061664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 8 Feb 2019 06:19:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343895 - in head: share/man/man4 sys/netgraph X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head: share/man/man4 sys/netgraph X-SVN-Commit-Revision: 343895 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 937566B887 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_LONG(-1.00)[-0.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 06:19:30 -0000 Author: glebius Date: Fri Feb 8 06:19:28 2019 New Revision: 343895 URL: https://svnweb.freebsd.org/changeset/base/343895 Log: Allow some nesting of ng_iface(4) interfaces and add a configuration knob. PR: 235500 MFC after: 1 week Modified: head/share/man/man4/ng_iface.4 head/sys/netgraph/ng_iface.c Modified: head/share/man/man4/ng_iface.4 ============================================================================== --- head/share/man/man4/ng_iface.4 Fri Feb 8 04:48:12 2019 (r343894) +++ head/share/man/man4/ng_iface.4 Fri Feb 8 06:19:28 2019 (r343895) @@ -35,7 +35,7 @@ .\" $FreeBSD$ .\" $Whistle: ng_iface.8,v 1.5 1999/01/25 23:46:26 archie Exp $ .\" -.Dd January 12, 2015 +.Dd February 6, 2019 .Dt NG_IFACE 4 .Os .Sh NAME @@ -144,6 +144,17 @@ In case when your graph ends up with some kind of seri synchronous or modem, the .Nm is the right place to turn ALTQ on. +.Sh Nesting +.Nm +supports nesting, a configuration when traffic of one +.Nm +interface flows through the other. +The default maximum allowed nesting level is 2. +It can be changed at runtime setting +.Xr sysctl 8 +variable +.Va net.graph.iface.max_nesting +to the desired level of nesting. .Sh SEE ALSO .Xr altq 4 , .Xr bpf 4 , @@ -151,6 +162,7 @@ is the right place to turn ALTQ on. .Xr ng_cisco 4 , .Xr ifconfig 8 , .Xr ngctl 8 +.Xr sysctl .Sh HISTORY The .Nm iface Modified: head/sys/netgraph/ng_iface.c ============================================================================== --- head/sys/netgraph/ng_iface.c Fri Feb 8 04:48:12 2019 (r343894) +++ head/sys/netgraph/ng_iface.c Fri Feb 8 06:19:28 2019 (r343895) @@ -68,6 +68,7 @@ #include #include #include +#include #include #include @@ -92,6 +93,13 @@ static MALLOC_DEFINE(M_NETGRAPH_IFACE, "netgraph_iface #define M_NETGRAPH_IFACE M_NETGRAPH #endif +static SYSCTL_NODE(_net_graph, OID_AUTO, iface, CTLFLAG_RW, 0, + "Point to point netgraph interface"); +VNET_DEFINE_STATIC(int, ng_iface_max_nest) = 2; +#define V_ng_iface_max_nest VNET(ng_iface_max_nest) +SYSCTL_INT(_net_graph_iface, OID_AUTO, max_nesting, CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(ng_iface_max_nest), 0, "Max nested tunnels"); + /* This struct describes one address family */ struct iffam { sa_family_t family; /* Address family */ @@ -355,7 +363,8 @@ ng_iface_output(struct ifnet *ifp, struct mbuf *m, } /* Protect from deadly infinite recursion. */ - error = if_tunnel_check_nesting(ifp, m, NGM_IFACE_COOKIE, 1); + error = if_tunnel_check_nesting(ifp, m, NGM_IFACE_COOKIE, + V_ng_iface_max_nest); if (error) { m_freem(m); return (error); From owner-svn-src-head@freebsd.org Fri Feb 8 07:36:09 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CE6814D704E; Fri, 8 Feb 2019 07:36: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 1E0666D787; Fri, 8 Feb 2019 07:36: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 0F25DDFE7; Fri, 8 Feb 2019 07:36: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 x187a8Bf002847; Fri, 8 Feb 2019 07:36:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x187a8LM002846; Fri, 8 Feb 2019 07:36:08 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902080736.x187a8LM002846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 8 Feb 2019 07:36:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343896 - head/sbin/dhclient X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sbin/dhclient X-SVN-Commit-Revision: 343896 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1E0666D787 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)[-0.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 07:36:09 -0000 Author: kib Date: Fri Feb 8 07:36:08 2019 New Revision: 343896 URL: https://svnweb.freebsd.org/changeset/base/343896 Log: Correctly return exit status from the exited process. This is also OpenBSD rev. 1.117, as pointed out by Ryan Moeller . Submitted by: Nash Kaminski MFC after: 1 week Modified: head/sbin/dhclient/dhclient.c Modified: head/sbin/dhclient/dhclient.c ============================================================================== --- head/sbin/dhclient/dhclient.c Fri Feb 8 06:19:28 2019 (r343895) +++ head/sbin/dhclient/dhclient.c Fri Feb 8 07:36:08 2019 (r343896) @@ -2348,7 +2348,7 @@ priv_script_go(void) if (ip) script_flush_env(ip->client); - return (wstatus & 0xff); + return WEXITSTATUS(wstatus); } void From owner-svn-src-head@freebsd.org Fri Feb 8 08:15:30 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 948FE14D7F38; Fri, 8 Feb 2019 08:15:30 +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 36D176EAD9; Fri, 8 Feb 2019 08:15:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E9F9E6C7; Fri, 8 Feb 2019 08:15:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x188FTVk023763; Fri, 8 Feb 2019 08:15:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x188FTgI023762; Fri, 8 Feb 2019 08:15:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902080815.x188FTgI023762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 8 Feb 2019 08:15:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343897 - head/sys/fs/nullfs X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/fs/nullfs X-SVN-Commit-Revision: 343897 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 36D176EAD9 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.97)[-0.967,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 08:15:30 -0000 Author: kib Date: Fri Feb 8 08:15:29 2019 New Revision: 343897 URL: https://svnweb.freebsd.org/changeset/base/343897 Log: Some style for nullfs_mount(). Also use bool type for isvnunlocked. Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/nullfs/null_vfsops.c Modified: head/sys/fs/nullfs/null_vfsops.c ============================================================================== --- head/sys/fs/nullfs/null_vfsops.c Fri Feb 8 07:36:08 2019 (r343896) +++ head/sys/fs/nullfs/null_vfsops.c Fri Feb 8 08:15:29 2019 (r343897) @@ -74,13 +74,14 @@ static vfs_extattrctl_t nullfs_extattrctl; static int nullfs_mount(struct mount *mp) { - int error = 0; struct vnode *lowerrootvp, *vp; struct vnode *nullm_rootvp; struct null_mount *xmp; + struct null_node *nn; + struct nameidata nd, *ndp; char *target; - int isvnunlocked = 0, len; - struct nameidata nd, *ndp = &nd; + int error, len; + bool isvnunlocked; NULLFSDEBUG("nullfs_mount(mp = %p)\n", (void *)mp); @@ -110,14 +111,18 @@ nullfs_mount(struct mount *mp) /* * Unlock lower node to avoid possible deadlock. */ - if ((mp->mnt_vnodecovered->v_op == &null_vnodeops) && + if (mp->mnt_vnodecovered->v_op == &null_vnodeops && VOP_ISLOCKED(mp->mnt_vnodecovered) == LK_EXCLUSIVE) { VOP_UNLOCK(mp->mnt_vnodecovered, 0); - isvnunlocked = 1; + isvnunlocked = true; + } else { + isvnunlocked = false; } + /* * Find lower node */ + ndp = &nd; NDINIT(ndp, LOOKUP, FOLLOW|LOCKLEAF, UIO_SYSSPACE, target, curthread); error = namei(ndp); From owner-svn-src-head@freebsd.org Fri Feb 8 08:17:32 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8ABE314D8050; Fri, 8 Feb 2019 08:17:32 +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 2D5036ECAB; Fri, 8 Feb 2019 08:17:32 +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 1F3F9E6CA; Fri, 8 Feb 2019 08:17:32 +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 x188HVZO023886; Fri, 8 Feb 2019 08:17:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x188HVYE023885; Fri, 8 Feb 2019 08:17:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902080817.x188HVYE023885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 8 Feb 2019 08:17:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343898 - head/sys/fs/nullfs X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/fs/nullfs X-SVN-Commit-Revision: 343898 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2D5036ECAB 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.97)[-0.967,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 08:17:32 -0000 Author: kib Date: Fri Feb 8 08:17:31 2019 New Revision: 343898 URL: https://svnweb.freebsd.org/changeset/base/343898 Log: Before using VTONULL(), check that the covered vnode belongs to nullfs. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/nullfs/null_vfsops.c Modified: head/sys/fs/nullfs/null_vfsops.c ============================================================================== --- head/sys/fs/nullfs/null_vfsops.c Fri Feb 8 08:15:29 2019 (r343897) +++ head/sys/fs/nullfs/null_vfsops.c Fri Feb 8 08:17:31 2019 (r343898) @@ -145,10 +145,13 @@ nullfs_mount(struct mount *mp) /* * Check multi null mount to avoid `lock against myself' panic. */ - if (lowerrootvp == VTONULL(mp->mnt_vnodecovered)->null_lowervp) { - NULLFSDEBUG("nullfs_mount: multi null mount?\n"); - vput(lowerrootvp); - return (EDEADLK); + if (mp->mnt_vnodecovered->v_op == &null_vnodeops) { + nn = VTONULL(mp->mnt_vnodecovered); + if (nn == NULL || lowerrootvp == nn->null_lowervp) { + NULLFSDEBUG("nullfs_mount: multi null mount?\n"); + vput(lowerrootvp); + return (EDEADLK); + } } xmp = (struct null_mount *) malloc(sizeof(struct null_mount), From owner-svn-src-head@freebsd.org Fri Feb 8 08:20:19 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0CAC14D8145; Fri, 8 Feb 2019 08:20:19 +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 5627E6EE6F; Fri, 8 Feb 2019 08:20: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 45757E6D0; Fri, 8 Feb 2019 08:20: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 x188KJFc024063; Fri, 8 Feb 2019 08:20:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x188KJpc024062; Fri, 8 Feb 2019 08:20:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902080820.x188KJpc024062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 8 Feb 2019 08:20:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343899 - head/sys/fs/nullfs X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/fs/nullfs X-SVN-Commit-Revision: 343899 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5627E6EE6F 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.97)[-0.967,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 08:20:19 -0000 Author: kib Date: Fri Feb 8 08:20:18 2019 New Revision: 343899 URL: https://svnweb.freebsd.org/changeset/base/343899 Log: Un null_vptocnp(), cache vp->v_mount and use it for null_nodeget() call. The vp vnode is unlocked during the execution of the VOP method and can be reclaimed, zeroing vp->v_data. Caching allows to use the correct mount point. Reported and tested by: pho PR: 235549 Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/nullfs/null_vnops.c Modified: head/sys/fs/nullfs/null_vnops.c ============================================================================== --- head/sys/fs/nullfs/null_vnops.c Fri Feb 8 08:17:31 2019 (r343898) +++ head/sys/fs/nullfs/null_vnops.c Fri Feb 8 08:20:18 2019 (r343899) @@ -870,11 +870,14 @@ null_vptocnp(struct vop_vptocnp_args *ap) struct vnode **dvp = ap->a_vpp; struct vnode *lvp, *ldvp; struct ucred *cred = ap->a_cred; + struct mount *mp; int error, locked; locked = VOP_ISLOCKED(vp); lvp = NULLVPTOLOWERVP(vp); vhold(lvp); + mp = vp->v_mount; + vfs_ref(mp); VOP_UNLOCK(vp, 0); /* vp is held by vn_vptocnp_locked that called us */ ldvp = lvp; vref(lvp); @@ -882,6 +885,7 @@ null_vptocnp(struct vop_vptocnp_args *ap) vdrop(lvp); if (error != 0) { vn_lock(vp, locked | LK_RETRY); + vfs_rel(mp); return (ENOENT); } @@ -893,9 +897,10 @@ null_vptocnp(struct vop_vptocnp_args *ap) if (error != 0) { vrele(ldvp); vn_lock(vp, locked | LK_RETRY); + vfs_rel(mp); return (ENOENT); } - error = null_nodeget(vp->v_mount, ldvp, dvp); + error = null_nodeget(mp, ldvp, dvp); if (error == 0) { #ifdef DIAGNOSTIC NULLVPTOLOWERVP(*dvp); @@ -903,6 +908,7 @@ null_vptocnp(struct vop_vptocnp_args *ap) VOP_UNLOCK(*dvp, 0); /* keep reference on *dvp */ } vn_lock(vp, locked | LK_RETRY); + vfs_rel(mp); return (error); } From owner-svn-src-head@freebsd.org Fri Feb 8 08:43:23 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 368A814D87E0; Fri, 8 Feb 2019 08:43:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 171FC6F99F; Fri, 8 Feb 2019 08:43:19 +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 mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 979F23D76BB; Fri, 8 Feb 2019 19:43:16 +1100 (AEDT) Date: Fri, 8 Feb 2019 19:43:15 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Will Andrews cc: Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325728 - head/lib/libkvm In-Reply-To: Message-ID: <20190208190822.N858@besplex.bde.org> References: <201711112330.vABNUwXC077395@repo.freebsd.org> <20190205202145.A1080@besplex.bde.org> <20190206024025.X3175@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=P6RKvmIu c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=KlU3YLH_MOuymiYzc3sA:9 a=g6LFLHbxATuY_eKi:21 a=pcqAwT0wR9KJ7_pO:21 a=CjuIK1q_8ugA:10 X-Rspamd-Queue-Id: 171FC6F99F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of brde@optusnet.com.au designates 211.29.132.42 as permitted sender) smtp.mailfrom=brde@optusnet.com.au X-Spamd-Result: default: False [-6.35 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; RCVD_IN_DNSWL_LOW(-0.10)[42.132.29.211.list.dnswl.org : 127.0.5.1]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:211.29.132.0/23]; FREEMAIL_FROM(0.00)[optusnet.com.au]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[optusnet.com.au]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: extmail.optusnet.com.au]; NEURAL_HAM_SHORT(-0.83)[-0.833,0]; IP_SCORE(-3.21)[ip: (-8.71), ipnet: 211.28.0.0/14(-4.07), asn: 4804(-3.23), country: AU(-0.04)]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[optusnet.com.au]; ASN(0.00)[asn:4804, ipnet:211.28.0.0/14, country:AU]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 08:43:23 -0000 On Wed, 6 Feb 2019, Will Andrews wrote: > On Tue, Feb 5, 2019 at 10:25 AM Bruce Evans wrote: > >> Signed kp_offset seems wrong. Apart from it not reaching the top of 64- >> bit address spaces, adding unsigned kp_len to it gives an unsigned type. > > It's appropriate, because in this context, we return page information > including addresses that would be valid pointer references, but are not > included in the core file. Minidumps omit large numbers of physical pages, > so calls to kvm_walk_pages() will generate large numbers of kvm_page > instances that have an offset of -1. off_t was already used internally for the return type of _kvm_pt_find(). .offset is initalized to _kvm_pt_find() using especially large style bugs (most of _kvm_visit_cb() is written in an initalizer). off_t is very inappropriate for small offsets from C pointers. ptrdiff_t would be right for that, except C99 mis-specify by only requiring it to hold up to +-65535, so on perverse implementations with ptrdiff_t = int17_t, subtraction of pointers into an object with more than 65535 elements gives undefined behaviour. In practice, ptrdiff_t is not perversely implemented but system code like vm can't use it because it only covers half the address space. kvm should uses its own type for this so as to not have to worry about signedness problems or the bloat of off_t or the unportability of ptrdiff_t. I rather like APIs which abuse the sign bit for an out of band error value, but this is not very appropriate. time_t is such an API, if it is broken to POSIX spec (not opaque) and is signed (because buggy code expects that). But only bad code compares with -1. The error value is (time_t)-1, as sometimes needed in implementations where time_t is unsigned. Not quite similarly for mmap(). Its error value is MMAP_FAILED which is (void *)-1 in FreeBSD. Both of these values may be in band. -1 is 1 before the Epoch in a time_t. POSIX doesn;t require this to work, but some libraries support it. C99 and POSIX are missing the specifications of errno necessary to detect if an in-band error value is an error for these functions and most others. off_t is signed, so an uncast -1 works right as an error value for lseek(). This is not a feature. -1 is in band for lseek() on devices on 64-bit arches on FreeBSD (this is a POSIX extension. IIRC, POSIX allows anything for devices). The magic -1's for time_t and mmap() are at least documented. struct kvm_page and its member 'offset' and kvm_walk_pages() are undocumented. I think time_t and mmap() were misdesigned originally but were improved a little by specifying a cast or a macro. MMAP_FAILED can't be just (void *)-1 on systems where the compiler objects to this case. Bruce From owner-svn-src-head@freebsd.org Fri Feb 8 11:50:00 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9CAA14DD726; Fri, 8 Feb 2019 11:50:00 +0000 (UTC) (envelope-from pluknet@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 6C28C7677C; Fri, 8 Feb 2019 11:50:00 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5ED0B18AFE; Fri, 8 Feb 2019 11:50:00 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18Bo0kq036456; Fri, 8 Feb 2019 11:50:00 GMT (envelope-from pluknet@FreeBSD.org) Received: (from pluknet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18Bo0V0036455; Fri, 8 Feb 2019 11:50:00 GMT (envelope-from pluknet@FreeBSD.org) Message-Id: <201902081150.x18Bo0V0036455@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pluknet set sender to pluknet@FreeBSD.org using -f From: Sergey Kandaurov Date: Fri, 8 Feb 2019 11:50:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343904 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: pluknet X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 343904 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6C28C7677C 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.943,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 11:50:01 -0000 Author: pluknet Date: Fri Feb 8 11:49:59 2019 New Revision: 343904 URL: https://svnweb.freebsd.org/changeset/base/343904 Log: Add macOS 10.14. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Fri Feb 8 10:31:45 2019 (r343903) +++ head/share/misc/bsd-family-tree Fri Feb 8 11:49:59 2019 (r343904) @@ -374,8 +374,8 @@ FreeBSD 5.2 | | | | | | | | | | | | | | | | DragonFly 5.2.2 | FreeBSD | | NetBSD 7.2 | | - | 11.2 | | | | | - | | | | OpenBSD 6.4 | + | 11.2 macOS | | | | + | 10.14 | | OpenBSD 6.4 | | | | | | DragonFly 5.4.0 *--FreeBSD | | v | | | 12.0 | | | DragonFly 5.4.1 @@ -756,6 +756,7 @@ DragonFly 5.2.2 2018-06-18 [DFB] FreeBSD 11.2 2018-06-27 [FBD] NetBSD 8.0 2018-07-17 [NBD] NetBSD 7.2 2018-08-29 [NBD] +macOS 10.14 2018-09-24 [APL] OpenBSD 6.4 2018-10-18 [OBD] DragonFly 5.4.0 2018-12-03 [DFB] FreeBSD 12.0 2018-12-11 [FBD] From owner-svn-src-head@freebsd.org Fri Feb 8 13:10:46 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7271014E0475; Fri, 8 Feb 2019 13:10:46 +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 16E6D81B09; Fri, 8 Feb 2019 13:10:46 +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 0A632198A7; Fri, 8 Feb 2019 13:10:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18DAjDC078479; Fri, 8 Feb 2019 13:10:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18DAjfS078478; Fri, 8 Feb 2019 13:10:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201902081310.x18DAjfS078478@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 8 Feb 2019 13:10:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343905 - head/usr.sbin/bluetooth/sdpd X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/usr.sbin/bluetooth/sdpd X-SVN-Commit-Revision: 343905 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 16E6D81B09 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.960,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 13:10:46 -0000 Author: hselasky Date: Fri Feb 8 13:10:45 2019 New Revision: 343905 URL: https://svnweb.freebsd.org/changeset/base/343905 Log: Improve Bluetooth device discovery support for Android and Microsoft devices. Tested using the virtual_bt_speaker(8) tool from the virtual_oss(8) project at github.com. PR: 210089 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/usr.sbin/bluetooth/sdpd/ssar.c Modified: head/usr.sbin/bluetooth/sdpd/ssar.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/ssar.c Fri Feb 8 11:49:59 2019 (r343904) +++ head/usr.sbin/bluetooth/sdpd/ssar.c Fri Feb 8 13:10:45 2019 (r343905) @@ -47,6 +47,131 @@ int32_t server_prepare_attr_list(provider_p const prov uint8_t *rsp, uint8_t const * const rsp_end); /* + * Scan an attribute for matching UUID. + */ +static int +server_search_uuid_sub(uint8_t *buf, uint8_t const * const eob, const uint128_t *uuid) +{ + int128_t duuid; + uint32_t value; + uint8_t type; + + while (buf < eob) { + + SDP_GET8(type, buf); + + switch (type) { + case SDP_DATA_UUID16: + if (buf + 2 > eob) + continue; + SDP_GET16(value, buf); + + memcpy(&duuid, &uuid_base, sizeof(duuid)); + duuid.b[2] = value >> 8 & 0xff; + duuid.b[3] = value & 0xff; + + if (memcmp(&duuid, uuid, sizeof(duuid)) == 0) + return (0); + break; + case SDP_DATA_UUID32: + if (buf + 4 > eob) + continue; + SDP_GET32(value, buf); + memcpy(&duuid, &uuid_base, sizeof(duuid)); + duuid.b[0] = value >> 24 & 0xff; + duuid.b[1] = value >> 16 & 0xff; + duuid.b[2] = value >> 8 & 0xff; + duuid.b[3] = value & 0xff; + + if (memcmp(&duuid, uuid, sizeof(duuid)) == 0) + return (0); + break; + case SDP_DATA_UUID128: + if (buf + 16 > eob) + continue; + SDP_GET_UUID128(&duuid, buf); + + if (memcmp(&duuid, uuid, sizeof(duuid)) == 0) + return (0); + break; + case SDP_DATA_UINT8: + case SDP_DATA_INT8: + case SDP_DATA_SEQ8: + buf++; + break; + case SDP_DATA_UINT16: + case SDP_DATA_INT16: + case SDP_DATA_SEQ16: + buf += 2; + break; + case SDP_DATA_UINT32: + case SDP_DATA_INT32: + case SDP_DATA_SEQ32: + buf += 4; + break; + case SDP_DATA_UINT64: + case SDP_DATA_INT64: + buf += 8; + break; + case SDP_DATA_UINT128: + case SDP_DATA_INT128: + buf += 16; + break; + case SDP_DATA_STR8: + if (buf + 1 > eob) + continue; + SDP_GET8(value, buf); + buf += value; + break; + case SDP_DATA_STR16: + if (buf + 2 > eob) + continue; + SDP_GET16(value, buf); + if (value > (eob - buf)) + return (1); + buf += value; + break; + case SDP_DATA_STR32: + if (buf + 4 > eob) + continue; + SDP_GET32(value, buf); + if (value > (eob - buf)) + return (1); + buf += value; + break; + case SDP_DATA_BOOL: + buf += 1; + break; + default: + return (1); + } + } + return (1); +} + +/* + * Search a provider for matching UUID in its attributes. + */ +static int +server_search_uuid(provider_p const provider, const uint128_t *uuid) +{ + uint8_t buffer[256]; + const attr_t *attr; + int len; + + for (attr = provider->profile->attrs; attr->create != NULL; attr++) { + + len = attr->create(buffer, buffer + sizeof(buffer), + (const uint8_t *)provider->profile, sizeof(*provider->profile)); + if (len < 0) + continue; + if (server_search_uuid_sub(buffer, buffer + len, uuid) == 0) + return (0); + } + return (1); +} + +/* * Prepare SDP Service Search Attribute Response */ @@ -225,7 +350,8 @@ server_prepare_service_search_attribute_response(serve puuid.b[3] = provider->profile->uuid; if (memcmp(&uuid, &puuid, sizeof(uuid)) != 0 && - memcmp(&uuid, &uuid_public_browse_group, sizeof(uuid)) != 0) + memcmp(&uuid, &uuid_public_browse_group, sizeof(uuid)) != 0 && + server_search_uuid(provider, &uuid) != 0) continue; cs = server_prepare_attr_list(provider, From owner-svn-src-head@freebsd.org Fri Feb 8 13:23:09 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 219CA14E0811; Fri, 8 Feb 2019 13:23:09 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from ecc03.stack.nl (ecc03.stack.nl [IPv6:2001:610:1108:5010::210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.stack.nl", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A7778243F; Fri, 8 Feb 2019 13:23:08 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mail02.stack.nl (blade.stack.nl [51.15.111.152]) by ecc03.stack.nl (Postfix) with ESMTPS id 5317E200F0; Fri, 8 Feb 2019 13:23:05 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail02.stack.nl (Postfix) with ESMTP id 23D7F241142; Fri, 8 Feb 2019 13:23:05 +0000 (UTC) Received: from mail02.stack.nl ([127.0.0.1]) by localhost (mail02.stack.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9BHVPuQm8qqh; Fri, 8 Feb 2019 13:23:01 +0000 (UTC) Received: from blade.stack.nl (blade.stack.nl [192.168.122.130]) by mail02.stack.nl (Postfix) with ESMTP id CDAE4240348; Fri, 8 Feb 2019 13:23:01 +0000 (UTC) Received: by blade.stack.nl (Postfix, from userid 1677) id A9C90201F0; Fri, 8 Feb 2019 14:23:01 +0100 (CET) Date: Fri, 8 Feb 2019 14:23:01 +0100 From: Jilles Tjoelker To: Konstantin Belousov , Ryan Moeller , Nash Kaminski Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343896 - head/sbin/dhclient Message-ID: <20190208132301.GA5715@stack.nl> References: <201902080736.x187a8LM002846@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201902080736.x187a8LM002846@repo.freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 13:23:09 -0000 On Fri, Feb 08, 2019 at 07:36:08AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Fri Feb 8 07:36:08 2019 > New Revision: 343896 > URL: https://svnweb.freebsd.org/changeset/base/343896 > Log: > Correctly return exit status from the exited process. > This is also OpenBSD rev. 1.117, as pointed out by > Ryan Moeller . > Submitted by: Nash Kaminski > MFC after: 1 week > Modified: > head/sbin/dhclient/dhclient.c > Modified: head/sbin/dhclient/dhclient.c > ============================================================================== > --- head/sbin/dhclient/dhclient.c Fri Feb 8 06:19:28 2019 (r343895) > +++ head/sbin/dhclient/dhclient.c Fri Feb 8 07:36:08 2019 (r343896) > @@ -2348,7 +2348,7 @@ priv_script_go(void) > if (ip) > script_flush_env(ip->client); > > - return (wstatus & 0xff); > + return WEXITSTATUS(wstatus); > } > > void This is probably a big improvement in practice, but it is still wrong if the script exits on a signal. POSIX does not say what the WEXITSTATUS macro returns in this case and in practice 0 is a common value. Perhaps you want return WIFEXITED(wstatus) ? WEXITSTATUS(wstatus) : 128 + WTERMSIG(wstatus); imitating what the shell does to translate a wait status into 8 bits? -- Jilles Tjoelker From owner-svn-src-head@freebsd.org Fri Feb 8 13:54:18 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE41D14E13DF; Fri, 8 Feb 2019 13:54:17 +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 8200583780; Fri, 8 Feb 2019 13:54:17 +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 7442E1A0F7; Fri, 8 Feb 2019 13:54:17 +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 x18DsHca004723; Fri, 8 Feb 2019 13:54:17 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18DsH7V004722; Fri, 8 Feb 2019 13:54:17 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201902081354.x18DsH7V004722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Fri, 8 Feb 2019 13:54:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343906 - head/usr.sbin/newsyslog X-SVN-Group: head X-SVN-Commit-Author: dab X-SVN-Commit-Paths: head/usr.sbin/newsyslog X-SVN-Commit-Revision: 343906 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8200583780 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_LONG(-1.00)[-0.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 13:54:18 -0000 Author: dab Date: Fri Feb 8 13:54:16 2019 New Revision: 343906 URL: https://svnweb.freebsd.org/changeset/base/343906 Log: Fix several Coverity-detected issues in newsyslog. - CID 1394815, CID 1305673: Dereference before null check - memory was allocated and the allocation checked for NULL with a call to errx() if it failed. Code below that was guaranteed that the pointer was non-NULL, but there was another check for NULL at the exit of the function (after the memory had already been referenced). Eliminate the useless NULL check. - CID 1007454, CID 1007453: Resource leak - The result of a strdup() was stored in a global variable and not freed before program exit. - CID 1007452: Resource leak - Storage intended to be allocated and returned to the caller was never freed. This was the result of a regression in the function signature introduced in r208648 (2010) (thanks for that find, @cem!). Fixed by altering the function signature and passing the allocated memory to the caller as intended. This also fixes PR158794. - CID 1008620: Logically dead code in newsyslog.c - This was a direct result of CID 1007452. Since the memory allocated as described there was not returned to the caller, a subsequent check for the memory having been allocated was dead code. Returning the memory re-animates the code that is the subject of this CID. - CID 1006131: Unused value - in parsing a configuration file, a pointer to the end of the last field was saved, but not used after that. Rewrite to use the pointer value. This could have been fixed by avoiding the assignment altogether, but this solutions more closely follows the pattern used in the preceding code. PR: 158794 Reported by: Coverity, Ken-ichi EZURA (PR158794) Reviewed by: cem, markj MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/newsyslog/newsyslog.c Modified: head/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.c Fri Feb 8 13:10:45 2019 (r343905) +++ head/usr.sbin/newsyslog/newsyslog.c Fri Feb 8 13:54:16 2019 (r343906) @@ -253,7 +253,7 @@ static const char *path_syslogpid = _PATH_SYSLOGPID; static struct cflist *get_worklist(char **files); static void parse_file(FILE *cf, struct cflist *work_p, struct cflist *glob_p, - struct conf_entry *defconf_p, struct ilist *inclist); + struct conf_entry **defconf, struct ilist *inclist); static void add_to_queue(const char *fname, struct ilist *inclist); static char *sob(char *p); static char *son(char *p); @@ -374,6 +374,8 @@ main(int argc, char **argv) while (wait(NULL) > 0 || errno == EINTR) ; + free(timefnamefmt); + free(requestor); return (0); } @@ -841,7 +843,7 @@ get_worklist(char **files) if (verbose) printf("Processing %s\n", inc->file); - parse_file(f, filelist, globlist, defconf, &inclist); + parse_file(f, filelist, globlist, &defconf, &inclist); (void) fclose(f); } @@ -858,7 +860,6 @@ get_worklist(char **files) if (defconf != NULL) free_entry(defconf); return (filelist); - /* NOTREACHED */ } /* @@ -915,7 +916,7 @@ get_worklist(char **files) * for a "glob" entry which does match. */ gmatch = 0; - if (verbose > 2 && globlist != NULL) + if (verbose > 2) printf("\t+ Checking globs for %s\n", *given); STAILQ_FOREACH(ent, globlist, cf_nextp) { fnres = fnmatch(ent->log, *given, FNM_PATHNAME); @@ -1046,7 +1047,7 @@ expand_globs(struct cflist *work_p, struct cflist *glo */ static void parse_file(FILE *cf, struct cflist *work_p, struct cflist *glob_p, - struct conf_entry *defconf_p, struct ilist *inclist) + struct conf_entry **defconf_p, struct ilist *inclist) { char line[BUFSIZ], *parse, *q; char *cp, *errline, *group; @@ -1137,12 +1138,12 @@ parse_file(FILE *cf, struct cflist *work_p, struct cfl working = init_entry(q, NULL); if (strcasecmp(DEFAULT_MARKER, q) == 0) { special = 1; - if (defconf_p != NULL) { + if (*defconf_p != NULL) { warnx("Ignoring duplicate entry for %s!", q); free_entry(working); continue; } - defconf_p = working; + *defconf_p = working; } q = parse = missing_field(sob(parse + 1), errline); @@ -1357,7 +1358,8 @@ no_trimat: q = NULL; else { q = parse = sob(parse + 1); /* Optional field */ - *(parse = son(parse)) = '\0'; + parse = son(parse); + *parse = '\0'; } working->sig = SIGHUP; @@ -2010,7 +2012,6 @@ do_zipwork(struct zipwork_entry *zwork) const char **args, *pgm_name, *pgm_path; char *zresult; - command = NULL; assert(zwork != NULL); assert(zwork->zw_conf != NULL); assert(zwork->zw_conf->compress > COMPRESS_NONE); @@ -2114,8 +2115,7 @@ do_zipwork(struct zipwork_entry *zwork) change_attrs(zresult, zwork->zw_conf); out: - if (command != NULL) - sbuf_delete(command); + sbuf_delete(command); free(args); free(zresult); } From owner-svn-src-head@freebsd.org Fri Feb 8 13:59:04 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3E7714E1A49; Fri, 8 Feb 2019 13:59:03 +0000 (UTC) (envelope-from dab0816@gmail.com) Received: from mail-it1-x129.google.com (mail-it1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D7AF183FE7; Fri, 8 Feb 2019 13:59:02 +0000 (UTC) (envelope-from dab0816@gmail.com) Received: by mail-it1-x129.google.com with SMTP id r6so9074970itk.0; Fri, 08 Feb 2019 05:59:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:mime-version:subject:date:references:to:in-reply-to :message-id; bh=qNVFX/P0dyPmPX5IWp2LJz5yVKKUAEyQhkBLZlumDsI=; b=YklC3ZPrFARMBZuoQR6qDjkY2VGYvotMVpgVraWQ10QTpY2IRfsuOywVmyHbZzy31i r5FKCHhIEmtiAaI+HchveKCmQKEsvtiNorZ2vf0cq20pceAiVhoh+jUopexcTL2O914Q XnM7b9E0H0a6wsmNeXiH1wLBsF891I21UFph2ESa6VK70McIw8FJEQvEUyw/tY9kp6vc dTPQe4bHY6nLsRnwKWeVI/wcTtlvDbdTPnTu0L/OvNMYsiZiD30ssaQqrdt0db9Jse0Y 01SNozbJzD+DX3/+cord9ZQez8/A/RoeavSHVtw4dr1aXdxp8jsSBj7fvnJKgs2qTj7q lipw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:mime-version:subject:date:references :to:in-reply-to:message-id; bh=qNVFX/P0dyPmPX5IWp2LJz5yVKKUAEyQhkBLZlumDsI=; b=KYXg2Gn+khzmZxXYVhd/0/CADV3Qdyxhm2rUSE9x0vml1OQsAAnvjiZi6JCH3BaG/V v773fTslzv4VP0Q421XnrI6y19WYi7tJYP/N8JYTIXine82Fyiqub8GCl1BQYUEgmDlp CnzUgT2B8YCTxkaEEriCuH1Om2wsWGFZg9hWVvTPzTHP0VW2ac+Kp1N9XuAC4cuH2tu2 cPCI88FKlK0tGYHGM1hhWqCvtb59ULpcIL+NRoptqiuHet+KyoIYuDE5CZIBskAXsIlo MXjZS3k8uxtp0WBj1RoP1krA1Qh4tZv3MQzOlxuKgM3141DjYMYN93nA3SlkFEbw7frG HPWw== X-Gm-Message-State: AHQUAuZm8wXckpv+Z32LD9ZkOcNUK9MuN+rgBcZFuzV1RHBJDl/JGp1j Lnom163xdCwx1sW3XxldOJBLqI2B X-Google-Smtp-Source: AHgI3Ibu83cl9U4QkYks8WMX6Tbpk98CKS+86oRlMMkqIUeyumgczL7OfhoHsAW4EDULNpc9lhX1fg== X-Received: by 2002:a02:ba91:: with SMTP id g17mr4573161jao.58.1549634341928; Fri, 08 Feb 2019 05:59:01 -0800 (PST) Received: from ?IPv6:2601:442:4580:3ee3:89fc:2d19:1502:6cf1? ([2601:442:4580:3ee3:89fc:2d19:1502:6cf1]) by smtp.gmail.com with ESMTPSA id f13sm953217iol.82.2019.02.08.05.59.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Feb 2019 05:59:01 -0800 (PST) Sender: David Bright From: David Bright X-Google-Original-From: David Bright Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: svn commit: r343906 - head/usr.sbin/newsyslog Date: Fri, 8 Feb 2019 07:58:59 -0600 References: <201902081354.x18DsH7V004722@repo.freebsd.org> To: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <201902081354.x18DsH7V004722@repo.freebsd.org> Message-Id: <0CF687EA-EFD2-478C-AEB7-57FDB951787F@FreeBSD.org> X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: D7AF183FE7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.92 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.991,0]; NEURAL_HAM_SHORT(-0.93)[-0.933,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 13:59:04 -0000 On Feb 8, 2019, at 7:54 AM, David Bright wrote: > > Author: dab > Date: Fri Feb 8 13:54:16 2019 > New Revision: 343906 > URL: https://svnweb.freebsd.org/changeset/base/343906 > > Log: > Fix several Coverity-detected issues in newsyslog. Oops: Differential Revision: https://reviews.freebsd.org/D19105 -- David Bright dab@FreeBSD.org From owner-svn-src-head@freebsd.org Fri Feb 8 14:23:28 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABBB714E2252; Fri, 8 Feb 2019 14:23:28 +0000 (UTC) (envelope-from nashkaminski@gmail.com) Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E4A684E5B; Fri, 8 Feb 2019 14:23:28 +0000 (UTC) (envelope-from nashkaminski@gmail.com) Received: by mail-wr1-x429.google.com with SMTP id r2so3721705wrv.10; Fri, 08 Feb 2019 06:23:28 -0800 (PST) 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=FeArLLQnqHCv2jkhvvfoCXeKFQLRa16+vbfK33WWZ28=; b=ZRdhp+DNdzOTW3EXDmfxYRgLpTQN8FMdkL65kVu/EiwAO+ILY1Ihz8wopvrUID3seK EvVb5DpGmDjQ0yuQ8q15s6A+iZfxLR75FOi21QQgIOnP3BG2eryl9MfsEEjTBb/zmuc0 O5ThxEnfGU6j2LvQsAhucexB5pws5Ll5mX/Xi9LLtm/i8RkjR7Dtghbf1wyaW764VkSm 7WuXnW5veTO9apuqBCi2qKtx5klM0UAvwuq+LFVFIDoA7SPEjsLPGOuA6kWXzvpmVdTR DduseOOGSDYSbLG4iYDSVxDRQ8S9AHUKdYju9ZQWpRjG9gscQrO0kuzKgfG9ekUojjOb BgWg== 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=FeArLLQnqHCv2jkhvvfoCXeKFQLRa16+vbfK33WWZ28=; b=KMTcim+/uCDpOtLDL15M1LvB2hgcNQ8h0EWW+0tC89hzqLeFR0CI4zRKEgUhpqi4IA k+g7SqaCvLH90AiocANhb/cZoXEILr5EfsyTi9njIf2roMakbJzrDoXvNjoCA6hY60Iu bxPN/gv5PH7dz2n+xjqVnnc8KbDxm0/QN4ndsakCQ0ScN8yNqkJke7cPMkNfjFsfsN+i Ve59grYr3rVzI2wdOPCyNrGDvuepu8QEUl4n23Fhw16D1KT0GxkTWyS/ZCo4Zzd24zVu Rux4qGrM9BB6Envsv04ryVIKySTwzX3r+L5PKRWVGx6cBLmiX1b3uWX0XvnLwzENEgtM sHMA== X-Gm-Message-State: AHQUAuZRg1lpuXVnmaDGDjCxF00XjSsMZ3nmUSI+Uy+4OWKn3wfa20op TLZFzO1oaaaSlzZ0L2SHhQ5wQmak0YRUFjR+b/+NfQ== X-Google-Smtp-Source: AHgI3Ia+UNJD7J0T294gSGVf91xQuuCtXkR8kd/WRFnAfaC2UNcfdrr6GG894ydC2SHlJEau6gYAYGnvO8XQyQbPBLk= X-Received: by 2002:adf:e284:: with SMTP id v4mr16285476wri.26.1549635806677; Fri, 08 Feb 2019 06:23:26 -0800 (PST) MIME-Version: 1.0 References: <201902080736.x187a8LM002846@repo.freebsd.org> <20190208132301.GA5715@stack.nl> In-Reply-To: <20190208132301.GA5715@stack.nl> From: Nash Kaminski Date: Fri, 8 Feb 2019 08:23:15 -0600 Message-ID: Subject: Re: svn commit: r343896 - head/sbin/dhclient To: Jilles Tjoelker Cc: Konstantin Belousov , Ryan Moeller , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 1E4A684E5B X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.92 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.992,0]; NEURAL_HAM_SHORT(-0.93)[-0.931,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 14:23:29 -0000 I would be in favor of Jilles' implementation as well, since fundamentally dhclient just tests for zero/nonzero exit status and therefore what is critical is making sure such status is nonzero in *any* failure case of dhclient-script, including abnormal termination via signal. - Nash On Fri, Feb 8, 2019, 7:23 AM Jilles Tjoelker On Fri, Feb 08, 2019 at 07:36:08AM +0000, Konstantin Belousov wrote: > > Author: kib > > Date: Fri Feb 8 07:36:08 2019 > > New Revision: 343896 > > URL: https://svnweb.freebsd.org/changeset/base/343896 > > > Log: > > Correctly return exit status from the exited process. > > > This is also OpenBSD rev. 1.117, as pointed out by > > Ryan Moeller . > > > Submitted by: Nash Kaminski > > MFC after: 1 week > > > Modified: > > head/sbin/dhclient/dhclient.c > > > Modified: head/sbin/dhclient/dhclient.c > > > ============================================================================== > > --- head/sbin/dhclient/dhclient.c Fri Feb 8 06:19:28 2019 > (r343895) > > +++ head/sbin/dhclient/dhclient.c Fri Feb 8 07:36:08 2019 > (r343896) > > @@ -2348,7 +2348,7 @@ priv_script_go(void) > > if (ip) > > script_flush_env(ip->client); > > > > - return (wstatus & 0xff); > > + return WEXITSTATUS(wstatus); > > } > > > > void > > This is probably a big improvement in practice, but it is still wrong if > the script exits on a signal. POSIX does not say what the WEXITSTATUS > macro returns in this case and in practice 0 is a common value. Perhaps > you want > > return WIFEXITED(wstatus) ? WEXITSTATUS(wstatus) : 128 + WTERMSIG(wstatus); > > imitating what the shell does to translate a wait status into 8 bits? > > -- > Jilles Tjoelker > From owner-svn-src-head@freebsd.org Fri Feb 8 14:31:45 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 445FA14E256E; Fri, 8 Feb 2019 14:31:45 +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 DC57F855FC; Fri, 8 Feb 2019 14:31:44 +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 C36121A6BC; Fri, 8 Feb 2019 14:31:44 +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 x18EViCI025544; Fri, 8 Feb 2019 14:31:44 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18EVirN025543; Fri, 8 Feb 2019 14:31:44 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201902081431.x18EVirN025543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 8 Feb 2019 14:31:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343909 - head/usr.bin/newkey X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/usr.bin/newkey X-SVN-Commit-Revision: 343909 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DC57F855FC 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.95)[-0.947,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 14:31:45 -0000 Author: avos Date: Fri Feb 8 14:31:44 2019 New Revision: 343909 URL: https://svnweb.freebsd.org/changeset/base/343909 Log: newkey(8): fix 'tmpname' memory leak (always) and input file descriptor leak when output file cannot be opened PR: 201732 Reported by: David Binderman MFC after: 1 week Modified: head/usr.bin/newkey/update.c Modified: head/usr.bin/newkey/update.c ============================================================================== --- head/usr.bin/newkey/update.c Fri Feb 8 14:27:25 2019 (r343908) +++ head/usr.bin/newkey/update.c Fri Feb 8 14:31:44 2019 (r343909) @@ -266,11 +266,14 @@ localupdate(char *name, char *filename, u_int op, u_in sprintf(tmpname, "%s.tmp", filename); rf = fopen(filename, "r"); if (rf == NULL) { - return (ERR_READ); + err = ERR_READ; + goto cleanup; } wf = fopen(tmpname, "w"); if (wf == NULL) { - return (ERR_WRITE); + fclose(rf); + err = ERR_WRITE; + goto cleanup; } err = -1; while (fgets(line, sizeof (line), rf)) { @@ -310,13 +313,18 @@ localupdate(char *name, char *filename, u_int op, u_in fclose(rf); if (err == 0) { if (rename(tmpname, filename) < 0) { - return (ERR_DBASE); + err = ERR_DBASE; + goto cleanup; } } else { if (unlink(tmpname) < 0) { - return (ERR_DBASE); + err = ERR_DBASE; + goto cleanup; } } + +cleanup: + free(tmpname); return (err); } From owner-svn-src-head@freebsd.org Fri Feb 8 14:56:29 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3996914E2C82; Fri, 8 Feb 2019 14:56:29 +0000 (UTC) (envelope-from mw@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 D18F9862F9; Fri, 8 Feb 2019 14:56:28 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BDEAA1AB79; Fri, 8 Feb 2019 14:56:28 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18EuSHj036225; Fri, 8 Feb 2019 14:56:28 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18EuSMi036224; Fri, 8 Feb 2019 14:56:28 GMT (envelope-from mw@FreeBSD.org) Message-Id: <201902081456.x18EuSMi036224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Fri, 8 Feb 2019 14:56:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343911 - head/stand/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: head/stand/efi/libefi X-SVN-Commit-Revision: 343911 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D18F9862F9 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)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.940,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 14:56:29 -0000 Author: mw Date: Fri Feb 8 14:56:28 2019 New Revision: 343911 URL: https://svnweb.freebsd.org/changeset/base/343911 Log: Allow reading the UEFI variable size When loading bigger variables form UEFI it is necessary to know their size beforehand, so that an appropriate amount of memory can be allocated. The easiest way to do this is to try to read the variable with buffer size equal 0, expecting EFI_BUFFER_TOO_SMALL error to be returned. Allow such possible approach in efi_getenv routine. Extracted from a bigger patch as suggested by imp. Submitted by: Kornel Duleba Obtained from: Semihalf Sponsored by: Stormshield Modified: head/stand/efi/libefi/efienv.c Modified: head/stand/efi/libefi/efienv.c ============================================================================== --- head/stand/efi/libefi/efienv.c Fri Feb 8 14:32:27 2019 (r343910) +++ head/stand/efi/libefi/efienv.c Fri Feb 8 14:56:28 2019 (r343911) @@ -48,7 +48,7 @@ efi_getenv(EFI_GUID *g, const char *v, void *data, siz return (EFI_OUT_OF_RESOURCES); dl = *len; rv = RS->GetVariable(uv, g, &attr, &dl, data); - if (rv == EFI_SUCCESS) + if (rv == EFI_SUCCESS || rv == EFI_BUFFER_TOO_SMALL) *len = dl; free(uv); return (rv); From owner-svn-src-head@freebsd.org Fri Feb 8 15:50:55 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43FA814E4234; Fri, 8 Feb 2019 15:50: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 39F9B883AF; Fri, 8 Feb 2019 15:50: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 x18Fok3R066653 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 8 Feb 2019 17:50:50 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x18Fok3R066653 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x18FokTR066652; Fri, 8 Feb 2019 17:50:46 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 8 Feb 2019 17:50:46 +0200 From: Konstantin Belousov To: Jilles Tjoelker Cc: Ryan Moeller , Nash Kaminski , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343896 - head/sbin/dhclient Message-ID: <20190208155046.GN24863@kib.kiev.ua> References: <201902080736.x187a8LM002846@repo.freebsd.org> <20190208132301.GA5715@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190208132301.GA5715@stack.nl> User-Agent: Mutt/1.11.2 (2019-01-07) 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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 15:50:55 -0000 On Fri, Feb 08, 2019 at 02:23:01PM +0100, Jilles Tjoelker wrote: > On Fri, Feb 08, 2019 at 07:36:08AM +0000, Konstantin Belousov wrote: > > Author: kib > > Date: Fri Feb 8 07:36:08 2019 > > New Revision: 343896 > > URL: https://svnweb.freebsd.org/changeset/base/343896 > > > Log: > > Correctly return exit status from the exited process. > > > This is also OpenBSD rev. 1.117, as pointed out by > > Ryan Moeller . > > > Submitted by: Nash Kaminski > > MFC after: 1 week > > > Modified: > > head/sbin/dhclient/dhclient.c > > > Modified: head/sbin/dhclient/dhclient.c > > ============================================================================== > > --- head/sbin/dhclient/dhclient.c Fri Feb 8 06:19:28 2019 (r343895) > > +++ head/sbin/dhclient/dhclient.c Fri Feb 8 07:36:08 2019 (r343896) > > @@ -2348,7 +2348,7 @@ priv_script_go(void) > > if (ip) > > script_flush_env(ip->client); > > > > - return (wstatus & 0xff); > > + return WEXITSTATUS(wstatus); > > } > > > > void > > This is probably a big improvement in practice, but it is still wrong if > the script exits on a signal. POSIX does not say what the WEXITSTATUS > macro returns in this case and in practice 0 is a common value. Perhaps > you want > > return WIFEXITED(wstatus) ? WEXITSTATUS(wstatus) : 128 + WTERMSIG(wstatus); > > imitating what the shell does to translate a wait status into 8 bits? Please commit your update. From owner-svn-src-head@freebsd.org Fri Feb 8 16:05:39 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DF6214E49AB; Fri, 8 Feb 2019 16:05:39 +0000 (UTC) (envelope-from tychon@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 A865288ED3; Fri, 8 Feb 2019 16:05:38 +0000 (UTC) (envelope-from tychon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A1141B75E; Fri, 8 Feb 2019 16:05:38 +0000 (UTC) (envelope-from tychon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18G5cRp072927; Fri, 8 Feb 2019 16:05:38 GMT (envelope-from tychon@FreeBSD.org) Received: (from tychon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18G5cDs072926; Fri, 8 Feb 2019 16:05:38 GMT (envelope-from tychon@FreeBSD.org) Message-Id: <201902081605.x18G5cDs072926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tychon set sender to tychon@FreeBSD.org using -f From: Tycho Nightingale Date: Fri, 8 Feb 2019 16:05:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343912 - head/sys/dev/pms/freebsd/driver/common X-SVN-Group: head X-SVN-Commit-Author: tychon X-SVN-Commit-Paths: head/sys/dev/pms/freebsd/driver/common X-SVN-Commit-Revision: 343912 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A865288ED3 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_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 16:05:39 -0000 Author: tychon Date: Fri Feb 8 16:05:38 2019 New Revision: 343912 URL: https://svnweb.freebsd.org/changeset/base/343912 Log: pms(4) should use bus_get_dma_tag() to get parent tag. Reviewed by: imp Sponsored by: Dell EMC Isilon Modified: head/sys/dev/pms/freebsd/driver/common/lxutil.c Modified: head/sys/dev/pms/freebsd/driver/common/lxutil.c ============================================================================== --- head/sys/dev/pms/freebsd/driver/common/lxutil.c Fri Feb 8 14:56:28 2019 (r343911) +++ head/sys/dev/pms/freebsd/driver/common/lxutil.c Fri Feb 8 16:05:38 2019 (r343912) @@ -63,7 +63,7 @@ STATIC agBOOLEAN agtiapi_typhAlloc( ag_card_info_t *th struct agtiapi_softc *pmsc = thisCardInst->pCard; int wait = 0; - if( bus_dma_tag_create( agNULL, // parent + if( bus_dma_tag_create( bus_get_dma_tag(pmsc->my_dev), // parent 32, // alignment 0, // boundary BUS_SPACE_MAXADDR, // lowaddr From owner-svn-src-head@freebsd.org Fri Feb 8 16:18:18 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CEC414B1224; Fri, 8 Feb 2019 16:18:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 B3341896EA; Fri, 8 Feb 2019 16:18:17 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A735E1B902; Fri, 8 Feb 2019 16:18:17 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18GIHbJ078236; Fri, 8 Feb 2019 16:18:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18GIHul078235; Fri, 8 Feb 2019 16:18:17 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201902081618.x18GIHul078235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 8 Feb 2019 16:18:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343913 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 343913 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B3341896EA 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.95)[-0.949,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 16:18:18 -0000 Author: andrew Date: Fri Feb 8 16:18:17 2019 New Revision: 343913 URL: https://svnweb.freebsd.org/changeset/base/343913 Log: Fix the spelling of cov_unregister_pc. When unregistering kcov from the coverage interface we should use the unregister function, not the register function. Sponsored by: DARPA, AFRL Modified: head/sys/kern/kern_kcov.c Modified: head/sys/kern/kern_kcov.c ============================================================================== --- head/sys/kern/kern_kcov.c Fri Feb 8 16:05:38 2019 (r343912) +++ head/sys/kern/kern_kcov.c Fri Feb 8 16:18:17 2019 (r343913) @@ -469,8 +469,8 @@ kcov_ioctl(struct cdev *dev, u_long cmd, caddr_t data, KASSERT(active_count > 0, ("%s: Open count is zero", __func__)); active_count--; if (active_count == 0) { - cov_register_pc(&trace_pc); - cov_register_cmp(&trace_cmp); + cov_unregister_pc(); + cov_unregister_cmp(); } td->td_kcov_info = NULL; @@ -505,8 +505,8 @@ kcov_thread_dtor(void *arg __unused, struct thread *td KASSERT(active_count > 0, ("%s: Open count is zero", __func__)); active_count--; if (active_count == 0) { - cov_register_pc(&trace_pc); - cov_register_cmp(&trace_cmp); + cov_unregister_pc(); + cov_unregister_cmp(); } td->td_kcov_info = NULL; if (info->state != KCOV_STATE_DYING) { From owner-svn-src-head@freebsd.org Fri Feb 8 17:57:40 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40CF814B76C0; Fri, 8 Feb 2019 17:57:40 +0000 (UTC) (envelope-from kai@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 D3D828C657; Fri, 8 Feb 2019 17:57:39 +0000 (UTC) (envelope-from kai@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C45D31C9F2; Fri, 8 Feb 2019 17:57:39 +0000 (UTC) (envelope-from kai@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18HvdL8029637; Fri, 8 Feb 2019 17:57:39 GMT (envelope-from kai@FreeBSD.org) Received: (from kai@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18Hvdfs029635; Fri, 8 Feb 2019 17:57:39 GMT (envelope-from kai@FreeBSD.org) Message-Id: <201902081757.x18Hvdfs029635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kai set sender to kai@FreeBSD.org using -f From: Kai Knoblich Date: Fri, 8 Feb 2019 17:57:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343915 - in head: share/misc usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: kai X-SVN-Commit-Paths: in head: share/misc usr.bin/calendar/calendars X-SVN-Commit-Revision: 343915 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D3D828C657 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]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 17:57:40 -0000 Author: kai (ports committer) Date: Fri Feb 8 17:57:39 2019 New Revision: 343915 URL: https://svnweb.freebsd.org/changeset/base/343915 Log: Add myself to committers-ports.dot and calendar.freebsd Reviewed by: miwi (mentor) Approved by: miwi (mentor) Differential Revision: https://reviews.freebsd.org/D19119 Modified: head/share/misc/committers-ports.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Fri Feb 8 16:38:30 2019 (r343914) +++ head/share/misc/committers-ports.dot Fri Feb 8 17:57:39 2019 (r343915) @@ -150,6 +150,7 @@ jsa [label="Joseph S. Atkinson\njsa@FreeBSD.org\n2010/ jsm [label="Jesper Schmitz Mouridsen\njsm@FreeBSD.org\n2018/06/30"] junovitch [label="Jason Unovitch\njunovitch@FreeBSD.org\n2015/07/27"] jylefort [label="Jean-Yves Lefort\njylefort@FreeBSD.org\n2005/04/12"] +kai [label="Kai Knoblich\nkai@FreeBSD.org\n2019/02/01"] kami [label="Dominic Fandrey\nkami@FreeBSD.org\n2014/09/09"] kbowling [label="Kevin Bowling\nkbowling@FreeBSD.org\n2018/09/02"] kevlo [label="Kevin Lo\nkevlo@FreeBSD.org\n2003/02/21"] @@ -476,6 +477,8 @@ jadawin -> wen joerg -> netchild +joneum -> kai + jrm -> dch jrm -> jwb @@ -573,6 +576,7 @@ miwi -> gahr miwi -> jhixson miwi -> joneum miwi -> jsm +miwi -> kai miwi -> kmoore miwi -> lme miwi -> makc @@ -714,6 +718,7 @@ tcberner -> yuri tcberner -> fernape tcberner -> arrowd tcberner -> rigoletto +tcberner -> kai thierry -> jadawin thierry -> riggs Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Fri Feb 8 16:38:30 2019 (r343914) +++ head/usr.bin/calendar/calendars/calendar.freebsd Fri Feb 8 17:57:39 2019 (r343915) @@ -170,6 +170,7 @@ 04/29 Adam Weinberger born in Berkeley, California, United States, 1980 04/29 Eric Anholt born in Portland, Oregon, United States, 1983 05/01 Randall Stewart born in Spokane, Washington, United States, 1959 +05/02 Kai Knoblich born in Hannover, Niedersachsen, Germany, 1982 05/02 Danilo G. Baio born in Maringa, Parana, Brazil, 1986 05/02 Wojciech A. Koszek born in Czestochowa, Poland, 1987 05/03 Brian Dean born in Elkins, West Virginia, United States, 1966 From owner-svn-src-head@freebsd.org Fri Feb 8 18:24:55 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BACF14BB0C6; Fri, 8 Feb 2019 18:24:55 +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 0F2028D4E1; Fri, 8 Feb 2019 18:24:55 +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 F3A931CF1A; Fri, 8 Feb 2019 18:24:54 +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 x18IOsTl045317; Fri, 8 Feb 2019 18:24:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18IOsHa045312; Fri, 8 Feb 2019 18:24:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201902081824.x18IOsHa045312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 8 Feb 2019 18:24:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343916 - in head: contrib/llvm/lib/Target/X86 lib/clang X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: contrib/llvm/lib/Target/X86 lib/clang X-SVN-Commit-Revision: 343916 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0F2028D4E1 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.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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 18:24:55 -0000 Author: dim Date: Fri Feb 8 18:24:53 2019 New Revision: 343916 URL: https://svnweb.freebsd.org/changeset/base/343916 Log: Pull in r352607 from upstream llvm trunk (by Craig Topper): [X86] Add FPSW as a Def on some FP instructions that were missing it. Pull in r353141 from upstream llvm trunk (by Craig Topper): [X86] Connect the default fpsr and dirflag clobbers in inline assembly to the registers we have defined for them. Summary: We don't currently map these constraints to physical register numbers so they don't make it to the MachineIR representation of inline assembly. This could have problems for proper dependency tracking in the machine schedulers though I don't have a test case that shows that. Reviewers: rnk Reviewed By: rnk Subscribers: eraman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57641 Pull in r353489 from upstream llvm trunk (by Craig Topper): [X86] Add FPCW as a register and start using it as an implicit use on floating point instructions. Summary: FPCW contains the rounding mode control which we manipulate to implement fp to integer conversion by changing the roudning mode, storing the value to the stack, and then changing the rounding mode back. Because we didn't model FPCW and its dependency chain, other instructions could be scheduled into the middle of the sequence. This patch introduces the register and adds it as an implciit def of FLDCW and implicit use of the FP binary arithmetic instructions and store instructions. There are more instructions that need to be updated, but this is a good start. I believe this fixes at least the reduced test case from PR40529. Reviewers: RKSimon, spatel, rnk, efriedma, andrew.w.kaylor Subscribers: dim, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57735 These should fix a problem in clang 7.0 where it would sometimes emit long double floating point instructions in a slightly wrong order, leading to failures in our libm tests. In particular, the cbrt_test test case 'cbrtl_powl' and the trig_test test case 'reduction'. Also bump __FreeBSD_cc_version, to be able to detect this in our test suite. Reported by: lwhsu PR: 234040 Upstream PR: https://bugs.llvm.org/show_bug.cgi?id=40206 MFC after: 1 week Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp head/contrib/llvm/lib/Target/X86/X86InstrFPStack.td head/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp head/contrib/llvm/lib/Target/X86/X86RegisterInfo.td head/lib/clang/freebsd_cc_version.h Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Fri Feb 8 17:57:39 2019 (r343915) +++ head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Fri Feb 8 18:24:53 2019 (r343916) @@ -40619,6 +40619,20 @@ X86TargetLowering::getRegForInlineAsmConstraint(const return Res; } + // dirflag -> DF + if (StringRef("{dirflag}").equals_lower(Constraint)) { + Res.first = X86::DF; + Res.second = &X86::DFCCRRegClass; + return Res; + } + + // fpsr -> FPSW + if (StringRef("{fpsr}").equals_lower(Constraint)) { + Res.first = X86::FPSW; + Res.second = &X86::FPCCRRegClass; + return Res; + } + // 'A' means [ER]AX + [ER]DX. if (Constraint == "A") { if (Subtarget.is64Bit()) { Modified: head/contrib/llvm/lib/Target/X86/X86InstrFPStack.td ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86InstrFPStack.td Fri Feb 8 17:57:39 2019 (r343915) +++ head/contrib/llvm/lib/Target/X86/X86InstrFPStack.td Fri Feb 8 18:24:53 2019 (r343916) @@ -230,7 +230,7 @@ def _FI32m : FPI<0xDA, fp, (outs), (ins i32mem:$src), } // mayLoad = 1, hasSideEffects = 1 } -let Defs = [FPSW] in { +let Defs = [FPSW], Uses = [FPCW] in { // FPBinary_rr just defines pseudo-instructions, no need to set a scheduling // resources. let hasNoSchedulingInfo = 1 in { @@ -267,7 +267,7 @@ class FPrST0PInst // NOTE: GAS and apparently all other AT&T style assemblers have a broken notion // of some of the 'reverse' forms of the fsub and fdiv instructions. As such, // we have to put some 'r's in and take them out of weird places. -let SchedRW = [WriteFAdd] in { +let SchedRW = [WriteFAdd], Defs = [FPSW], Uses = [FPCW] in { def ADD_FST0r : FPST0rInst ; def ADD_FrST0 : FPrST0Inst ; def ADD_FPrST0 : FPrST0PInst; @@ -278,16 +278,16 @@ def SUB_FST0r : FPST0rInst ; def SUBR_FrST0 : FPrST0Inst ; def SUBR_FPrST0 : FPrST0PInst; } // SchedRW -let SchedRW = [WriteFCom] in { +let SchedRW = [WriteFCom], Defs = [FPSW], Uses = [FPCW] in { def COM_FST0r : FPST0rInst ; def COMP_FST0r : FPST0rInst ; } // SchedRW -let SchedRW = [WriteFMul] in { +let SchedRW = [WriteFMul], Defs = [FPSW], Uses = [FPCW] in { def MUL_FST0r : FPST0rInst ; def MUL_FrST0 : FPrST0Inst ; def MUL_FPrST0 : FPrST0PInst; } // SchedRW -let SchedRW = [WriteFDiv] in { +let SchedRW = [WriteFDiv], Defs = [FPSW], Uses = [FPCW] in { def DIVR_FST0r : FPST0rInst ; def DIV_FrST0 : FPrST0Inst ; def DIV_FPrST0 : FPrST0PInst; @@ -307,7 +307,7 @@ def _Fp80 : FpI_<(outs RFP80:$dst), (ins RFP80:$src), def _F : FPI<0xD9, fp, (outs), (ins), asmstring>; } -let Defs = [FPSW] in { +let Defs = [FPSW], Uses = [FPCW] in { let SchedRW = [WriteFSign] in { defm CHS : FPUnary; @@ -335,7 +335,7 @@ def TST_F : FPI<0xD9, MRM_E4, (outs), (ins), "ftst">; // Versions of FP instructions that take a single memory operand. Added for the // disassembler; remove as they are included with patterns elsewhere. -let SchedRW = [WriteFComLd] in { +let SchedRW = [WriteFComLd], Defs = [FPSW], Uses = [FPCW] in { def FCOM32m : FPI<0xD8, MRM2m, (outs), (ins f32mem:$src), "fcom{s}\t$src">; def FCOMP32m : FPI<0xD8, MRM3m, (outs), (ins f32mem:$src), "fcomp{s}\t$src">; @@ -454,7 +454,7 @@ def ILD_Fp64m80: FpI_<(outs RFP80:$dst), (ins i64mem:$ [(set RFP80:$dst, (X86fild addr:$src, i64))]>; } // SchedRW -let SchedRW = [WriteStore] in { +let SchedRW = [WriteStore], Uses = [FPCW] in { def ST_Fp32m : FpIf32<(outs), (ins f32mem:$op, RFP32:$src), OneArgFP, [(store RFP32:$src, addr:$op)]>; def ST_Fp64m32 : FpIf64<(outs), (ins f32mem:$op, RFP64:$src), OneArgFP, @@ -489,7 +489,7 @@ def IST_Fp16m80 : FpI_<(outs), (ins i16mem:$op, RFP80 def IST_Fp32m80 : FpI_<(outs), (ins i32mem:$op, RFP80:$src), OneArgFP, []>; def IST_Fp64m80 : FpI_<(outs), (ins i64mem:$op, RFP80:$src), OneArgFP, []>; } // mayStore -} // SchedRW +} // SchedRW, Uses = [FPCW] let mayLoad = 1, SchedRW = [WriteLoad] in { def LD_F32m : FPI<0xD9, MRM0m, (outs), (ins f32mem:$src), "fld{s}\t$src">; @@ -499,7 +499,7 @@ def ILD_F16m : FPI<0xDF, MRM0m, (outs), (ins i16mem:$ def ILD_F32m : FPI<0xDB, MRM0m, (outs), (ins i32mem:$src), "fild{l}\t$src">; def ILD_F64m : FPI<0xDF, MRM5m, (outs), (ins i64mem:$src), "fild{ll}\t$src">; } -let mayStore = 1, SchedRW = [WriteStore] in { +let mayStore = 1, SchedRW = [WriteStore], Uses = [FPCW] in { def ST_F32m : FPI<0xD9, MRM2m, (outs), (ins f32mem:$dst), "fst{s}\t$dst">; def ST_F64m : FPI<0xDD, MRM2m, (outs), (ins f64mem:$dst), "fst{l}\t$dst">; def ST_FP32m : FPI<0xD9, MRM3m, (outs), (ins f32mem:$dst), "fstp{s}\t$dst">; @@ -513,7 +513,7 @@ def IST_FP64m : FPI<0xDF, MRM7m, (outs), (ins i64mem:$ } // FISTTP requires SSE3 even though it's a FPStack op. -let Predicates = [HasSSE3], SchedRW = [WriteStore] in { +let Predicates = [HasSSE3], SchedRW = [WriteStore], Uses = [FPCW] in { def ISTT_Fp16m32 : FpI_<(outs), (ins i16mem:$op, RFP32:$src), OneArgFP, [(X86fp_to_i16mem RFP32:$src, addr:$op)]>; def ISTT_Fp32m32 : FpI_<(outs), (ins i32mem:$op, RFP32:$src), OneArgFP, @@ -534,7 +534,7 @@ def ISTT_Fp64m80 : FpI_<(outs), (ins i64mem:$op, RFP80 [(X86fp_to_i64mem RFP80:$src, addr:$op)]>; } // Predicates = [HasSSE3] -let mayStore = 1, SchedRW = [WriteStore] in { +let mayStore = 1, SchedRW = [WriteStore], Uses = [FPCW] in { def ISTT_FP16m : FPI<0xDF, MRM1m, (outs), (ins i16mem:$dst), "fisttp{s}\t$dst">; def ISTT_FP32m : FPI<0xDB, MRM1m, (outs), (ins i32mem:$dst), "fisttp{l}\t$dst">; def ISTT_FP64m : FPI<0xDD, MRM1m, (outs), (ins i64mem:$dst), "fisttp{ll}\t$dst">; @@ -570,7 +570,7 @@ def LD_F0 : FPI<0xD9, MRM_EE, (outs), (ins), "fldz">; let SchedRW = [WriteFLD1] in def LD_F1 : FPI<0xD9, MRM_E8, (outs), (ins), "fld1">; -let SchedRW = [WriteFLDC], Defs = [FPSW] in { +let SchedRW = [WriteFLDC] in { def FLDL2T : I<0xD9, MRM_E9, (outs), (ins), "fldl2t", []>; def FLDL2E : I<0xD9, MRM_EA, (outs), (ins), "fldl2e", []>; def FLDPI : I<0xD9, MRM_EB, (outs), (ins), "fldpi", []>; @@ -579,7 +579,7 @@ def FLDLN2 : I<0xD9, MRM_ED, (outs), (ins), "fldln2", } // SchedRW // Floating point compares. -let SchedRW = [WriteFCom] in { +let SchedRW = [WriteFCom], Uses = [FPCW] in { def UCOM_Fpr32 : FpIf32<(outs), (ins RFP32:$lhs, RFP32:$rhs), CompareFP, [(set FPSW, (trunc (X86cmp RFP32:$lhs, RFP32:$rhs)))]>; def UCOM_Fpr64 : FpIf64<(outs), (ins RFP64:$lhs, RFP64:$rhs), CompareFP, @@ -591,16 +591,19 @@ def UCOM_Fpr80 : FpI_ <(outs), (ins RFP80:$lhs, RFP80 let SchedRW = [WriteFCom] in { // CC = ST(0) cmp ST(i) -let Defs = [EFLAGS, FPSW] in { -def UCOM_FpIr32: FpIf32<(outs), (ins RFP32:$lhs, RFP32:$rhs), CompareFP, - [(set EFLAGS, (X86cmp RFP32:$lhs, RFP32:$rhs))]>; -def UCOM_FpIr64: FpIf64<(outs), (ins RFP64:$lhs, RFP64:$rhs), CompareFP, - [(set EFLAGS, (X86cmp RFP64:$lhs, RFP64:$rhs))]>; +let Defs = [EFLAGS, FPSW], Uses = [FPCW] in { +def UCOM_FpIr32: FpI_<(outs), (ins RFP32:$lhs, RFP32:$rhs), CompareFP, + [(set EFLAGS, (X86cmp RFP32:$lhs, RFP32:$rhs))]>, + Requires<[FPStackf32, HasCMov]>; +def UCOM_FpIr64: FpI_<(outs), (ins RFP64:$lhs, RFP64:$rhs), CompareFP, + [(set EFLAGS, (X86cmp RFP64:$lhs, RFP64:$rhs))]>, + Requires<[FPStackf64, HasCMov]>; def UCOM_FpIr80: FpI_<(outs), (ins RFP80:$lhs, RFP80:$rhs), CompareFP, - [(set EFLAGS, (X86cmp RFP80:$lhs, RFP80:$rhs))]>; + [(set EFLAGS, (X86cmp RFP80:$lhs, RFP80:$rhs))]>, + Requires<[HasCMov]>; } -let Defs = [FPSW], Uses = [ST0] in { +let Defs = [FPSW], Uses = [ST0, FPCW] in { def UCOM_Fr : FPI<0xDD, MRM4r, // FPSW = cmp ST(0) with ST(i) (outs), (ins RST:$reg), "fucom\t$reg">; def UCOM_FPr : FPI<0xDD, MRM5r, // FPSW = cmp ST(0) with ST(i), pop @@ -609,14 +612,12 @@ def UCOM_FPPr : FPI<0xDA, MRM_E9, // cmp ST(0) (outs), (ins), "fucompp">; } -let Defs = [EFLAGS, FPSW], Uses = [ST0] in { +let Defs = [EFLAGS, FPSW], Uses = [ST0, FPCW] in { def UCOM_FIr : FPI<0xDB, MRM5r, // CC = cmp ST(0) with ST(i) (outs), (ins RST:$reg), "fucomi\t$reg">; def UCOM_FIPr : FPI<0xDF, MRM5r, // CC = cmp ST(0) with ST(i), pop (outs), (ins RST:$reg), "fucompi\t$reg">; -} -let Defs = [EFLAGS, FPSW] in { def COM_FIr : FPI<0xDB, MRM6r, (outs), (ins RST:$reg), "fcomi\t$reg">; def COM_FIPr : FPI<0xDF, MRM6r, (outs), (ins RST:$reg), "fcompi\t$reg">; } @@ -628,12 +629,12 @@ let Defs = [AX], Uses = [FPSW] in def FNSTSW16r : I<0xDF, MRM_E0, // AX = fp flags (outs), (ins), "fnstsw\t{%ax|ax}", [(set AX, (X86fp_stsw FPSW))]>; -let Defs = [FPSW] in +let Defs = [FPSW], Uses = [FPCW] in def FNSTCW16m : I<0xD9, MRM7m, // [mem16] = X87 control world (outs), (ins i16mem:$dst), "fnstcw\t$dst", [(X86fp_cwd_get16 addr:$dst)]>; } // SchedRW -let Defs = [FPSW], mayLoad = 1 in +let Defs = [FPSW,FPCW], mayLoad = 1 in def FLDCW16m : I<0xD9, MRM5m, // X87 control world = [mem16] (outs), (ins i16mem:$dst), "fldcw\t$dst", []>, Sched<[WriteLoad]>; Modified: head/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp Fri Feb 8 17:57:39 2019 (r343915) +++ head/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp Fri Feb 8 18:24:53 2019 (r343916) @@ -497,6 +497,9 @@ BitVector X86RegisterInfo::getReservedRegs(const Machi BitVector Reserved(getNumRegs()); const X86FrameLowering *TFI = getFrameLowering(MF); + // Set the floating point control register as reserved. + Reserved.set(X86::FPCW); + // Set the stack-pointer register and its aliases as reserved. for (MCSubRegIterator I(X86::RSP, this, /*IncludeSelf=*/true); I.isValid(); ++I) Modified: head/contrib/llvm/lib/Target/X86/X86RegisterInfo.td ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86RegisterInfo.td Fri Feb 8 17:57:39 2019 (r343915) +++ head/contrib/llvm/lib/Target/X86/X86RegisterInfo.td Fri Feb 8 18:24:53 2019 (r343916) @@ -288,7 +288,10 @@ def ST6 : X86Reg<"st(6)", 6>, DwarfRegNum<[39, 18, 17] def ST7 : X86Reg<"st(7)", 7>, DwarfRegNum<[40, 19, 18]>; // Floating-point status word -def FPSW : X86Reg<"fpsw", 0>; +def FPSW : X86Reg<"fpsr", 0>; + +// Floating-point control word +def FPCW : X86Reg<"fpcr", 0>; // Status flags register. // Modified: head/lib/clang/freebsd_cc_version.h ============================================================================== --- head/lib/clang/freebsd_cc_version.h Fri Feb 8 17:57:39 2019 (r343915) +++ head/lib/clang/freebsd_cc_version.h Fri Feb 8 18:24:53 2019 (r343916) @@ -1,3 +1,3 @@ /* $FreeBSD$ */ -#define FREEBSD_CC_VERSION 1300001 +#define FREEBSD_CC_VERSION 1300002 From owner-svn-src-head@freebsd.org Fri Feb 8 18:31:56 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0082614BB25B; Fri, 8 Feb 2019 18:31:56 +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 9530E8D92F; Fri, 8 Feb 2019 18:31:55 +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 8845F1CF95; Fri, 8 Feb 2019 18:31:55 +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 x18IVtvn050153; Fri, 8 Feb 2019 18:31:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18IVtoS050152; Fri, 8 Feb 2019 18:31:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201902081831.x18IVtoS050152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 8 Feb 2019 18:31:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343917 - in head: contrib/netbsd-tests/lib/libm lib/msun/tests X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: contrib/netbsd-tests/lib/libm lib/msun/tests X-SVN-Commit-Revision: 343917 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9530E8D92F 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.963,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 18:31:56 -0000 Author: dim Date: Fri Feb 8 18:31:54 2019 New Revision: 343917 URL: https://svnweb.freebsd.org/changeset/base/343917 Log: Amend r343442, by only expecting the lib.msun.cbrt_test.cbrtl_powl and trig_test.reduction test cases to fail, if the fixes from r343916 have not yet been applied to the base compiler. Reported by: lwhsu PR: 234040 Upstream PR: https://bugs.llvm.org/show_bug.cgi?id=40206 MFC after: 1 week Modified: head/contrib/netbsd-tests/lib/libm/t_cbrt.c head/lib/msun/tests/trig_test.c Modified: head/contrib/netbsd-tests/lib/libm/t_cbrt.c ============================================================================== --- head/contrib/netbsd-tests/lib/libm/t_cbrt.c Fri Feb 8 18:24:53 2019 (r343916) +++ head/contrib/netbsd-tests/lib/libm/t_cbrt.c Fri Feb 8 18:31:54 2019 (r343917) @@ -268,7 +268,8 @@ ATF_TC_BODY(cbrtl_powl, tc) long double y, z; size_t i; -#if defined(__amd64__) && defined(__clang__) && __clang_major__ >= 7 +#if defined(__amd64__) && defined(__clang__) && __clang_major__ >= 7 && \ + __FreeBSD_cc_version < 1300002 atf_tc_expect_fail("test fails with clang 7+ - bug 234040"); #endif Modified: head/lib/msun/tests/trig_test.c ============================================================================== --- head/lib/msun/tests/trig_test.c Fri Feb 8 18:24:53 2019 (r343916) +++ head/lib/msun/tests/trig_test.c Fri Feb 8 18:31:54 2019 (r343917) @@ -160,7 +160,8 @@ ATF_TC_BODY(reduction, tc) unsigned i; -#if defined(__amd64__) && defined(__clang__) && __clang_major__ >= 7 +#if defined(__amd64__) && defined(__clang__) && __clang_major__ >= 7 && \ + __FreeBSD_cc_version < 1300002 atf_tc_expect_fail("test fails with clang 7+ - bug 234040"); #endif From owner-svn-src-head@freebsd.org Fri Feb 8 19:19:32 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31BFD14BE73E; Fri, 8 Feb 2019 19:19:32 +0000 (UTC) (envelope-from cperciva@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 C588A8F17F; Fri, 8 Feb 2019 19:19:31 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA40B1D7E6; Fri, 8 Feb 2019 19:19:31 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18JJVwm071443; Fri, 8 Feb 2019 19:19:31 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18JJVNd071442; Fri, 8 Feb 2019 19:19:31 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201902081919.x18JJVNd071442@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Fri, 8 Feb 2019 19:19:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343918 - head/libexec/rc/rc.d X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/libexec/rc/rc.d X-SVN-Commit-Revision: 343918 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C588A8F17F 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.996,0]; NEURAL_HAM_LONG(-1.00)[-0.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 19:19:32 -0000 Author: cperciva Date: Fri Feb 8 19:19:31 2019 New Revision: 343918 URL: https://svnweb.freebsd.org/changeset/base/343918 Log: Teach /etc/rc.d/growfs how to handle systems running ZFS. There are many cases which this code does not handle (e.g. ZFS mirrors) but the code can handle the single-disk case -- so it's enough to take care of the "disk image which gets booted into a VM with a larger than expected disk" case for which this firstboot script was created. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D19095 Modified: head/libexec/rc/rc.d/growfs Modified: head/libexec/rc/rc.d/growfs ============================================================================== --- head/libexec/rc/rc.d/growfs Fri Feb 8 18:31:54 2019 (r343917) +++ head/libexec/rc/rc.d/growfs Fri Feb 8 19:19:31 2019 (r343918) @@ -49,7 +49,20 @@ rcvar="growfs_enable" growfs_start () { echo "Growing root partition to fill device" - rootdev=$(df / | tail -n 1 | awk '{ sub("/dev/", "", $1); print $1 }') + FSTYPE=$(mount -p | awk '{ if ( $2 == "/") { print $3 }}') + FSDEV=$(mount -p | awk '{ if ( $2 == "/") { print $1 }}') + case "$FSTYPE" in + ufs) + rootdev=${FSDEV#/dev/} + ;; + zfs) + pool=${FSDEV%%/*} + rootdev=$(zpool list -v $pool | tail -n 1 | awk '{ print $1 }') + ;; + *) + echo "Don't know how to grow root filesystem type: $FSTYPE" + return + esac if [ x"$rootdev" = x"${rootdev%/*}" ]; then # raw device rawdev="$rootdev" @@ -91,7 +104,14 @@ growfs_start () } }' dev="$rawdev" gpart commit "$rootdev" - growfs -y /dev/"$rootdev" + case "$FSTYPE" in + ufs) + growfs -y /dev/"$rootdev" + ;; + zfs) + zpool online -e $pool $rootdev + ;; + esac } load_rc_config $name From owner-svn-src-head@freebsd.org Fri Feb 8 20:34:48 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2812F14C3974; Fri, 8 Feb 2019 20:34:48 +0000 (UTC) (envelope-from pkelsey@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 C3B4A6AD51; Fri, 8 Feb 2019 20:34:47 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B7B0F1E5C2; Fri, 8 Feb 2019 20:34:47 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18KYlhq012809; Fri, 8 Feb 2019 20:34:47 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18KYl58012808; Fri, 8 Feb 2019 20:34:47 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201902082034.x18KYl58012808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Fri, 8 Feb 2019 20:34:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343919 - head/sys/dev/e1000 X-SVN-Group: head X-SVN-Commit-Author: pkelsey X-SVN-Commit-Paths: head/sys/dev/e1000 X-SVN-Commit-Revision: 343919 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C3B4A6AD51 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.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 20:34:48 -0000 Author: pkelsey Date: Fri Feb 8 20:34:47 2019 New Revision: 343919 URL: https://svnweb.freebsd.org/changeset/base/343919 Log: Fix em(4) interrupt routing When configured with more tx queues than rx queues, em_if_msix_intr_assign() was incorrectly routing the tx event interrupts. Reviewed by: erj, marius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D19070 Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Fri Feb 8 19:19:31 2019 (r343918) +++ head/sys/dev/e1000/if_em.c Fri Feb 8 20:34:47 2019 (r343919) @@ -1996,7 +1996,7 @@ em_if_msix_intr_assign(if_ctx_t ctx, int msix) &adapter->rx_queues[i % adapter->rx_num_queues].que_irq, IFLIB_INTR_TX, tx_que, tx_que->me, buf); - tx_que->msix = (vector % adapter->tx_num_queues); + tx_que->msix = (vector % adapter->rx_num_queues); /* * Set the bit to enable interrupt @@ -2009,9 +2009,9 @@ em_if_msix_intr_assign(if_ctx_t ctx, int msix) adapter->ims |= tx_que->eims; adapter->ivars |= (8 | tx_que->msix) << (8 + (i * 4)); } else if (adapter->hw.mac.type == e1000_82575) { - tx_que->eims = E1000_EICR_TX_QUEUE0 << (i % adapter->tx_num_queues); + tx_que->eims = E1000_EICR_TX_QUEUE0 << i; } else { - tx_que->eims = 1 << (i % adapter->tx_num_queues); + tx_que->eims = 1 << i; } } From owner-svn-src-head@freebsd.org Fri Feb 8 20:42:50 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBFB914C3D3C; Fri, 8 Feb 2019 20:42:50 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 6237A6B25A; Fri, 8 Feb 2019 20:42:50 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5565F1E772; Fri, 8 Feb 2019 20:42:50 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x18Kgoop018007; Fri, 8 Feb 2019 20:42:50 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18Kgod2018006; Fri, 8 Feb 2019 20:42:50 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201902082042.x18Kgod2018006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 8 Feb 2019 20:42:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343920 - head/sys/netinet/cc X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet/cc X-SVN-Commit-Revision: 343920 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6237A6B25A 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.996,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 20:42:50 -0000 Author: tuexen Date: Fri Feb 8 20:42:49 2019 New Revision: 343920 URL: https://svnweb.freebsd.org/changeset/base/343920 Log: Ensure that when using the TCP CDG congestion control and setting the sysctl variable net.inet.tcp.cc.cdg.smoothing_factor to 0, the smoothing is disabled. Without this patch, a division by zero orrurs. PR: 193762 Reviewed by: lstewart@, rrs@ MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D19071 Modified: head/sys/netinet/cc/cc_cdg.c Modified: head/sys/netinet/cc/cc_cdg.c ============================================================================== --- head/sys/netinet/cc/cc_cdg.c Fri Feb 8 20:34:47 2019 (r343919) +++ head/sys/netinet/cc/cc_cdg.c Fri Feb 8 20:42:49 2019 (r343920) @@ -592,7 +592,11 @@ cdg_ack_received(struct cc_var *ccv, uint16_t ack_type qdiff_min = ((long)(cdg_data->minrtt_in_rtt - cdg_data->minrtt_in_prevrtt) << D_P_E ); - calc_moving_average(cdg_data, qdiff_max, qdiff_min); + if (cdg_data->sample_q_size == 0) { + cdg_data->max_qtrend = qdiff_max; + cdg_data->min_qtrend = qdiff_min; + } else + calc_moving_average(cdg_data, qdiff_max, qdiff_min); /* Probabilistic backoff with respect to gradient. */ if (slowstart && qdiff_min > 0) From owner-svn-src-head@freebsd.org Fri Feb 8 22:10:41 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B22F14C83FF; Fri, 8 Feb 2019 22:10:41 +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 3E5B76F1CE; Fri, 8 Feb 2019 22:10:41 +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 036CC1F55F; Fri, 8 Feb 2019 22:10:41 +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 x18MAej1061831; Fri, 8 Feb 2019 22:10:40 GMT (envelope-from bcr@FreeBSD.org) Received: (from bcr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18MAeRT061830; Fri, 8 Feb 2019 22:10:40 GMT (envelope-from bcr@FreeBSD.org) Message-Id: <201902082210.x18MAeRT061830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bcr set sender to bcr@FreeBSD.org using -f From: Benedict Reuschling Date: Fri, 8 Feb 2019 22:10:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343921 - head/usr.sbin/pw X-SVN-Group: head X-SVN-Commit-Author: bcr X-SVN-Commit-Paths: head/usr.sbin/pw X-SVN-Commit-Revision: 343921 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3E5B76F1CE 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.996,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 22:10:41 -0000 Author: bcr (doc committer) Date: Fri Feb 8 22:10:40 2019 New Revision: 343921 URL: https://svnweb.freebsd.org/changeset/base/343921 Log: Add an example to pw.8 about how to add an existing user to a group. Instead of using pw to modify group membership, users often edit /etc/group by hand, which is discouraged. Provide an example of adding a user to the wheel group, which is a common use case. I'm using a different user here as in the previous example as that deleted the user (although the examples don't necessarily have to be followed in order). Reviewed by: rgrimes,0mp Approved by: 0mp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D19123 Modified: head/usr.sbin/pw/pw.8 Modified: head/usr.sbin/pw/pw.8 ============================================================================== --- head/usr.sbin/pw/pw.8 Fri Feb 8 20:42:49 2019 (r343920) +++ head/usr.sbin/pw/pw.8 Fri Feb 8 22:10:40 2019 (r343921) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 10, 2017 +.Dd February 8, 2019 .Dt PW 8 .Os .Sh NAME @@ -978,6 +978,12 @@ pw useradd -n gsmith -c "Glurmo Smith" -s /bin/csh -m Delete the gsmith user and their home directory, including contents. .Bd -literal -offset indent pw userdel -n gsmith -r +.Ed +.Pp +Add the existing user jsmith to the wheel group, +in addition to the other groups jsmith is already a member of. +.Bd -literal -offset indent +pw groupmod wheel -m jsmith .Ed .Sh EXIT STATUS The From owner-svn-src-head@freebsd.org Fri Feb 8 23:03:30 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E155314C9978; Fri, 8 Feb 2019 23:03:29 +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 72F8D71522; Fri, 8 Feb 2019 23:03:29 +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 5A6C91FFDF; Fri, 8 Feb 2019 23:03:29 +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 x18N3TZl093188; Fri, 8 Feb 2019 23:03:29 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x18N3TV7093187; Fri, 8 Feb 2019 23:03:29 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201902082303.x18N3TV7093187@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Fri, 8 Feb 2019 23:03:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343922 - head/sbin/dhclient X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: head/sbin/dhclient X-SVN-Commit-Revision: 343922 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 72F8D71522 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)[-0.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 23:03:30 -0000 Author: jilles Date: Fri Feb 8 23:03:28 2019 New Revision: 343922 URL: https://svnweb.freebsd.org/changeset/base/343922 Log: dhclient: Return non-zero status when script exits due to a signal r343896 made it such that a non-zero exit status was passed through, but was still wrong if the script exits on a signal. POSIX does not say what the WEXITSTATUS macro returns in this case and in practice 0 is a common value. Instead, translate the wait status into 8 bits the same way as the shell calculates $?. Reviewed by: kib, Nash Kaminski MFC after: 1 week Modified: head/sbin/dhclient/dhclient.c Modified: head/sbin/dhclient/dhclient.c ============================================================================== --- head/sbin/dhclient/dhclient.c Fri Feb 8 22:10:40 2019 (r343921) +++ head/sbin/dhclient/dhclient.c Fri Feb 8 23:03:28 2019 (r343922) @@ -2348,7 +2348,8 @@ priv_script_go(void) if (ip) script_flush_env(ip->client); - return WEXITSTATUS(wstatus); + return (WIFEXITED(wstatus) ? + WEXITSTATUS(wstatus) : 128 + WTERMSIG(wstatus)); } void From owner-svn-src-head@freebsd.org Sat Feb 9 01:49:55 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3B1114D17E2; Sat, 9 Feb 2019 01:49:54 +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 8A7AD76A21; Sat, 9 Feb 2019 01:49:54 +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 5F6AD21B1A; Sat, 9 Feb 2019 01:49:54 +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 x191ns19078314; Sat, 9 Feb 2019 01:49:54 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x191nsHT078313; Sat, 9 Feb 2019 01:49:54 GMT (envelope-from np@FreeBSD.org) Message-Id: <201902090149.x191nsHT078313@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 9 Feb 2019 01:49:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343923 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 343923 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8A7AD76A21 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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 01:49:55 -0000 Author: np Date: Sat Feb 9 01:49:53 2019 New Revision: 343923 URL: https://svnweb.freebsd.org/changeset/base/343923 Log: cxgbe(4): Delay the panic due to a fatal error by 30s. This lets information logged by the interrupt handler reach the system log before the system goes down. Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Feb 8 23:03:28 2019 (r343922) +++ head/sys/dev/cxgbe/t4_main.c Sat Feb 9 01:49:53 2019 (r343923) @@ -556,7 +556,7 @@ SYSCTL_INT(_hw_cxgbe, OID_AUTO, pcie_relaxed_ordering, static int t4_panic_on_fatal_err = 0; SYSCTL_INT(_hw_cxgbe, OID_AUTO, panic_on_fatal_err, CTLFLAG_RDTUN, - &t4_panic_on_fatal_err, 0, "panic on fatal firmware errors"); + &t4_panic_on_fatal_err, 0, "panic on fatal errors"); #ifdef TCP_OFFLOAD /* @@ -2562,6 +2562,16 @@ vcxgbe_detach(device_t dev) return (0); } +static struct callout fatal_callout; + +static void +delayed_panic(void *arg) +{ + struct adapter *sc = arg; + + panic("%s: panic on fatal error", device_get_nameunit(sc->dev)); +} + void t4_fatal_err(struct adapter *sc, bool fw_error) { @@ -2569,9 +2579,6 @@ t4_fatal_err(struct adapter *sc, bool fw_error) t4_shutdown_adapter(sc); log(LOG_ALERT, "%s: encountered fatal error, adapter stopped.\n", device_get_nameunit(sc->dev)); - if (t4_panic_on_fatal_err) - panic("panic requested on fatal error"); - if (fw_error) { ASSERT_SYNCHRONIZED_OP(sc); sc->flags |= ADAP_ERR; @@ -2580,6 +2587,12 @@ t4_fatal_err(struct adapter *sc, bool fw_error) sc->flags |= ADAP_ERR; ADAPTER_UNLOCK(sc); } + + if (t4_panic_on_fatal_err) { + log(LOG_ALERT, "%s: panic on fatal error after 30s", + device_get_nameunit(sc->dev)); + callout_reset(&fatal_callout, hz * 30, delayed_panic, sc); + } } void @@ -10685,6 +10698,7 @@ mod_event(module_t mod, int cmd, void *arg) do_smt_write_rpl); sx_init(&t4_list_lock, "T4/T5 adapters"); SLIST_INIT(&t4_list); + callout_init(&fatal_callout, 1); #ifdef TCP_OFFLOAD sx_init(&t4_uld_list_lock, "T4/T5 ULDs"); SLIST_INIT(&t4_uld_list); From owner-svn-src-head@freebsd.org Sat Feb 9 02:04:28 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6F0914D1E55; Sat, 9 Feb 2019 02:04:28 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 4A746772A5; Sat, 9 Feb 2019 02:04:28 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 36B6E21E82; Sat, 9 Feb 2019 02:04:28 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1924SrZ088802; Sat, 9 Feb 2019 02:04:28 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1924SF1088801; Sat, 9 Feb 2019 02:04:28 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201902090204.x1924SF1088801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 9 Feb 2019 02:04:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343924 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 343924 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4A746772A5 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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 02:04:29 -0000 Author: jhibbits Date: Sat Feb 9 02:04:27 2019 New Revision: 343924 URL: https://svnweb.freebsd.org/changeset/base/343924 Log: Correct the CPU target for powerpcspe The MPC8540 is actually e500v1, which doesn't have double-precision floating point support. The 8548 does, so use that as the CPU target. MFC after: 2 weeks Modified: head/share/mk/bsd.cpu.mk Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Sat Feb 9 01:49:53 2019 (r343923) +++ head/share/mk/bsd.cpu.mk Sat Feb 9 02:04:27 2019 (r343924) @@ -135,7 +135,7 @@ _CPUCFLAGS = -Wa,-me500 -msoft-float _CPUCFLAGS = -mcpu=${CPUTYPE} -mno-powerpc64 . endif . elif ${MACHINE_ARCH} == "powerpcspe" -_CPUCFLAGS = -Wa,-me500 -mspe=yes -mabi=spe -mfloat-gprs=double +_CPUCFLAGS = -Wa,-me500 -mspe=yes -mabi=spe -mfloat-gprs=double -mcpu=8548 . elif ${MACHINE_ARCH} == "powerpc64" _CPUCFLAGS = -mcpu=${CPUTYPE} . elif ${MACHINE_CPUARCH} == "mips" @@ -362,7 +362,7 @@ CFLAGS += -mfloat-abi=softfp .endif .if ${MACHINE_ARCH} == "powerpcspe" -CFLAGS += -mcpu=8540 -Wa,-me500 -mspe=yes -mabi=spe -mfloat-gprs=double +CFLAGS += -mcpu=8548 -Wa,-me500 -mspe=yes -mabi=spe -mfloat-gprs=double .endif .if ${MACHINE_CPUARCH} == "riscv" From owner-svn-src-head@freebsd.org Sat Feb 9 03:00:01 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E59514D3A88; Sat, 9 Feb 2019 03:00:01 +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 0DC2480D33; Sat, 9 Feb 2019 03:00:01 +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 0130C22746; Sat, 9 Feb 2019 03:00:01 +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 x193000i015585; Sat, 9 Feb 2019 03:00:00 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x193004J015584; Sat, 9 Feb 2019 03:00:00 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201902090300.x193004J015584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sat, 9 Feb 2019 03:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343927 - head/sys/netgraph X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/netgraph X-SVN-Commit-Revision: 343927 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0DC2480D33 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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 03:00:01 -0000 Author: glebius Date: Sat Feb 9 03:00:00 2019 New Revision: 343927 URL: https://svnweb.freebsd.org/changeset/base/343927 Log: Remove remnants of byte order manipulation, back when FreeBSD stack stored packets in host byte order. Modified: head/sys/netgraph/ng_ipfw.c Modified: head/sys/netgraph/ng_ipfw.c ============================================================================== --- head/sys/netgraph/ng_ipfw.c Sat Feb 9 02:10:03 2019 (r343926) +++ head/sys/netgraph/ng_ipfw.c Sat Feb 9 03:00:00 2019 (r343927) @@ -288,7 +288,6 @@ static int ng_ipfw_input(struct mbuf **m0, int dir, struct ip_fw_args *fwa, int tee) { struct mbuf *m; - struct ip *ip; hook_p hook; int error = 0; @@ -329,8 +328,6 @@ ng_ipfw_input(struct mbuf **m0, int dir, struct ip_fw_ if (m->m_len < sizeof(struct ip) && (m = m_pullup(m, sizeof(struct ip))) == NULL) return (EINVAL); - - ip = mtod(m, struct ip *); NG_SEND_DATA_ONLY(error, hook, m); From owner-svn-src-head@freebsd.org Sat Feb 9 03:51:53 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5249814D52A4; Sat, 9 Feb 2019 03:51:53 +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 EB67882B17; Sat, 9 Feb 2019 03:51:52 +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 BC8742311F; Sat, 9 Feb 2019 03:51:52 +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 x193pq5V047586; Sat, 9 Feb 2019 03:51:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x193pqIn047583; Sat, 9 Feb 2019 03:51:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902090351.x193pqIn047583@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 9 Feb 2019 03:51:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343928 - in head/sys: compat/freebsd32 sys vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: compat/freebsd32 sys vm X-SVN-Commit-Revision: 343928 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EB67882B17 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]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 03:51:53 -0000 Author: kib Date: Sat Feb 9 03:51:51 2019 New Revision: 343928 URL: https://svnweb.freebsd.org/changeset/base/343928 Log: Normalize the declaration of i386_read_exec variable. It is currently re-declared in sys/sysent.h which is a wrong place for MD variable. Which causes redeclaration error with gcc when sys/sysent.h and machine/md_var.h are included both. Remove it from sys/sysent.h and instead include machine/md_var.h when needed, under #ifdef for both i386 and amd64. Reported and tested by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/sys/sysent.h head/sys/vm/vm_mmap.c head/sys/vm/vm_unix.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Sat Feb 9 03:00:00 2019 (r343927) +++ head/sys/compat/freebsd32/freebsd32_misc.c Sat Feb 9 03:51:51 2019 (r343928) @@ -106,6 +106,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef __amd64__ +#include +#endif #include Modified: head/sys/sys/sysent.h ============================================================================== --- head/sys/sys/sysent.h Sat Feb 9 03:00:00 2019 (r343927) +++ head/sys/sys/sysent.h Sat Feb 9 03:51:51 2019 (r343928) @@ -163,10 +163,6 @@ extern struct sysentvec aout_sysvec; extern struct sysent sysent[]; extern const char *syscallnames[]; -#if defined(__amd64__) -extern int i386_read_exec; -#endif - #define NO_SYSCALL (-1) struct module; Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Sat Feb 9 03:00:00 2019 (r343927) +++ head/sys/vm/vm_mmap.c Sat Feb 9 03:51:51 2019 (r343928) @@ -74,6 +74,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if defined(__amd64__) || defined(__i386__) /* for i386_read_exec */ +#include +#endif #include #include Modified: head/sys/vm/vm_unix.c ============================================================================== --- head/sys/vm/vm_unix.c Sat Feb 9 03:00:00 2019 (r343927) +++ head/sys/vm/vm_unix.c Sat Feb 9 03:51:51 2019 (r343928) @@ -55,6 +55,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if defined(__amd64__) || defined(__i386__) /* for i386_read_exec */ +#include +#endif #include #include From owner-svn-src-head@freebsd.org Sat Feb 9 03:56:49 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AD6014D55A4; Sat, 9 Feb 2019 03:56: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 CAE0582F97; Sat, 9 Feb 2019 03:56: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 BEAE92326E; Sat, 9 Feb 2019 03:56: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 x193umoF048000; Sat, 9 Feb 2019 03:56:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x193umxU047998; Sat, 9 Feb 2019 03:56:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902090356.x193umxU047998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 9 Feb 2019 03:56:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343929 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 343929 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CAE0582F97 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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 03:56:49 -0000 Author: kib Date: Sat Feb 9 03:56:48 2019 New Revision: 343929 URL: https://svnweb.freebsd.org/changeset/base/343929 Log: i386: honor kern.elf32.read_exec for ommap(2) and break(2), as already done on amd64. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_mmap.c head/sys/vm/vm_unix.c Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Sat Feb 9 03:51:51 2019 (r343928) +++ head/sys/vm/vm_mmap.c Sat Feb 9 03:56:48 2019 (r343929) @@ -414,12 +414,10 @@ ommap(struct thread *td, struct ommap_args *uap) #define OMAP_FIXED 0x0100 prot = cvtbsdprot[uap->prot & 0x7]; -#ifdef COMPAT_FREEBSD32 -#if defined(__amd64__) +#if (defined(COMPAT_FREEBSD32) && defined(__amd64__)) || defined(__i386__) if (i386_read_exec && SV_PROC_FLAG(td->td_proc, SV_ILP32) && prot != 0) prot |= PROT_EXEC; -#endif #endif flags = 0; if (uap->flags & OMAP_ANON) Modified: head/sys/vm/vm_unix.c ============================================================================== --- head/sys/vm/vm_unix.c Sat Feb 9 03:51:51 2019 (r343928) +++ head/sys/vm/vm_unix.c Sat Feb 9 03:56:48 2019 (r343929) @@ -180,11 +180,9 @@ kern_break(struct thread *td, uintptr_t *addr) } #endif prot = VM_PROT_RW; -#ifdef COMPAT_FREEBSD32 -#if defined(__amd64__) +#if (defined(COMPAT_FREEBSD32) && defined(__amd64__)) || defined(__i386__) if (i386_read_exec && SV_PROC_FLAG(td->td_proc, SV_ILP32)) prot |= VM_PROT_EXECUTE; -#endif #endif rv = vm_map_insert(map, NULL, 0, old, new, prot, VM_PROT_ALL, 0); if (rv != KERN_SUCCESS) { From owner-svn-src-head@freebsd.org Sat Feb 9 04:36:03 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9335514D6A35; Sat, 9 Feb 2019 04:36:03 +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 324A284723; Sat, 9 Feb 2019 04:36:03 +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 25EED239F7; Sat, 9 Feb 2019 04:36:03 +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 x194a3ro069608; Sat, 9 Feb 2019 04:36:03 GMT (envelope-from ygy@FreeBSD.org) Received: (from ygy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x194a3ws069607; Sat, 9 Feb 2019 04:36:03 GMT (envelope-from ygy@FreeBSD.org) Message-Id: <201902090436.x194a3ws069607@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ygy set sender to ygy@FreeBSD.org using -f From: Guangyuan Yang Date: Sat, 9 Feb 2019 04:36:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343930 - head/sbin/sysctl X-SVN-Group: head X-SVN-Commit-Author: ygy X-SVN-Commit-Paths: head/sbin/sysctl X-SVN-Commit-Revision: 343930 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 324A284723 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.996,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 04:36:03 -0000 Author: ygy (doc committer) Date: Sat Feb 9 04:36:02 2019 New Revision: 343930 URL: https://svnweb.freebsd.org/changeset/base/343930 Log: Remove -R option which was added to sysctl(8) man page per r244106, but it is not implemented. MFC after: 3 days Submitted by: Alfonso Siciliano Reviewed by: 0mp, imp Differential Revision: https://reviews.freebsd.org/D19012 Modified: head/sbin/sysctl/sysctl.8 Modified: head/sbin/sysctl/sysctl.8 ============================================================================== --- head/sbin/sysctl/sysctl.8 Sat Feb 9 03:56:48 2019 (r343929) +++ head/sbin/sysctl/sysctl.8 Sat Feb 9 04:36:02 2019 (r343930) @@ -28,7 +28,7 @@ .\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd September 24, 2018 +.Dd February 8, 2019 .Dt SYSCTL 8 .Os .Sh NAME @@ -36,13 +36,13 @@ .Nd get or set kernel state .Sh SYNOPSIS .Nm -.Op Fl bdehiNnoRTtqx +.Op Fl bdehiNnoTtqWx .Op Fl B Ar bufsize .Op Fl f Ar filename .Ar name Ns Op = Ns Ar value Ns Op , Ns Ar value .Ar ... .Nm -.Op Fl bdehNnoRTtqx +.Op Fl bdehNnoTtqWx .Op Fl B Ar bufsize .Fl a .Sh DESCRIPTION From owner-svn-src-head@freebsd.org Sat Feb 9 11:58:42 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E482A14DF538; Sat, 9 Feb 2019 11:58:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 870BC8F931; Sat, 9 Feb 2019 11:58:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 57E064F6; Sat, 9 Feb 2019 11:58:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x19Bwfbg096691; Sat, 9 Feb 2019 11:58:41 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x19BwfMK096689; Sat, 9 Feb 2019 11:58:41 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201902091158.x19BwfMK096689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sat, 9 Feb 2019 11:58:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343934 - head/sys/dev/e1000 X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/sys/dev/e1000 X-SVN-Commit-Revision: 343934 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 870BC8F931 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.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 11:58:42 -0000 Author: marius Date: Sat Feb 9 11:58:40 2019 New Revision: 343934 URL: https://svnweb.freebsd.org/changeset/base/343934 Log: - Remove the redundant device disabled hint handling; ever since r241119 that's performed globally by device_attach(9). - As for the EM-class of devices, em(4) supports multiple queues and MSI-X respectively only with 82574 devices. However, since the conversion to iflib(4), em(4) relies on the interrupt type fallback mechanism, i. e. MSI-X -> MSI -> INTx, of iflib(4) to figure out the interrupt type to use for the EM-class (as well as the IGB-class) of MACs. Moreover, despite the datasheet for 82583V not mentioning any support of MSI-X, there actually are 82583V devices out there that report a varying number of MSI-X messages as supported. The interrupt type fallback of iflib(4) is causing two failure modes depending on the actual number of MSI-X messages supported for such instances of 82583V: 1) With only one MSI-X message supported, none is left for the RX/TX queues as that one message gets assigned to the admin interrupt. Worse, later on - which will be addressed with a separate fix - iflib(4) interprets that one messages as MSI or INTx to be set up, but fails to actually do so as it has previously called pci_alloc_msix(9). [1, 2] 2) With more message supported, their distribution is okay but then em_if_msix_intr_assign() doesn't work for 82583V, with the interface being left in a non-working state, too. [3] Thus, let em_if_attach_pre() indicate to iflib(4) to try MSI-X with 82574 only, and at most MSI for the remainder of EM-class devices. While at it, remove "try_second_bar" as it's polarity inverted and not actually needed. - Remove code from em_if_timer() that effectively is a NOP since the conversion to iflib(4) ("trigger" is no longer read). While at it, let the comment for em_if_timer() reflect reality after said conversion. - Implement an ifdi_watchdog_reset method which only updates the em(4) "watchdog_events" counter but doesn't perform any reset, so that the em(4) "watchdog_timeouts" SYSCTL (iflib(4) doesn't provide a counterpart) reflects reality and these timeouts add to IFCOUNTER_OERRORS again after the iflib(4) conversion. - Remove the "mbuf_defrag_fail" and "tx_dma_fail" SYSCTLS; since the iflib(4) conversion, associated counters are disconnected, but iflib(4) provides "mbuf_defrag_failed" and "tx_map_failed" respectively as equivalents. - Move the description preceding lem_smartspeed() to the correct spot before em_reset() and bring back appropriate comments for {igb,em}_initialize_rss_mapping() and lem_smartspeed() lost in the iflib(4) conversion. - Adapt some other function descriptions and INIT_DEBUGOUT() use to match reality after the iflib(4) conversion. - Put the debugging message of em_enable_vectors_82574() (missed in r343578) under bootverbose, too. PR: 219428 [1], 235246 [2], 235147 [3] Reviewed by: erj (previous version) Differential Revision: https://reviews.freebsd.org/D19108 Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Sat Feb 9 11:51:59 2019 (r343933) +++ head/sys/dev/e1000/if_em.c Sat Feb 9 11:58:40 2019 (r343934) @@ -249,6 +249,7 @@ static int em_if_mtu_set(if_ctx_t ctx, uint32_t mtu); static void em_if_timer(if_ctx_t ctx, uint16_t qid); static void em_if_vlan_register(if_ctx_t ctx, u16 vtag); static void em_if_vlan_unregister(if_ctx_t ctx, u16 vtag); +static void em_if_watchdog_reset(if_ctx_t ctx); static void em_identify_hardware(if_ctx_t ctx); static int em_allocate_pci_resources(if_ctx_t ctx); @@ -386,6 +387,7 @@ static device_method_t em_if_methods[] = { DEVMETHOD(ifdi_mtu_set, em_if_mtu_set), DEVMETHOD(ifdi_promisc_set, em_if_set_promisc), DEVMETHOD(ifdi_timer, em_if_timer), + DEVMETHOD(ifdi_watchdog_reset, em_if_watchdog_reset), DEVMETHOD(ifdi_vlan_register, em_if_vlan_register), DEVMETHOD(ifdi_vlan_unregister, em_if_vlan_unregister), DEVMETHOD(ifdi_get_counter, em_if_get_counter), @@ -721,7 +723,6 @@ em_set_num_queues(if_ctx_t ctx) * * return 0 on success, positive on failure *********************************************************************/ - static int em_if_attach_pre(if_ctx_t ctx) { @@ -731,15 +732,10 @@ em_if_attach_pre(if_ctx_t ctx) struct e1000_hw *hw; int error = 0; - INIT_DEBUGOUT("em_if_attach_pre begin"); + INIT_DEBUGOUT("em_if_attach_pre: begin"); dev = iflib_get_dev(ctx); adapter = iflib_get_softc(ctx); - if (resource_disabled("em", device_get_unit(dev))) { - device_printf(dev, "Disabled by device hint\n"); - return (ENXIO); - } - adapter->ctx = adapter->osdep.ctx = ctx; adapter->dev = adapter->osdep.dev = dev; scctx = adapter->shared = iflib_get_softc_ctx(ctx); @@ -777,7 +773,6 @@ em_if_attach_pre(if_ctx_t ctx) /* Determine hardware and mac info */ em_identify_hardware(ctx); - scctx->isc_msix_bar = PCIR_BAR(EM_MSIX_BAR); scctx->isc_tx_nsegments = EM_MAX_SCATTER; scctx->isc_nrxqsets_max = scctx->isc_ntxqsets_max = em_set_num_queues(ctx); if (bootverbose) @@ -785,8 +780,6 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_ntxqsets_max); if (adapter->hw.mac.type >= igb_mac_min) { - int try_second_bar; - scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * sizeof(union e1000_adv_tx_desc), EM_DBA_ALIGN); scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_adv_rx_desc), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(union e1000_adv_tx_desc); @@ -800,14 +793,13 @@ em_if_attach_pre(if_ctx_t ctx) CSUM_IP6_TCP | CSUM_IP6_UDP; if (adapter->hw.mac.type != e1000_82575) scctx->isc_tx_csum_flags |= CSUM_SCTP | CSUM_IP6_SCTP; - /* ** Some new devices, as with ixgbe, now may ** use a different BAR, so we need to keep ** track of which is used. */ - try_second_bar = pci_read_config(dev, scctx->isc_msix_bar, 4); - if (try_second_bar == 0) + scctx->isc_msix_bar = PCIR_BAR(EM_MSIX_BAR); + if (pci_read_config(dev, scctx->isc_msix_bar, 4) == 0) scctx->isc_msix_bar += 4; } else if (adapter->hw.mac.type >= em_mac_min) { scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0]* sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); @@ -837,6 +829,16 @@ em_if_attach_pre(if_ctx_t ctx) */ scctx->isc_capenable &= ~(IFCAP_TSO4 | IFCAP_VLAN_HWTSO); scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_IP_TSO; + /* + * We support MSI-X with 82574 only, but indicate to iflib(4) + * that it shall give MSI at least a try with other devices. + */ + if (adapter->hw.mac.type == e1000_82574) { + scctx->isc_msix_bar = PCIR_BAR(EM_MSIX_BAR); + } else { + scctx->isc_msix_bar = -1; + scctx->isc_disable_msix = 1; + } } else { scctx->isc_txqsizes[0] = roundup2((scctx->isc_ntxd[0] + 1) * sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); scctx->isc_rxqsizes[0] = roundup2((scctx->isc_nrxd[0] + 1) * sizeof(struct e1000_rx_desc), EM_DBA_ALIGN); @@ -847,6 +849,7 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_capabilities = scctx->isc_capenable = LEM_CAPS; if (adapter->hw.mac.type < e1000_82543) scctx->isc_capenable &= ~(IFCAP_HWCSUM|IFCAP_VLAN_HWCSUM); + /* INTx only */ scctx->isc_msix_bar = 0; } @@ -1092,13 +1095,12 @@ err_late: * * return 0 on success, positive on failure *********************************************************************/ - static int em_if_detach(if_ctx_t ctx) { struct adapter *adapter = iflib_get_softc(ctx); - INIT_DEBUGOUT("em_detach: begin"); + INIT_DEBUGOUT("em_if_detach: begin"); e1000_phy_hw_reset(&adapter->hw); @@ -1203,9 +1205,7 @@ em_if_mtu_set(if_ctx_t ctx, uint32_t mtu) * by the driver as a hw/sw initialization routine to get to a * consistent state. * - * return 0 on success, positive on failure **********************************************************************/ - static void em_if_init(if_ctx_t ctx) { @@ -1214,6 +1214,7 @@ em_if_init(if_ctx_t ctx) struct ifnet *ifp = iflib_get_ifp(ctx); struct em_tx_queue *tx_que; int i; + INIT_DEBUGOUT("em_if_init: begin"); /* Get the latest mac address, User can use a LAA */ @@ -1697,37 +1698,24 @@ em_if_multi_set(if_ctx_t ctx) } } - /********************************************************************* * Timer routine * - * This routine checks for link status and updates statistics. + * This routine schedules em_if_update_admin_status() to check for + * link status and to gather statistics as well as to perform some + * controller-specific hardware patting. * **********************************************************************/ - static void em_if_timer(if_ctx_t ctx, uint16_t qid) { - struct adapter *adapter = iflib_get_softc(ctx); - struct em_rx_queue *que; - int i; - int trigger = 0; if (qid != 0) return; iflib_admin_intr_deferred(ctx); - - /* Mask to use in the irq trigger */ - if (adapter->intr_type == IFLIB_INTR_MSIX) { - for (i = 0, que = adapter->rx_queues; i < adapter->rx_num_queues; i++, que++) - trigger |= que->eims; - } else { - trigger = E1000_ICS_RXDMT0; - } } - static void em_if_update_admin_status(if_ctx_t ctx) { @@ -1833,21 +1821,30 @@ em_if_update_admin_status(if_ctx_t ctx) E1000_WRITE_REG(&adapter->hw, E1000_IMS, EM_MSIX_LINK | E1000_IMS_LSC); } +static void +em_if_watchdog_reset(if_ctx_t ctx) +{ + struct adapter *adapter = iflib_get_softc(ctx); + + /* + * Just count the event; iflib(4) will already trigger a + * sufficient reset of the controller. + */ + adapter->watchdog_events++; +} + /********************************************************************* * * This routine disables all traffic on the adapter by issuing a - * global reset on the MAC and deallocates TX/RX buffers. + * global reset on the MAC. * - * This routine should always be called with BOTH the CORE - * and TX locks. **********************************************************************/ - static void em_if_stop(if_ctx_t ctx) { struct adapter *adapter = iflib_get_softc(ctx); - INIT_DEBUGOUT("em_stop: begin"); + INIT_DEBUGOUT("em_if_stop: begin"); e1000_reset_hw(&adapter->hw); if (adapter->hw.mac.type >= e1000_82544) @@ -1857,7 +1854,6 @@ em_if_stop(if_ctx_t ctx) e1000_cleanup_led(&adapter->hw); } - /********************************************************************* * * Determine hardware revision. @@ -2226,11 +2222,9 @@ em_setup_msix(if_ctx_t ctx) /********************************************************************* * - * Initialize the hardware to a configuration - * as specified by the adapter structure. + * Workaround for SmartSpeed on 82541 and 82547 controllers * **********************************************************************/ - static void lem_smartspeed(struct adapter *adapter) { @@ -2395,6 +2389,12 @@ igb_init_dmac(struct adapter *adapter, u32 pba) } } +/********************************************************************* + * + * Initialize the hardware to a configuration as specified by the + * adapter structure. + * + **********************************************************************/ static void em_reset(if_ctx_t ctx) { @@ -2629,6 +2629,11 @@ em_reset(if_ctx_t ctx) e1000_check_for_link(hw); } +/* + * Initialise the RSS mapping for NICs that support multiple transmit/ + * receive rings. + */ + #define RSSKEYLEN 10 static void em_initialize_rss_mapping(struct adapter *adapter) @@ -2669,7 +2674,6 @@ em_initialize_rss_mapping(struct adapter *adapter) E1000_MRQC_RSS_FIELD_IPV6_TCP_EX | E1000_MRQC_RSS_FIELD_IPV6_EX | E1000_MRQC_RSS_FIELD_IPV6); - } static void @@ -2769,7 +2773,7 @@ igb_initialize_rss_mapping(struct adapter *adapter) /********************************************************************* * - * Setup networking device structure and register an interface. + * Setup networking device structure and register interface media. * **********************************************************************/ static int @@ -4015,12 +4019,6 @@ em_add_hw_stats(struct adapter *adapter) SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "link_irq", CTLFLAG_RD, &adapter->link_irq, "Link MSI-X IRQ Handled"); - SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "mbuf_defrag_fail", - CTLFLAG_RD, &adapter->mbuf_defrag_failed, - "Defragmenting mbuf chain failed"); - SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "tx_dma_fail", - CTLFLAG_RD, &adapter->no_tx_dma_setup, - "Driver tx dma failure in xmit"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "rx_overruns", CTLFLAG_RD, &adapter->rx_overruns, "RX overruns"); @@ -4543,7 +4541,8 @@ em_enable_vectors_82574(if_ctx_t ctx) u16 edata; e1000_read_nvm(hw, EM_NVM_PCIE_CTRL, 1, &edata); - printf("Current cap: %#06x\n", edata); + if (bootverbose) + device_printf(dev, "EM_NVM_PCIE_CTRL = %#06x\n", edata); if (((edata & EM_NVM_MSIX_N_MASK) >> EM_NVM_MSIX_N_SHIFT) != 4) { device_printf(dev, "Writing to eeprom: increasing " "reported MSI-X vectors from 3 to 5...\n"); Modified: head/sys/dev/e1000/if_em.h ============================================================================== --- head/sys/dev/e1000/if_em.h Sat Feb 9 11:51:59 2019 (r343933) +++ head/sys/dev/e1000/if_em.h Sat Feb 9 11:58:40 2019 (r343934) @@ -519,7 +519,6 @@ struct adapter { u64 que_mask; - struct em_int_delay_info tx_int_delay; struct em_int_delay_info tx_abs_int_delay; struct em_int_delay_info rx_int_delay; @@ -529,9 +528,6 @@ struct adapter { /* Misc stats maintained by the driver */ unsigned long dropped_pkts; unsigned long link_irq; - unsigned long mbuf_defrag_failed; - unsigned long no_tx_dma_setup; - unsigned long no_tx_map_avail; unsigned long rx_overruns; unsigned long watchdog_events; From owner-svn-src-head@freebsd.org Sat Feb 9 16:53:41 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCFA714E5A4A; Sat, 9 Feb 2019 16:53:40 +0000 (UTC) (envelope-from johalun@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 79F56721DE; Sat, 9 Feb 2019 16:53:40 +0000 (UTC) (envelope-from johalun@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C7B83938; Sat, 9 Feb 2019 16:53:40 +0000 (UTC) (envelope-from johalun@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x19GreGQ052958; Sat, 9 Feb 2019 16:53:40 GMT (envelope-from johalun@FreeBSD.org) Received: (from johalun@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x19Grefq052956; Sat, 9 Feb 2019 16:53:40 GMT (envelope-from johalun@FreeBSD.org) Message-Id: <201902091653.x19Grefq052956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: johalun set sender to johalun@FreeBSD.org using -f From: Johannes Lundberg Date: Sat, 9 Feb 2019 16:53:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343942 - in head: share/misc usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: johalun X-SVN-Commit-Paths: in head: share/misc usr.bin/calendar/calendars X-SVN-Commit-Revision: 343942 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 79F56721DE 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.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 16:53:41 -0000 Author: johalun Date: Sat Feb 9 16:53:39 2019 New Revision: 343942 URL: https://svnweb.freebsd.org/changeset/base/343942 Log: Add myself to committers-src.dot and calendar.freebsd Reviewed by: imp (mentor) Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D19101 Modified: head/share/misc/committers-src.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Sat Feb 9 14:44:17 2019 (r343941) +++ head/share/misc/committers-src.dot Sat Feb 9 16:53:39 2019 (r343942) @@ -216,6 +216,7 @@ jmcneill [label="Jared McNeill\njmcneill@FreeBSD.org\n jmg [label="John-Mark Gurney\njmg@FreeBSD.org\n1997/02/13"] jmmv [label="Julio Merino\njmmv@FreeBSD.org\n2013/11/02"] joerg [label="Joerg Wunsch\njoerg@FreeBSD.org\n1993/11/14"] +johalun [label="Johannes Lundberg\njohalun@FreeBSD.org\n2019/01/19"] jon [label="Jonathan Chen\njon@FreeBSD.org\n2000/10/17"] jonathan [label="Jonathan Anderson\njonathan@FreeBSD.org\n2010/10/07"] jpaetzel [label="Josh Paetzel\njpaetzel@FreeBSD.org\n2011/01/21"] @@ -558,6 +559,7 @@ imp -> dmlb imp -> emax imp -> furuta imp -> joe +imp -> johalun imp -> jon imp -> keichii imp -> kibab Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Sat Feb 9 14:44:17 2019 (r343941) +++ head/usr.bin/calendar/calendars/calendar.freebsd Sat Feb 9 16:53:39 2019 (r343942) @@ -232,6 +232,7 @@ 06/04 Devin Teske born in Arcadia, California, United States, 1982 06/04 Zack Kirsch born in Memphis, Tennessee, United States, 1982 06/04 Johannes Jost Meixner born in Wiesbaden, Germany, 1987 +06/05 Johannes Lundberg born in Ornskoldsvik, Sweden, 1975 06/06 Sergei Kolobov born in Karpinsk, Russian Federation, 1972 06/06 Ryan Libby born in Kirkland, Washington, United States, 1985 06/06 Alan Eldridge died in Denver, Colorado, United States, 2003 From owner-svn-src-head@freebsd.org Sat Feb 9 21:08:20 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C5A914C9AED; Sat, 9 Feb 2019 21:08:20 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 0A5C7826A1; Sat, 9 Feb 2019 21:08:20 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F17C06440; Sat, 9 Feb 2019 21:08:19 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x19L8JYe086092; Sat, 9 Feb 2019 21:08:19 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x19L8JeS086091; Sat, 9 Feb 2019 21:08:19 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201902092108.x19L8JeS086091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 9 Feb 2019 21:08:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343943 - head/sys/ddb X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/ddb X-SVN-Commit-Revision: 343943 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0A5C7826A1 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.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 21:08:20 -0000 Author: jhibbits Date: Sat Feb 9 21:08:19 2019 New Revision: 343943 URL: https://svnweb.freebsd.org/changeset/base/343943 Log: ddb: Print the thread's pcb in 'show thread' This can aid with debugging when a thread is running and has no backtrace. State can be estimated based on the pcb, and refined from there, for example, to get a rough idea of the stack pointer. Modified: head/sys/ddb/db_ps.c Modified: head/sys/ddb/db_ps.c ============================================================================== --- head/sys/ddb/db_ps.c Sat Feb 9 16:53:39 2019 (r343942) +++ head/sys/ddb/db_ps.c Sat Feb 9 21:08:19 2019 (r343943) @@ -352,6 +352,7 @@ DB_SHOW_COMMAND(thread, db_show_thread) db_printf(" proc (pid %d): %p\n", td->td_proc->p_pid, td->td_proc); if (td->td_name[0] != '\0') db_printf(" name: %s\n", td->td_name); + db_printf(" pcb: %p\n", td->td_pcb); db_printf(" stack: %p-%p\n", (void *)td->td_kstack, (void *)(td->td_kstack + td->td_kstack_pages * PAGE_SIZE - 1)); db_printf(" flags: %#x ", td->td_flags); From owner-svn-src-head@freebsd.org Sat Feb 9 21:19:54 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B75C14CE16C; Sat, 9 Feb 2019 21:19:54 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 CD9B082F2E; Sat, 9 Feb 2019 21:19:53 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B617F65E4; Sat, 9 Feb 2019 21:19:53 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x19LJrTi091586; Sat, 9 Feb 2019 21:19:53 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x19LJrf8091585; Sat, 9 Feb 2019 21:19:53 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201902092119.x19LJrf8091585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 9 Feb 2019 21:19:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343944 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 343944 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CD9B082F2E 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.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 21:19:54 -0000 Author: jhibbits Date: Sat Feb 9 21:19:53 2019 New Revision: 343944 URL: https://svnweb.freebsd.org/changeset/base/343944 Log: powerpc: Split out the e500mc idling from rest of Book-E The e500v2 and e500mc (and derivatives) have different idling procedures, so make them different functions. MFC after: 2 weeks Modified: head/sys/powerpc/powerpc/cpu.c Modified: head/sys/powerpc/powerpc/cpu.c ============================================================================== --- head/sys/powerpc/powerpc/cpu.c Sat Feb 9 21:08:19 2019 (r343943) +++ head/sys/powerpc/powerpc/cpu.c Sat Feb 9 21:19:53 2019 (r343944) @@ -89,6 +89,7 @@ int powerpc_pow_enabled; void (*cpu_idle_hook)(sbintime_t) = NULL; static void cpu_idle_60x(sbintime_t); static void cpu_idle_booke(sbintime_t); +static void cpu_idle_e500mc(sbintime_t sbt); #if defined(__powerpc64__) && defined(AIM) static void cpu_idle_powerx(sbintime_t); static void cpu_idle_power9(sbintime_t); @@ -585,10 +586,12 @@ cpu_booke_setup(int cpuid, uint16_t vers) switch (vers) { case FSL_E500mc: bitmask = HID0_E500MC_BITMASK; + cpu_idle_hook = cpu_idle_e500mc; break; case FSL_E5500: case FSL_E6500: bitmask = HID0_E5500_BITMASK; + cpu_idle_hook = cpu_idle_e500mc; break; case FSL_E500v1: case FSL_E500v2: @@ -754,25 +757,25 @@ cpu_idle_60x(sbintime_t sbt) } static void +cpu_idle_e500mc(sbintime_t sbt) +{ + /* + * Base binutils doesn't know what the 'wait' instruction is, so + * use the opcode encoding here. + */ + __asm __volatile(".long 0x7c00007c"); +} + +static void cpu_idle_booke(sbintime_t sbt) { register_t msr; - uint16_t vers; msr = mfmsr(); - vers = mfpvr() >> 16; -#ifdef BOOKE - switch (vers) { - case FSL_E500mc: - case FSL_E5500: - case FSL_E6500: - break; - default: - powerpc_sync(); - mtmsr(msr | PSL_WE); - break; - } +#ifdef BOOKE_E500 + powerpc_sync(); + mtmsr(msr | PSL_WE); #endif } From owner-svn-src-head@freebsd.org Sat Feb 9 21:33:33 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFA5914CE7CF; Sat, 9 Feb 2019 21:33:32 +0000 (UTC) (envelope-from pluknet@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 9371883792; Sat, 9 Feb 2019 21:33:32 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 85ADE696B; Sat, 9 Feb 2019 21:33:32 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x19LXWb8001792; Sat, 9 Feb 2019 21:33:32 GMT (envelope-from pluknet@FreeBSD.org) Received: (from pluknet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x19LXW5E001791; Sat, 9 Feb 2019 21:33:32 GMT (envelope-from pluknet@FreeBSD.org) Message-Id: <201902092133.x19LXW5E001791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pluknet set sender to pluknet@FreeBSD.org using -f From: Sergey Kandaurov Date: Sat, 9 Feb 2019 21:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343945 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: pluknet X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 343945 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9371883792 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.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 21:33:33 -0000 Author: pluknet Date: Sat Feb 9 21:33:32 2019 New Revision: 343945 URL: https://svnweb.freebsd.org/changeset/base/343945 Log: Document the ENOBUFS errno in setsockopt(2). In particular, it is the case if SO_SNDBUF/SO_RCVBUF would exceed sb_max_adj. PR: 200649 MFC after: 1 week Modified: head/lib/libc/sys/getsockopt.2 Modified: head/lib/libc/sys/getsockopt.2 ============================================================================== --- head/lib/libc/sys/getsockopt.2 Sat Feb 9 21:19:53 2019 (r343944) +++ head/lib/libc/sys/getsockopt.2 Sat Feb 9 21:33:32 2019 (r343945) @@ -28,7 +28,7 @@ .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd August 21, 2018 +.Dd February 10, 2019 .Dt GETSOCKOPT 2 .Os .Sh NAME @@ -534,7 +534,11 @@ transfer rate to the given unsigned 32-bit value in by .Sh RETURN VALUES .Rv -std .Sh ERRORS -The call succeeds unless: +The +.Fn getsockopt +and +.Fn setsockopt +system calls succeed unless: .Bl -tag -width Er .It Bq Er EBADF The argument @@ -561,6 +565,15 @@ Installing an on a non-listening socket was attempted. .It Bq Er ENOMEM A memory allocation failed that was required to service the request. +.El +.Pp +The +.Fn setsockopt +system call may also return the following error: +.Bl -tag -width Er +.It Bq Er ENOBUFS +Insufficient resources were available in the system +to perform the operation. .El .Sh SEE ALSO .Xr ioctl 2 , From owner-svn-src-head@freebsd.org Sat Feb 9 23:19:34 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B99D414D15FA; Sat, 9 Feb 2019 23:19:34 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 5EF2286E6B; Sat, 9 Feb 2019 23:19:34 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 524B07A62; Sat, 9 Feb 2019 23:19:34 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x19NJY2H055005; Sat, 9 Feb 2019 23:19:34 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x19NJYcL055004; Sat, 9 Feb 2019 23:19:34 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201902092319.x19NJYcL055004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 9 Feb 2019 23:19:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343946 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 343946 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5EF2286E6B 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)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 23:19:34 -0000 Author: jhibbits Date: Sat Feb 9 23:19:33 2019 New Revision: 343946 URL: https://svnweb.freebsd.org/changeset/base/343946 Log: powerpc: Fix AIM build cpu_idle_e500mc is only used in booke, so ignore it completely in AIM. MFC after: 2 weeks MFC with: r343944 Modified: head/sys/powerpc/powerpc/cpu.c Modified: head/sys/powerpc/powerpc/cpu.c ============================================================================== --- head/sys/powerpc/powerpc/cpu.c Sat Feb 9 21:33:32 2019 (r343945) +++ head/sys/powerpc/powerpc/cpu.c Sat Feb 9 23:19:33 2019 (r343946) @@ -89,7 +89,9 @@ int powerpc_pow_enabled; void (*cpu_idle_hook)(sbintime_t) = NULL; static void cpu_idle_60x(sbintime_t); static void cpu_idle_booke(sbintime_t); +#ifdef BOOKE_E500 static void cpu_idle_e500mc(sbintime_t sbt); +#endif #if defined(__powerpc64__) && defined(AIM) static void cpu_idle_powerx(sbintime_t); static void cpu_idle_power9(sbintime_t); @@ -756,6 +758,7 @@ cpu_idle_60x(sbintime_t sbt) #endif } +#ifdef BOOKE_E500 static void cpu_idle_e500mc(sbintime_t sbt) { @@ -765,6 +768,7 @@ cpu_idle_e500mc(sbintime_t sbt) */ __asm __volatile(".long 0x7c00007c"); } +#endif static void cpu_idle_booke(sbintime_t sbt)