From owner-svn-src-stable-11@freebsd.org Mon Sep 2 00:29:17 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 558A1CB569;
Mon, 2 Sep 2019 00:29:17 +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 46M9v11cBvz42Rc;
Mon, 2 Sep 2019 00:29:17 +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 1A8C09C0D;
Mon, 2 Sep 2019 00:29:17 +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 x820TGmP093890;
Mon, 2 Sep 2019 00:29:16 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x820TGal093889;
Mon, 2 Sep 2019 00:29:16 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201909020029.x820TGal093889@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
emaste@FreeBSD.org using -f
From: Ed Maste
Date: Mon, 2 Sep 2019 00:29:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r351675 - stable/11/sys/arm/samsung/exynos
X-SVN-Group: stable-11
X-SVN-Commit-Author: emaste
X-SVN-Commit-Paths: stable/11/sys/arm/samsung/exynos
X-SVN-Commit-Revision: 351675
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
X-List-Received-Date: Mon, 02 Sep 2019 00:29:17 -0000
Author: emaste
Date: Mon Sep 2 00:29:16 2019
New Revision: 351675
URL: https://svnweb.freebsd.org/changeset/base/351675
Log:
MFC r351618, r351619: exynos5: avoid NULL deref in error case
Reported by: Dr Silvio Cesare of InfoSect
Sponsored by: The FreeBSD Foundation
Modified:
stable/11/sys/arm/samsung/exynos/exynos5_combiner.c
stable/11/sys/arm/samsung/exynos/exynos5_pad.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/arm/samsung/exynos/exynos5_combiner.c
==============================================================================
--- stable/11/sys/arm/samsung/exynos/exynos5_combiner.c Mon Sep 2 00:29:14 2019 (r351674)
+++ stable/11/sys/arm/samsung/exynos/exynos5_combiner.c Mon Sep 2 00:29:16 2019 (r351675)
@@ -314,7 +314,7 @@ combiner_setup_intr(char *source_name, void (*ih)(void
sc = combiner_sc;
if (sc == NULL) {
- device_printf(sc->dev, "Error: combiner is not attached\n");
+ printf("%s: error: combiner is not attached\n", __func__);
return;
}
Modified: stable/11/sys/arm/samsung/exynos/exynos5_pad.c
==============================================================================
--- stable/11/sys/arm/samsung/exynos/exynos5_pad.c Mon Sep 2 00:29:14 2019 (r351674)
+++ stable/11/sys/arm/samsung/exynos/exynos5_pad.c Mon Sep 2 00:29:16 2019 (r351675)
@@ -410,7 +410,7 @@ pad_setup_intr(int gpio_number, void (*ih)(void *), vo
sc = gpio_sc;
if (sc == NULL) {
- device_printf(sc->dev, "Error: pad is not attached\n");
+ printf("%s: Error: pad is not attached\n", __func__);
return (-1);
}
From owner-svn-src-stable-11@freebsd.org Mon Sep 2 00:31:05 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id F153DCB7B6;
Mon, 2 Sep 2019 00:31:05 +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 46M9x55nGDz42y3;
Mon, 2 Sep 2019 00:31:05 +0000 (UTC)
(envelope-from emaste@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
[IPv6:2610:1c1:1:6068::e6a:0])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA7789D4D;
Mon, 2 Sep 2019 00:31:05 +0000 (UTC)
(envelope-from emaste@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x820V5VY094130;
Mon, 2 Sep 2019 00:31:05 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x820V540094129;
Mon, 2 Sep 2019 00:31:05 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201909020031.x820V540094129@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
emaste@FreeBSD.org using -f
From: Ed Maste
Date: Mon, 2 Sep 2019 00:31:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r351677 - stable/11/sys/dev/qlxgbe
X-SVN-Group: stable-11
X-SVN-Commit-Author: emaste
X-SVN-Commit-Paths: stable/11/sys/dev/qlxgbe
X-SVN-Commit-Revision: 351677
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
X-List-Received-Date: Mon, 02 Sep 2019 00:31:06 -0000
Author: emaste
Date: Mon Sep 2 00:31:05 2019
New Revision: 351677
URL: https://svnweb.freebsd.org/changeset/base/351677
Log:
MFC qlxgbe: avoid NULL deref in error case
Reported by: Dr Silvio Cesare of InfoSect
Sponsored by: The FreeBSD Foundation
Modified:
stable/11/sys/dev/qlxgbe/ql_isr.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/qlxgbe/ql_isr.c
==============================================================================
--- stable/11/sys/dev/qlxgbe/ql_isr.c Mon Sep 2 00:31:03 2019 (r351676)
+++ stable/11/sys/dev/qlxgbe/ql_isr.c Mon Sep 2 00:31:05 2019 (r351677)
@@ -791,7 +791,7 @@ ql_mbx_isr(void *arg)
ha = arg;
if (ha == NULL) {
- device_printf(ha->pci_dev, "%s: arg == NULL\n", __func__);
+ printf("%s: arg == NULL\n", __func__);
return;
}
From owner-svn-src-stable-11@freebsd.org Mon Sep 2 00:39:03 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 15A2CCBC48;
Mon, 2 Sep 2019 00:39:03 +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 46MB6G6Ytnz43gW;
Mon, 2 Sep 2019 00:39:02 +0000 (UTC)
(envelope-from emaste@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
[IPv6:2610:1c1:1:6068::e6a:0])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C47EC9DE4;
Mon, 2 Sep 2019 00:39:02 +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 x820d21x000113;
Mon, 2 Sep 2019 00:39:02 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x820d2ih000112;
Mon, 2 Sep 2019 00:39:02 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201909020039.x820d2ih000112@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
emaste@FreeBSD.org using -f
From: Ed Maste
Date: Mon, 2 Sep 2019 00:39:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r351680 - stable/11/sys/dev/vnic
X-SVN-Group: stable-11
X-SVN-Commit-Author: emaste
X-SVN-Commit-Paths: stable/11/sys/dev/vnic
X-SVN-Commit-Revision: 351680
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
X-List-Received-Date: Mon, 02 Sep 2019 00:39:03 -0000
Author: emaste
Date: Mon Sep 2 00:39:02 2019
New Revision: 351680
URL: https://svnweb.freebsd.org/changeset/base/351680
Log:
MFC r351603: vnic: avoid NULL deref in error case
Reported by: Dr Silvio Cesare of InfoSect
Sponsored by: The FreeBSD Foundation
Modified:
stable/11/sys/dev/vnic/thunder_bgx.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/vnic/thunder_bgx.c
==============================================================================
--- stable/11/sys/dev/vnic/thunder_bgx.c Mon Sep 2 00:37:59 2019 (r351679)
+++ stable/11/sys/dev/vnic/thunder_bgx.c Mon Sep 2 00:39:02 2019 (r351680)
@@ -502,9 +502,8 @@ bgx_add_dmac_addr(uint64_t dmac, int node, int bgx_idx
bgx_idx += node * MAX_BGX_PER_CN88XX;
bgx = bgx_vnic[bgx_idx];
- if (!bgx) {
- device_printf(bgx->dev,
- "BGX%d not yet initialized, ignoring DMAC addition\n",
+ if (bgx == NULL) {
+ printf("BGX%d not yet initialized, ignoring DMAC addition\n",
bgx_idx);
return;
}
From owner-svn-src-stable-11@freebsd.org Mon Sep 2 10:21:00 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9C8E7D9000;
Mon, 2 Sep 2019 10:21: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 46MR1m2nfvz4XVN;
Mon, 2 Sep 2019 10:21: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 4246D18A03;
Mon, 2 Sep 2019 10:21: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 x82AL0SK049287;
Mon, 2 Sep 2019 10:21:00 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x82AKvBa049256;
Mon, 2 Sep 2019 10:20:57 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201909021020.x82AKvBa049256@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
using -f
From: Konstantin Belousov
Date: Mon, 2 Sep 2019 10:20:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r351694 - in stable/11: include/rpcsvc lib/libc/net
lib/libc/rpc usr.sbin/rpc.yppasswdd usr.sbin/rpc.ypupdated usr.sbin/ypldap
usr.sbin/yppush usr.sbin/ypserv
X-SVN-Group: stable-11
X-SVN-Commit-Author: kib
X-SVN-Commit-Paths: in stable/11: include/rpcsvc lib/libc/net lib/libc/rpc
usr.sbin/rpc.yppasswdd usr.sbin/rpc.ypupdated usr.sbin/ypldap usr.sbin/yppush
usr.sbin/ypserv
X-SVN-Commit-Revision: 351694
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
X-List-Received-Date: Mon, 02 Sep 2019 10:21:00 -0000
Author: kib
Date: Mon Sep 2 10:20:57 2019
New Revision: 351694
URL: https://svnweb.freebsd.org/changeset/base/351694
Log:
MFC r350957:
Increase YPMAXRECORD to 16M to be compatible with Linux.
Sponsored by: Mellanox Technologies
Modified:
stable/11/include/rpcsvc/yp.x
stable/11/include/rpcsvc/yp_prot.h
stable/11/include/rpcsvc/ypxfrd.x
stable/11/lib/libc/net/gethostbynis.c
stable/11/lib/libc/net/getnetbynis.c
stable/11/lib/libc/net/getservent.c
stable/11/lib/libc/rpc/getrpcent.c
stable/11/usr.sbin/rpc.yppasswdd/yppasswdd_server.c
stable/11/usr.sbin/rpc.ypupdated/yp_dbupdate.c
stable/11/usr.sbin/ypldap/yp.c
stable/11/usr.sbin/yppush/yppush_main.c
stable/11/usr.sbin/ypserv/yp_server.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/include/rpcsvc/yp.x
==============================================================================
--- stable/11/include/rpcsvc/yp.x Mon Sep 2 08:34:45 2019 (r351693)
+++ stable/11/include/rpcsvc/yp.x Mon Sep 2 10:20:57 2019 (r351694)
@@ -40,7 +40,7 @@
%__FBSDID("$FreeBSD$");
#endif
-const YPMAXRECORD = 1024;
+const YPMAXRECORD = 16777216;
const YPMAXDOMAIN = 64;
const YPMAXMAP = 64;
const YPMAXPEER = 64;
Modified: stable/11/include/rpcsvc/yp_prot.h
==============================================================================
--- stable/11/include/rpcsvc/yp_prot.h Mon Sep 2 08:34:45 2019 (r351693)
+++ stable/11/include/rpcsvc/yp_prot.h Mon Sep 2 10:20:57 2019 (r351694)
@@ -77,7 +77,7 @@ typedef u_int bool;
#define YPPROG ((u_long)100004)
#define YPVERS ((u_long)2)
#define YPVERS_ORIG ((u_long)1)
-#define YPMAXRECORD ((u_long)1024)
+#define YPMAXRECORD ((u_long)16 * 1024 * 1024)
#define YPMAXDOMAIN ((u_long)64)
#define YPMAXMAP ((u_long)64)
#define YPMAXPEER ((u_long)256)
Modified: stable/11/include/rpcsvc/ypxfrd.x
==============================================================================
--- stable/11/include/rpcsvc/ypxfrd.x Mon Sep 2 08:34:45 2019 (r351693)
+++ stable/11/include/rpcsvc/ypxfrd.x Mon Sep 2 10:20:57 2019 (r351694)
@@ -70,7 +70,7 @@
#endif
/* XXX cribbed from yp.x */
-const _YPMAXRECORD = 1024;
+const _YPMAXRECORD = 16777216;
const _YPMAXDOMAIN = 64;
const _YPMAXMAP = 64;
const _YPMAXPEER = 64;
Modified: stable/11/lib/libc/net/gethostbynis.c
==============================================================================
--- stable/11/lib/libc/net/gethostbynis.c Mon Sep 2 08:34:45 2019 (r351693)
+++ stable/11/lib/libc/net/gethostbynis.c Mon Sep 2 10:20:57 2019 (r351694)
@@ -56,7 +56,7 @@ _gethostbynis(const char *name, char *map, int af, str
char *cp, **q;
char *result;
int resultlen, size, addrok = 0;
- char ypbuf[YPMAXRECORD + 2];
+ char *ypbuf;
res_state statp;
statp = __res_state();
@@ -86,10 +86,11 @@ _gethostbynis(const char *name, char *map, int af, str
}
/* avoid potential memory leak */
- bcopy((char *)result, (char *)&ypbuf, resultlen);
+ ypbuf = alloca(resultlen + 2);
+ bcopy(result, ypbuf, resultlen);
ypbuf[resultlen] = '\0';
free(result);
- result = (char *)&ypbuf;
+ result = ypbuf;
if ((cp = strchr(result, '\n')))
*cp = '\0';
Modified: stable/11/lib/libc/net/getnetbynis.c
==============================================================================
--- stable/11/lib/libc/net/getnetbynis.c Mon Sep 2 08:34:45 2019 (r351693)
+++ stable/11/lib/libc/net/getnetbynis.c Mon Sep 2 10:20:57 2019 (r351694)
@@ -56,7 +56,7 @@ _getnetbynis(const char *name, char *map, int af, stru
char *cp, **q;
char *result;
int resultlen, len;
- char ypbuf[YPMAXRECORD + 2];
+ char *ypbuf;
switch(af) {
case AF_INET:
@@ -75,10 +75,11 @@ _getnetbynis(const char *name, char *map, int af, stru
&resultlen))
return (-1);
- bcopy((char *)result, (char *)&ypbuf, resultlen);
+ ypbuf = alloca(resultlen + 2);
+ bcopy(result, ypbuf, resultlen);
ypbuf[resultlen] = '\0';
free(result);
- result = (char *)&ypbuf;
+ result = ypbuf;
if ((cp = strchr(result, '\n')))
*cp = '\0';
Modified: stable/11/lib/libc/net/getservent.c
==============================================================================
--- stable/11/lib/libc/net/getservent.c Mon Sep 2 08:34:45 2019 (r351693)
+++ stable/11/lib/libc/net/getservent.c Mon Sep 2 10:20:57 2019 (r351694)
@@ -662,7 +662,7 @@ nis_servent(void *retval, void *mdata, va_list ap)
{
char *resultbuf, *lastkey;
int resultbuflen;
- char buf[YPMAXRECORD + 2];
+ char *buf;
struct nis_state *st;
int rv;
@@ -679,6 +679,7 @@ nis_servent(void *retval, void *mdata, va_list ap)
name = NULL;
proto = NULL;
+ buf = NULL;
how = (enum nss_lookup_type)mdata;
switch (how) {
case nss_lt_name:
@@ -714,7 +715,10 @@ nis_servent(void *retval, void *mdata, va_list ap)
do {
switch (how) {
case nss_lt_name:
- snprintf(buf, sizeof(buf), "%s/%s", name, proto);
+ free(buf);
+ asprintf(&buf, "%s/%s", name, proto);
+ if (buf == NULL)
+ return (NS_TRYAGAIN);
if (yp_match(st->yp_domain, "services.byname", buf,
strlen(buf), &resultbuf, &resultbuflen)) {
rv = NS_NOTFOUND;
@@ -722,8 +726,10 @@ nis_servent(void *retval, void *mdata, va_list ap)
}
break;
case nss_lt_id:
- snprintf(buf, sizeof(buf), "%d/%s", ntohs(port),
- proto);
+ free(buf);
+ asprintf(&buf, "%d/%s", ntohs(port), proto);
+ if (buf == NULL)
+ return (NS_TRYAGAIN);
/*
* We have to be a little flexible
@@ -789,6 +795,7 @@ nis_servent(void *retval, void *mdata, va_list ap)
} while (!(rv & NS_TERMINATE) && how == nss_lt_all);
fin:
+ free(buf);
if (rv == NS_SUCCESS && retval != NULL)
*(struct servent **)retval = serv;
Modified: stable/11/lib/libc/rpc/getrpcent.c
==============================================================================
--- stable/11/lib/libc/rpc/getrpcent.c Mon Sep 2 08:34:45 2019 (r351693)
+++ stable/11/lib/libc/rpc/getrpcent.c Mon Sep 2 10:20:57 2019 (r351694)
@@ -398,7 +398,7 @@ nis_rpcent(void *retval, void *mdata, va_list ap)
char *lastkey;
char *resultbuf;
int resultbuflen;
- char buf[YPMAXRECORD + 2];
+ char *buf;
struct nis_state *st;
int rv;
@@ -420,6 +420,7 @@ nis_rpcent(void *retval, void *mdata, va_list ap)
return (NS_NOTFOUND);
}
+ buf = NULL;
rpc = va_arg(ap, struct rpcent *);
buffer = va_arg(ap, char *);
bufsize = va_arg(ap, size_t);
@@ -443,7 +444,10 @@ nis_rpcent(void *retval, void *mdata, va_list ap)
case nss_lt_name:
if (!st->no_name_map)
{
- snprintf(buf, sizeof buf, "%s", name);
+ free(buf);
+ asprintf(&buf, "%s", name);
+ if (buf == NULL)
+ return (NS_TRYAGAIN);
rv = yp_match(st->domain, "rpc.byname", buf,
strlen(buf), &resultbuf, &resultbuflen);
@@ -471,7 +475,10 @@ nis_rpcent(void *retval, void *mdata, va_list ap)
}
break;
case nss_lt_id:
- snprintf(buf, sizeof buf, "%d", number);
+ free(buf);
+ asprintf(&buf, "%d", number);
+ if (buf == NULL)
+ return (NS_TRYAGAIN);
if (yp_match(st->domain, "rpc.bynumber", buf,
strlen(buf), &resultbuf, &resultbuflen)) {
rv = NS_NOTFOUND;
@@ -558,6 +565,7 @@ done:
} while (!(rv & NS_TERMINATE) && (how == nss_lt_all));
fin:
+ free(buf);
if ((rv == NS_SUCCESS) && (retval != NULL))
*((struct rpcent **)retval) = rpc;
Modified: stable/11/usr.sbin/rpc.yppasswdd/yppasswdd_server.c
==============================================================================
--- stable/11/usr.sbin/rpc.yppasswdd/yppasswdd_server.c Mon Sep 2 08:34:45 2019 (r351693)
+++ stable/11/usr.sbin/rpc.yppasswdd/yppasswdd_server.c Mon Sep 2 10:20:57 2019 (r351694)
@@ -321,15 +321,16 @@ update_inplace(struct passwd *pw, char *domain)
DB *dbp = NULL;
DBT key = { NULL, 0 };
DBT data = { NULL, 0 };
- char pwbuf[YPMAXRECORD];
+ char *pwbuf;
char keybuf[20];
int i;
char *ptr = NULL;
static char yp_last[] = "YP_LAST_MODIFIED";
- char yplastbuf[YPMAXRECORD];
+ char yplastbuf[64];
snprintf(yplastbuf, sizeof yplastbuf, "%llu",
(unsigned long long)time(NULL));
+ pwbuf = NULL;
for (i = 0; i < 4; i++) {
@@ -362,12 +363,12 @@ update_inplace(struct passwd *pw, char *domain)
if (yp_get_record(domain,maps[i],&key,&data,1) != YP_TRUE) {
yp_error("couldn't read %s/%s: %s", domain,
maps[i], strerror(errno));
- return(1);
+ goto ret1;
}
if ((ptr = strchr(data.data, ':')) == NULL) {
yp_error("no colon in passwd record?!");
- return(1);
+ goto ret1;
}
/*
@@ -391,8 +392,12 @@ with the same UID - continuing");
* We're really being ultra-paranoid here.
* This is generally a 'can't happen' condition.
*/
- snprintf(pwbuf, sizeof pwbuf, ":%d:%d:", pw->pw_uid,
- pw->pw_gid);
+ free(pwbuf);
+ asprintf(&pwbuf, ":%d:%d:", pw->pw_uid, pw->pw_gid);
+ if (pwbuf == NULL) {
+ yp_error("no memory");
+ goto ret1;
+ }
if (!strstr(data.data, pwbuf)) {
yp_error("warning: found entry for user %s \
in map %s@%s with wrong UID", pw->pw_name, maps[i], domain);
@@ -403,24 +408,30 @@ with the same name - continuing");
}
if (i < 2) {
- snprintf(pwbuf, sizeof pwbuf, formats[i],
+ free(pwbuf);
+ asprintf(&pwbuf, formats[i],
pw->pw_name, pw->pw_passwd, pw->pw_uid,
pw->pw_gid, pw->pw_class, pw->pw_change,
pw->pw_expire, pw->pw_gecos, pw->pw_dir,
pw->pw_shell);
} else {
- snprintf(pwbuf, sizeof pwbuf, formats[i],
+ free(pwbuf);
+ asprintf(&pwbuf, formats[i],
pw->pw_name, *(ptr+1) == '*' ? "*" : pw->pw_passwd,
pw->pw_uid, pw->pw_gid, pw->pw_gecos, pw->pw_dir,
pw->pw_shell);
}
+ if (pwbuf == NULL) {
+ yp_error("no memory");
+ goto ret1;
+ }
#define FLAGS O_RDWR|O_CREAT
if ((dbp = yp_open_db_rw(domain, maps[i], FLAGS)) == NULL) {
yp_error("couldn't open %s/%s r/w: %s",domain,
maps[i],strerror(errno));
- return(1);
+ goto ret1;
}
data.data = pwbuf;
@@ -430,7 +441,7 @@ with the same name - continuing");
yp_error("failed to update record in %s/%s", domain,
maps[i]);
(void)(dbp->close)(dbp);
- return(1);
+ goto ret1;
}
key.data = yp_last;
@@ -442,13 +453,17 @@ with the same name - continuing");
yp_error("failed to update timestamp in %s/%s", domain,
maps[i]);
(void)(dbp->close)(dbp);
- return(1);
+ goto ret1;
}
(void)(dbp->close)(dbp);
}
- return(0);
+ free(pwbuf);
+ return (0);
+ret1:
+ free(pwbuf);
+ return (1);
}
int *
Modified: stable/11/usr.sbin/rpc.ypupdated/yp_dbupdate.c
==============================================================================
--- stable/11/usr.sbin/rpc.ypupdated/yp_dbupdate.c Mon Sep 2 08:34:45 2019 (r351693)
+++ stable/11/usr.sbin/rpc.ypupdated/yp_dbupdate.c Mon Sep 2 10:20:57 2019 (r351694)
@@ -79,7 +79,7 @@ ypmap_update(char *netname, char *map, unsigned int op
DB *dbp;
DBT key = { NULL, 0 }, data = { NULL, 0 };
char *yp_last = "YP_LAST_MODIFIED";
- char yplastbuf[YPMAXRECORD];
+ char yplastbuf[32];
char *domptr;
int rval = 0;
Modified: stable/11/usr.sbin/ypldap/yp.c
==============================================================================
--- stable/11/usr.sbin/ypldap/yp.c Mon Sep 2 08:34:45 2019 (r351693)
+++ stable/11/usr.sbin/ypldap/yp.c Mon Sep 2 10:20:57 2019 (r351694)
@@ -323,7 +323,7 @@ ypproc_match_2_svc(ypreq_key *arg, struct svc_req *req
static struct ypresp_val res;
const char *estr;
char *bp, *cp;
- char key[YPMAXRECORD+1];
+ char *key;
log_debug("matching '%.*s' in map %s", arg->key.keydat_len,
arg->key.keydat_val, arg->map);
@@ -342,7 +342,9 @@ ypproc_match_2_svc(ypreq_key *arg, struct svc_req *req
log_debug("argument too long");
return (NULL);
}
- memset(key, 0, sizeof(key));
+ key = calloc(arg->key.keydat_len + 1, 1);
+ if (key == NULL)
+ return (NULL);
(void)strncpy(key, arg->key.keydat_val, arg->key.keydat_len);
if (strcmp(arg->map, "passwd.byname") == 0 ||
@@ -351,23 +353,23 @@ ypproc_match_2_svc(ypreq_key *arg, struct svc_req *req
if ((ue = RB_FIND(user_name_tree, env->sc_user_names,
&ukey)) == NULL) {
res.stat = YP_NOKEY;
- return (&res);
+ goto out;
}
yp_make_val(&res, ue->ue_line, 1);
- return (&res);
+ goto out;
} else if (strcmp(arg->map, "passwd.byuid") == 0 ||
strcmp(arg->map, "master.passwd.byuid") == 0) {
ukey.ue_uid = strtonum(key, 0, UID_MAX, &estr);
if (estr) {
res.stat = YP_BADARGS;
- return (&res);
+ goto out;
}
if ((ue = RB_FIND(user_uid_tree, &env->sc_user_uids,
&ukey)) == NULL) {
res.stat = YP_NOKEY;
- return (&res);
+ goto out;
}
yp_make_val(&res, ue->ue_line, 1);
@@ -376,12 +378,12 @@ ypproc_match_2_svc(ypreq_key *arg, struct svc_req *req
gkey.ge_gid = strtonum(key, 0, GID_MAX, &estr);
if (estr) {
res.stat = YP_BADARGS;
- return (&res);
+ goto out;
}
if ((ge = RB_FIND(group_gid_tree, &env->sc_group_gids,
&gkey)) == NULL) {
res.stat = YP_NOKEY;
- return (&res);
+ goto out;
}
yp_make_val(&res, ge->ge_line, 1);
@@ -391,7 +393,7 @@ ypproc_match_2_svc(ypreq_key *arg, struct svc_req *req
if ((ge = RB_FIND(group_name_tree, env->sc_group_names,
&gkey)) == NULL) {
res.stat = YP_NOKEY;
- return (&res);
+ goto out;
}
yp_make_val(&res, ge->ge_line, 1);
@@ -401,46 +403,49 @@ ypproc_match_2_svc(ypreq_key *arg, struct svc_req *req
if (strncmp(bp, "unix.", strlen("unix.")) != 0) {
res.stat = YP_BADARGS;
- return (&res);
+ goto out;
}
bp += strlen("unix.");
if (*bp == '\0') {
res.stat = YP_BADARGS;
- return (&res);
+ goto out;
}
if (!(cp = strsep(&bp, "@"))) {
res.stat = YP_BADARGS;
- return (&res);
+ goto out;
}
if (strcmp(bp, arg->domain) != 0) {
res.stat = YP_BADARGS;
- return (&res);
+ goto out;
}
ukey.ue_uid = strtonum(cp, 0, UID_MAX, &estr);
if (estr) {
res.stat = YP_BADARGS;
- return (&res);
+ goto out;
}
if ((ue = RB_FIND(user_uid_tree, &env->sc_user_uids,
&ukey)) == NULL) {
res.stat = YP_NOKEY;
- return (&res);
+ goto out;
}
yp_make_val(&res, ue->ue_netid_line, 0);
- return (&res);
+ goto out;
} else {
log_debug("unknown map %s", arg->map);
res.stat = YP_NOMAP;
- return (&res);
+ goto out;
}
+out:
+ free(key);
+ return (&res);
}
ypresp_key_val *
@@ -479,14 +484,19 @@ ypproc_next_2_svc(ypreq_key *arg, struct svc_req *req)
struct groupent *ge;
char *line;
static struct ypresp_key_val res;
- char key[YPMAXRECORD+1];
+ char *key;
if (yp_valid_domain(arg->domain, (struct ypresp_val *)&res) == -1)
return (&res);
+ key = NULL;
if (strcmp(arg->map, "passwd.byname") == 0 ||
strcmp(arg->map, "master.passwd.byname") == 0) {
- memset(key, 0, sizeof(key));
+ key = calloc(arg->key.keydat_len + 1, 1);
+ if (key == NULL) {
+ res.stat = YP_YPERR;
+ return (&res);
+ }
(void)strncpy(key, arg->key.keydat_val,
arg->key.keydat_len);
ukey.ue_line = key;
@@ -506,6 +516,7 @@ ypproc_next_2_svc(ypreq_key *arg, struct svc_req *req)
RB_REMOVE(user_name_tree, env->sc_user_names,
&ukey);
res.stat = YP_NOKEY;
+ free(key);
return (&res);
}
RB_REMOVE(user_name_tree, env->sc_user_names, &ukey);
@@ -513,11 +524,16 @@ ypproc_next_2_svc(ypreq_key *arg, struct svc_req *req)
line = ue->ue_line + (strlen(ue->ue_line) + 1);
line = line + (strlen(line) + 1);
yp_make_keyval(&res, line, line);
+ free(key);
return (&res);
} else if (strcmp(arg->map, "group.byname") == 0) {
- memset(key, 0, sizeof(key));
+ key = calloc(arg->key.keydat_len + 1, 1);
+ if (key == NULL) {
+ res.stat = YP_YPERR;
+ return (&res);
+ }
(void)strncpy(key, arg->key.keydat_val,
arg->key.keydat_len);
@@ -533,6 +549,7 @@ ypproc_next_2_svc(ypreq_key *arg, struct svc_req *req)
RB_REMOVE(group_name_tree, env->sc_group_names,
&gkey);
res.stat = YP_NOKEY;
+ free(key);
return (&res);
}
RB_REMOVE(group_name_tree, env->sc_group_names, &gkey);
@@ -541,6 +558,7 @@ ypproc_next_2_svc(ypreq_key *arg, struct svc_req *req)
line = ge->ge_line + (strlen(ge->ge_line) + 1);
line = line + (strlen(line) + 1);
yp_make_keyval(&res, line, line);
+ free(key);
return (&res);
} else {
log_debug("unknown map %s", arg->map);
Modified: stable/11/usr.sbin/yppush/yppush_main.c
==============================================================================
--- stable/11/usr.sbin/yppush/yppush_main.c Mon Sep 2 08:34:45 2019 (r351693)
+++ stable/11/usr.sbin/yppush/yppush_main.c Mon Sep 2 10:20:57 2019 (r351694)
@@ -436,15 +436,26 @@ static int
yppush_foreach(int status, char *key, int keylen, char *val, int vallen,
char *data)
{
- char server[YPMAXRECORD + 2];
+ char *server;
if (status != YP_TRUE)
return (status);
- snprintf(server, sizeof(server), "%.*s", vallen, val);
- if (skip_master && strcasecmp(server, yppush_master) == 0)
+ asprintf(&server, "%.*s", vallen, val);
+
+ /*
+ * Do not stop the iteration on the allocation failure. We
+ * cannot usefully react on low memory condition anyway, and
+ * the failure is more likely due to insane val.
+ */
+ if (server == NULL)
return (0);
+ if (skip_master && strcasecmp(server, yppush_master) == 0) {
+ free(server);
+ return (0);
+ }
+
/*
* Restrict the number of concurrent jobs: if yppush_jobs number
* of jobs have already been dispatched and are still pending,
@@ -454,12 +465,15 @@ yppush_foreach(int status, char *key, int keylen, char
;
/* Cleared for takeoff: set everything in motion. */
- if (yp_push(server, yppush_mapname, yppush_transid))
+ if (yp_push(server, yppush_mapname, yppush_transid)) {
+ free(server);
return(yp_errno);
+ }
/* Bump the job counter and transaction ID. */
yppush_running_jobs++;
yppush_transid++;
+ free(server);
return (0);
}
Modified: stable/11/usr.sbin/ypserv/yp_server.c
==============================================================================
--- stable/11/usr.sbin/ypserv/yp_server.c Mon Sep 2 08:34:45 2019 (r351693)
+++ stable/11/usr.sbin/ypserv/yp_server.c Mon Sep 2 10:20:57 2019 (r351694)
@@ -171,8 +171,9 @@ ypproc_match_2_svc(ypreq_key *argp, struct svc_req *rq
if (do_dns && result.stat != YP_TRUE &&
(strstr(argp->map, "hosts") || strstr(argp->map, "ipnodes"))) {
#endif
- char nbuf[YPMAXRECORD];
+ char *nbuf;
+ nbuf = alloca(argp->key.keydat_len + 1);
/* NUL terminate! NUL terminate!! NUL TERMINATE!!! */
bcopy(argp->key.keydat_val, nbuf, argp->key.keydat_len);
nbuf[argp->key.keydat_len] = '\0';
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 04:50:39 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id EA24FCA344;
Tue, 3 Sep 2019 04:50:39 +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 46Mvf761NQz3JNp;
Tue, 3 Sep 2019 04:50: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 B2D302550F;
Tue, 3 Sep 2019 04:50: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 x834odQa022251;
Tue, 3 Sep 2019 04:50:39 GMT (envelope-from sef@FreeBSD.org)
Received: (from sef@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x834od0V022250;
Tue, 3 Sep 2019 04:50:39 GMT (envelope-from sef@FreeBSD.org)
Message-Id: <201909030450.x834od0V022250@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: sef set sender to sef@FreeBSD.org
using -f
From: Sean Eric Fagan
Date: Tue, 3 Sep 2019 04:50:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r351730 - stable/11/lib/libutil
X-SVN-Group: stable-11
X-SVN-Commit-Author: sef
X-SVN-Commit-Paths: stable/11/lib/libutil
X-SVN-Commit-Revision: 351730
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
X-List-Received-Date: Tue, 03 Sep 2019 04:50:40 -0000
Author: sef
Date: Tue Sep 3 04:50:39 2019
New Revision: 351730
URL: https://svnweb.freebsd.org/changeset/base/351730
Log:
MFC r343881, r343882
r339008 broke repquota for UFS. This rectifies that.
PR: 233849
Modified:
stable/11/lib/libutil/quotafile.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/lib/libutil/quotafile.c
==============================================================================
--- stable/11/lib/libutil/quotafile.c Tue Sep 3 04:16:30 2019 (r351729)
+++ stable/11/lib/libutil/quotafile.c Tue Sep 3 04:50:39 2019 (r351730)
@@ -116,7 +116,8 @@ 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)
return (NULL);
@@ -127,15 +128,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-stable-11@freebsd.org Tue Sep 3 06:41:20 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id A8AB7CDEEF;
Tue, 3 Sep 2019 06:41:20 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
[IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 46My5r3mBrz3Q3t;
Tue, 3 Sep 2019 06:41:20 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
[IPv6:2610:1c1:1:6068::e6a:0])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 65AD92694E;
Tue, 3 Sep 2019 06:41:20 +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 x836fKhX087910;
Tue, 3 Sep 2019 06:41:20 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x836fKSh087909;
Tue, 3 Sep 2019 06:41:20 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201909030641.x836fKSh087909@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
using -f
From: Konstantin Belousov
Date: Tue, 3 Sep 2019 06:41:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r351734 - stable/11/sys/kern
X-SVN-Group: stable-11
X-SVN-Commit-Author: kib
X-SVN-Commit-Paths: stable/11/sys/kern
X-SVN-Commit-Revision: 351734
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
X-List-Received-Date: Tue, 03 Sep 2019 06:41:20 -0000
Author: kib
Date: Tue Sep 3 06:41:19 2019
New Revision: 351734
URL: https://svnweb.freebsd.org/changeset/base/351734
Log:
MFC r351542:
vn_vget_ino_gen(): relock the lower vnode on error.
Modified:
stable/11/sys/kern/vfs_vnops.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/kern/vfs_vnops.c
==============================================================================
--- stable/11/sys/kern/vfs_vnops.c Tue Sep 3 06:40:17 2019 (r351733)
+++ stable/11/sys/kern/vfs_vnops.c Tue Sep 3 06:41:19 2019 (r351734)
@@ -2080,7 +2080,7 @@ vn_vget_ino_gen(struct vnode *vp, vn_get_ino_t alloc,
VOP_UNLOCK(vp, 0);
error = alloc(mp, alloc_arg, lkflags, rvp);
vfs_unbusy(mp);
- if (*rvp != vp)
+ if (error != 0 || *rvp != vp)
vn_lock(vp, ltype | LK_RETRY);
if (vp->v_iflag & VI_DOOMED) {
if (error == 0) {
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:05:46 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 961E2DBE2B;
Tue, 3 Sep 2019 14:05:46 +0000 (UTC)
(envelope-from yuripv@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 46N7yf3GwWz4Npm;
Tue, 3 Sep 2019 14:05:46 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id 4872419AF9; Tue, 3 Sep 2019 14:05:46 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 00D2D1CC17;
Wed, 27 Mar 2019 19:17:46 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4057F8974B;
Wed, 27 Mar 2019 19:17:46 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 140BB1CBAD; Wed, 27 Mar 2019 19:17:46 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 9C0E71CBA7
for ;
Wed, 27 Mar 2019 19:17:43 +0000 (UTC)
(envelope-from wulf@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
[IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 5148889741;
Wed, 27 Mar 2019 19:17:43 +0000 (UTC)
(envelope-from wulf@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
[IPv6:2610:1c1:1:6068::e6a:0])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A1C8B8F6;
Wed, 27 Mar 2019 19:17:43 +0000 (UTC)
(envelope-from wulf@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RJHgii065368;
Wed, 27 Mar 2019 19:17:42 GMT (envelope-from wulf@FreeBSD.org)
Received: (from wulf@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RJHgEB065367;
Wed, 27 Mar 2019 19:17:42 GMT (envelope-from wulf@FreeBSD.org)
Message-Id: <201903271917.x2RJHgEB065367@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: wulf set sender to
wulf@FreeBSD.org using -f
From: Vladimir Kondratyev
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345590 - stable/11/sys/x86/isa
X-SVN-Group: stable-11
X-SVN-Commit-Author: wulf
X-SVN-Commit-Paths: stable/11/sys/x86/isa
X-SVN-Commit-Revision: 345590
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 4057F8974B
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.993,0];
NEURAL_HAM_SHORT(-0.97)[-0.969,0];
ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:05:46 -0000
X-Original-Date: Wed, 27 Mar 2019 19:17:42 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:05:46 -0000
Author: wulf
Date: Wed Mar 27 19:17:42 2019
New Revision: 345590
URL: https://svnweb.freebsd.org/changeset/base/345590
Log:
MFC: r344982, r345022
atrtc(4): install ACPI RTC/CMOS operation region handler
FreeBSD base system does not provide an ACPI handler for the PC/AT RTC/CMOS
device with PnP ID PNP0B00; on some HP laptops, the absence of this handler
causes suspend/resume and poweroff(8) to hang or fail [1], [2]. On these
laptops EC _REG method queries the RTC date/time registers via ACPI
before suspending/powering off. The handler should be registered before
acpi_ec driver is loaded.
This change adds handler to access CMOS RTC operation region described in
section 9.15 of ACPI-6.2 specification [3]. It is installed only for ACPI
version of atrtc(4) so it should not affect old ACPI-less i386 systems.
It is possible to disable the handler with loader tunable:
debug.acpi.disabled=atrtc
Informational debugging printf can be enabled by setting hw.acpi.verbose=1
in loader.conf
[1] https://wiki.freebsd.org/Laptops/HP_Envy_6Z-1100
[2] https://wiki.freebsd.org/Laptops/HP_Notebook_15-af104ur
[3] https://uefi.org/sites/default/files/resources/ACPI_6_2.pdf
PR: 207419, 213039
Submitted by: Anthony Jenkins
Reviewed by: ian
Discussed on: acpi@, 2013-2015, several threads
Differential Revision: https://reviews.freebsd.org/D19314
Modified:
stable/11/sys/x86/isa/atrtc.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/x86/isa/atrtc.c
==============================================================================
--- stable/11/sys/x86/isa/atrtc.c Wed Mar 27 19:16:03 2019 (r345589)
+++ stable/11/sys/x86/isa/atrtc.c Wed Mar 27 19:17:42 2019 (r345590)
@@ -30,6 +30,7 @@
#include
__FBSDID("$FreeBSD$");
+#include "opt_acpi.h"
#include "opt_isa.h"
#include
@@ -52,6 +53,12 @@ __FBSDID("$FreeBSD$");
#endif
#include
#include "clock_if.h"
+#ifdef DEV_ACPI
+#include
+#include
+#include
+#include
+#endif
/*
* atrtc_lock protects low-level access to individual hardware registers.
@@ -70,6 +77,11 @@ static int rtc_reg = -1;
static u_char rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF;
static u_char rtc_statusb = RTCSB_24HR;
+#ifdef DEV_ACPI
+#define _COMPONENT ACPI_TIMER
+ACPI_MODULE_NAME("ATRTC")
+#endif
+
/*
* RTC support routines
*/
@@ -185,6 +197,9 @@ struct atrtc_softc {
struct resource *intr_res;
void *intr_handler;
struct eventtimer et;
+#ifdef DEV_ACPI
+ ACPI_HANDLE acpi_handle;
+#endif
};
static int
@@ -239,7 +254,145 @@ rtc_intr(void *arg)
return(flag ? FILTER_HANDLED : FILTER_STRAY);
}
+#ifdef DEV_ACPI
/*
+ * ACPI RTC CMOS address space handler
+ */
+#define ATRTC_LAST_REG 0x40
+
+static void
+rtcin_region(int reg, void *buf, int len)
+{
+ u_char *ptr = buf;
+
+ /* Drop lock after each IO as intr and settime have greater priority */
+ while (len-- > 0)
+ *ptr++ = rtcin(reg++) & 0xff;
+}
+
+static void
+rtcout_region(int reg, const void *buf, int len)
+{
+ const u_char *ptr = buf;
+
+ while (len-- > 0)
+ writertc(reg++, *ptr++);
+}
+
+static bool
+atrtc_check_cmos_access(bool is_read, ACPI_PHYSICAL_ADDRESS addr, UINT32 len)
+{
+
+ /* Block address space wrapping on out-of-bound access */
+ if (addr >= ATRTC_LAST_REG || addr + len > ATRTC_LAST_REG)
+ return (false);
+
+ if (is_read) {
+ /* Reading 0x0C will muck with interrupts */
+ if (addr <= RTC_INTR && addr + len > RTC_INTR)
+ return (false);
+ } else {
+ /*
+ * Allow single-byte writes to alarm registers and
+ * multi-byte writes to addr >= 0x30, else deny.
+ */
+ if (!((len == 1 && (addr == RTC_SECALRM ||
+ addr == RTC_MINALRM ||
+ addr == RTC_HRSALRM)) ||
+ addr >= 0x30))
+ return (false);
+ }
+ return (true);
+}
+
+static ACPI_STATUS
+atrtc_acpi_cmos_handler(UINT32 func, ACPI_PHYSICAL_ADDRESS addr,
+ UINT32 bitwidth, UINT64 *value, void *context, void *region_context)
+{
+ device_t dev = context;
+ UINT32 bytewidth = howmany(bitwidth, 8);
+ bool is_read = func == ACPI_READ;
+
+ /* ACPICA is very verbose on CMOS handler failures, so we, too */
+#define CMOS_HANDLER_ERR(fmt, ...) \
+ device_printf(dev, "ACPI [SystemCMOS] handler: " fmt, ##__VA_ARGS__)
+
+ ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
+
+ if (value == NULL) {
+ CMOS_HANDLER_ERR("NULL parameter\n");
+ return (AE_BAD_PARAMETER);
+ }
+ if (bitwidth == 0 || (bitwidth & 0x07) != 0) {
+ CMOS_HANDLER_ERR("Invalid bitwidth: %u\n", bitwidth);
+ return (AE_BAD_PARAMETER);
+ }
+ if (!atrtc_check_cmos_access(is_read, addr, bytewidth)) {
+ CMOS_HANDLER_ERR("%s access rejected: addr=%#04jx, len=%u\n",
+ is_read ? "Read" : "Write", (uintmax_t)addr, bytewidth);
+ return (AE_BAD_PARAMETER);
+ }
+
+ switch (func) {
+ case ACPI_READ:
+ rtcin_region(addr, value, bytewidth);
+ break;
+ case ACPI_WRITE:
+ rtcout_region(addr, value, bytewidth);
+ break;
+ default:
+ CMOS_HANDLER_ERR("Invalid function: %u\n", func);
+ return (AE_BAD_PARAMETER);
+ }
+
+ ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev),
+ "ACPI RTC CMOS %s access: addr=%#04x, len=%u, val=%*D\n",
+ is_read ? "read" : "write", (unsigned)addr, bytewidth,
+ bytewidth, value, " ");
+
+ return (AE_OK);
+}
+
+static int
+atrtc_reg_acpi_cmos_handler(device_t dev)
+{
+ struct atrtc_softc *sc = device_get_softc(dev);
+
+ ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__);
+
+ /* Don't handle address space events if driver is disabled. */
+ if (acpi_disabled("atrtc"))
+ return (ENXIO);
+
+ sc->acpi_handle = acpi_get_handle(dev);
+ if (sc->acpi_handle == NULL ||
+ ACPI_FAILURE(AcpiInstallAddressSpaceHandler(sc->acpi_handle,
+ ACPI_ADR_SPACE_CMOS, atrtc_acpi_cmos_handler, NULL, dev))) {
+ sc->acpi_handle = NULL;
+ device_printf(dev,
+ "Can't register ACPI CMOS address space handler\n");
+ return (ENXIO);
+ }
+
+ return (0);
+}
+
+static int
+atrtc_unreg_acpi_cmos_handler(device_t dev)
+{
+ struct atrtc_softc *sc = device_get_softc(dev);
+
+ ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__);
+
+ if (sc->acpi_handle != NULL)
+ AcpiRemoveAddressSpaceHandler(sc->acpi_handle,
+ ACPI_ADR_SPACE_CMOS, atrtc_acpi_cmos_handler);
+
+ return (0);
+}
+#endif /* DEV_ACPI */
+
+/*
* Attach to the ISA PnP descriptors for the timer and realtime clock.
*/
static struct isa_pnp_id atrtc_ids[] = {
@@ -311,6 +464,37 @@ atrtc_attach(device_t dev)
}
static int
+atrtc_isa_attach(device_t dev)
+{
+
+ return (atrtc_attach(dev));
+}
+
+#ifdef DEV_ACPI
+static int
+atrtc_acpi_attach(device_t dev)
+{
+ int ret;
+
+ ret = atrtc_attach(dev);
+ if (ret)
+ return (ret);
+
+ (void)atrtc_reg_acpi_cmos_handler(dev);
+
+ return (0);
+}
+
+static int
+atrtc_acpi_detach(device_t dev)
+{
+
+ (void)atrtc_unreg_acpi_cmos_handler(dev);
+ return (0);
+}
+#endif /* DEV_ACPI */
+
+static int
atrtc_resume(device_t dev)
{
@@ -396,10 +580,10 @@ atrtc_gettime(device_t dev, struct timespec *ts)
return (clock_bcd_to_ts(&bct, ts, false));
}
-static device_method_t atrtc_methods[] = {
+static device_method_t atrtc_isa_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, atrtc_probe),
- DEVMETHOD(device_attach, atrtc_attach),
+ DEVMETHOD(device_attach, atrtc_isa_attach),
DEVMETHOD(device_detach, bus_generic_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
@@ -413,13 +597,38 @@ static device_method_t atrtc_methods[] = {
{ 0, 0 }
};
-static driver_t atrtc_driver = {
+static driver_t atrtc_isa_driver = {
"atrtc",
- atrtc_methods,
+ atrtc_isa_methods,
sizeof(struct atrtc_softc),
};
+#ifdef DEV_ACPI
+static device_method_t atrtc_acpi_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, atrtc_probe),
+ DEVMETHOD(device_attach, atrtc_acpi_attach),
+ DEVMETHOD(device_detach, atrtc_acpi_detach),
+ /* XXX stop statclock? */
+ DEVMETHOD(device_resume, atrtc_resume),
+
+ /* clock interface */
+ DEVMETHOD(clock_gettime, atrtc_gettime),
+ DEVMETHOD(clock_settime, atrtc_settime),
+
+ { 0, 0 }
+};
+
+static driver_t atrtc_acpi_driver = {
+ "atrtc",
+ atrtc_acpi_methods,
+ sizeof(struct atrtc_softc),
+};
+#endif /* DEV_ACPI */
+
static devclass_t atrtc_devclass;
-DRIVER_MODULE(atrtc, isa, atrtc_driver, atrtc_devclass, 0, 0);
-DRIVER_MODULE(atrtc, acpi, atrtc_driver, atrtc_devclass, 0, 0);
+DRIVER_MODULE(atrtc, isa, atrtc_isa_driver, atrtc_devclass, 0, 0);
+#ifdef DEV_ACPI
+DRIVER_MODULE(atrtc, acpi, atrtc_acpi_driver, atrtc_devclass, 0, 0);
+#endif
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:05:51 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4D9FEDBF6E;
Tue, 3 Sep 2019 14:05:51 +0000 (UTC)
(envelope-from yuripv@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 46N7yl0YTsz4Nv7;
Tue, 3 Sep 2019 14:05:51 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id 3C39E19CA6; Tue, 3 Sep 2019 14:05:49 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 1CBA01E607;
Fri, 29 Mar 2019 01:40:52 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 465216E8DE;
Fri, 29 Mar 2019 01:40:51 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 1B72F1E5A0; Fri, 29 Mar 2019 01:40:51 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 47BF51E59E
for ;
Fri, 29 Mar 2019 01:40:48 +0000 (UTC)
(envelope-from philip@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
[IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 022386E8CB;
Fri, 29 Mar 2019 01:40:48 +0000 (UTC)
(envelope-from philip@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
[IPv6:2610:1c1:1:6068::e6a:0])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D14C727C0C;
Fri, 29 Mar 2019 01:40:47 +0000 (UTC)
(envelope-from philip@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2T1elvU038752;
Fri, 29 Mar 2019 01:40:47 GMT (envelope-from philip@FreeBSD.org)
Received: (from philip@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2T1eir7038737;
Fri, 29 Mar 2019 01:40:44 GMT (envelope-from philip@FreeBSD.org)
Message-Id: <201903290140.x2T1eir7038737@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: philip set sender to
philip@FreeBSD.org using -f
From: Philip Paeps
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345670 - stable/11/contrib/tzdata
X-SVN-Group: stable-11
X-SVN-Commit-Author: philip
X-SVN-Commit-Paths: stable/11/contrib/tzdata
X-SVN-Commit-Revision: 345670
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 465216E8DE
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.97 / 15.00];
local_wl_from(0.00)[freebsd.org];
NEURAL_HAM_MEDIUM(-1.00)[-0.995,0];
NEURAL_HAM_SHORT(-0.98)[-0.976,0];
ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:05:51 -0000
X-Original-Date: Fri, 29 Mar 2019 01:40:44 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:05:51 -0000
Author: philip
Date: Fri Mar 29 01:40:44 2019
New Revision: 345670
URL: https://svnweb.freebsd.org/changeset/base/345670
Log:
MFC r345524: Import tzdata 2019a
Modified:
stable/11/contrib/tzdata/Makefile
stable/11/contrib/tzdata/NEWS
stable/11/contrib/tzdata/README
stable/11/contrib/tzdata/africa
stable/11/contrib/tzdata/asia
stable/11/contrib/tzdata/backward
stable/11/contrib/tzdata/backzone
stable/11/contrib/tzdata/etcetera
stable/11/contrib/tzdata/europe
stable/11/contrib/tzdata/leap-seconds.list
stable/11/contrib/tzdata/leapseconds
stable/11/contrib/tzdata/northamerica
stable/11/contrib/tzdata/theory.html
stable/11/contrib/tzdata/version
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/contrib/tzdata/Makefile
==============================================================================
--- stable/11/contrib/tzdata/Makefile Fri Mar 29 01:39:20 2019 (r345669)
+++ stable/11/contrib/tzdata/Makefile Fri Mar 29 01:40:44 2019 (r345670)
@@ -12,7 +12,10 @@ VERSION= unknown
# Email address for bug reports.
BUGEMAIL= tz@iana.org
-# Choose source data features. To get new features right away, use:
+# DATAFORM selects the data format.
+# Available formats represent essentially the same data, albeit
+# possibly with minor discrepancies that users are not likely to notice.
+# To get new features and the best data right away, use:
# DATAFORM= vanguard
# To wait a while before using new features, to give downstream users
# time to upgrade zic (the default), use:
@@ -33,11 +36,11 @@ DATAFORM= main
LOCALTIME= GMT
# If you want something other than Eastern United States time as a template
-# for handling POSIX-style timezone environment variables,
+# for handling ruleless POSIX-style timezone environment variables,
# change the line below (after finding the timezone you want in the
# one of the $(TDATA) source files, or adding it to a source file).
-# When a POSIX-style environment variable is handled, the rules in the
-# template file are used to determine "spring forward" and "fall back" days and
+# A ruleless environment setting like TZ='CST6CDT' uses the rules in the
+# template file to determine "spring forward" and "fall back" days and
# times; the environment variable itself specifies UT offsets of standard and
# daylight saving time.
# Alternatively, if you discover you've got the wrong timezone, you can just
@@ -46,7 +49,6 @@ LOCALTIME= GMT
# Use the command
# make zonenames
# to get a list of the values you can use for POSIXRULES.
-# If you want POSIX compatibility, use "America/New_York".
POSIXRULES= America/New_York
@@ -113,8 +115,8 @@ TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TI
TIME_T_ALTERNATIVES_HEAD = int64_t
TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t
-# What kind of TZif data files to generate.
-# (TZif is the binary time zone data format that zic generates.)
+# What kind of TZif data files to generate. (TZif is the binary time
+# zone data format that zic generates; see Internet RFC 8536.)
# If you want only POSIX time, with time values interpreted as
# seconds since the epoch (not counting leap seconds), use
# REDO= posix_only
@@ -360,6 +362,9 @@ LEAPSECONDS=
zic= ./zic
ZIC= $(zic) $(ZFLAGS)
+# To shrink the size of installed TZif files,
+# append "-r @N" to omit data before N-seconds-after-the-Epoch.
+# See the zic man page for more about -r.
ZFLAGS=
# How to use zic to install TZif files.
@@ -491,7 +496,8 @@ MANTXTS= newctime.3.txt newstrftime.3.txt newtzset.3.t
COMMON= calendars CONTRIBUTING LICENSE Makefile \
NEWS README theory.html version
WEB_PAGES= tz-art.html tz-how-to.html tz-link.html
-CHECK_WEB_PAGES=check_tz-art.html check_tz-how-to.html check_tz-link.html
+CHECK_WEB_PAGES=check_theory.html check_tz-art.html \
+ check_tz-how-to.html check_tz-link.html
DOCS= $(MANS) date.1 $(MANTXTS) $(WEB_PAGES)
PRIMARY_YDATA= africa antarctica asia australasia \
europe northamerica southamerica
@@ -804,9 +810,10 @@ check_tzs: $(TZS) $(TZS_NEW)
touch $@
check_web: $(CHECK_WEB_PAGES)
+check_theory.html: theory.html
check_tz-art.html: tz-art.html
check_tz-link.html: tz-link.html
-check_tz-art.html check_tz-link.html:
+check_theory.html check_tz-art.html check_tz-link.html:
$(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \
-F file=@$$(expr $@ : 'check_\(.*\)') -o $@.out && \
test ! -s $@.out || { cat $@.out; exit 1; }
@@ -840,11 +847,13 @@ check_zishrink_posix check_zishrink_right: \
touch $@
clean_misc:
+ rm -fr check_*.dir
rm -f *.o *.out $(TIME_T_ALTERNATIVES) \
check_* core typecheck_* \
date tzselect version.h zdump zic yearistype libtz.a
clean: clean_misc
- rm -fr *.dir *.zi tzdb-*/ $(TZS_NEW)
+ rm -fr *.dir tzdb-*/
+ rm -f *.zi $(TZS_NEW)
maintainer-clean: clean
@echo 'This command is intended for maintainers to use; it'
Modified: stable/11/contrib/tzdata/NEWS
==============================================================================
--- stable/11/contrib/tzdata/NEWS Fri Mar 29 01:39:20 2019 (r345669)
+++ stable/11/contrib/tzdata/NEWS Fri Mar 29 01:40:44 2019 (r345670)
@@ -1,5 +1,53 @@
News for the tz database
+Release 20198 - 2019-03-25 22:01:33 -0700
+
+ Briefly:
+ Palestine "springs forward" on 2019-03-30 instead of 2019-03-23.
+ Metlakatla "fell back" to rejoin Alaska Time on 2019-01-20 at 02:00.
+
+ Changes to past and future timestamps
+
+ Palestine will not start DST until 2019-03-30, instead of 2019-03-23 as
+ previously predicted. Adjust our prediction by guessing that spring
+ transitions will be between 24 and 30 March, which matches recent practice
+ since 2016. (Thanks to Even Scharning and Tim Parenti.)
+
+ Metlakatla ended its observance of Pacific standard time,
+ rejoining Alaska Time, on 2019-01-20 at 02:00. (Thanks to Ryan
+ Stanley and Tim Parenti.)
+
+ Changes to past timestamps
+
+ Israel observed DST in 1980 (08-02/09-13) and 1984 (05-05/08-25).
+ (Thanks to Alois Treindl and Isaac Starkman.)
+
+ Changes to time zone abbreviations
+
+ Etc/UCT is now a backward-compatibility link to Etc/UTC, instead
+ of being a separate zone that generates the abbreviation "UCT",
+ which nowadays is typically a typo. (Problem reported by Isiah
+ Meadows.)
+
+ Changes to code
+
+ zic now has an -r option to limit the time range of output data.
+ For example, 'zic -r @1000000000' limits the output data to
+ timestamps starting 1000000000 seconds after the Epoch.
+ This helps shrink output size and can be useful for applications
+ not needing the full timestamp history, such as TZDIST truncation;
+ see Internet RFC 8536 section 5.1. (Inspired by a feature request
+ from Christopher Wong, helped along by bug reports from Wong and
+ from Tim Parenti.)
+
+ Changes to documentation
+
+ Mention Internet RFC 8536 (February 2019), which documents TZif.
+
+ tz-link.html now cites tzdata-meta
+ .
+
+
Release 2018i - 2018-12-30 11:05:43 -0800
Briefly:
@@ -400,8 +448,9 @@ Release 2018d - 2018-03-22 07:05:46 -0700
downstream parsers do not support it.
* The build procedure constructs three files vanguard.zi, main.zi,
- and rearguard.zi, one for each format. The files represent the
- same data as closely as the formats allow. These three files
+ and rearguard.zi, one for each format. Although the files
+ represent essentially the same data, they may have minor
+ discrepancies that users are not likely to notice. The files
are intended for downstream data consumers and are not
installed. Zoneinfo parsers that do not support negative SAVE values
should start using rearguard.zi, so that they will be unaffected
Modified: stable/11/contrib/tzdata/README
==============================================================================
--- stable/11/contrib/tzdata/README Fri Mar 29 01:39:20 2019 (r345669)
+++ stable/11/contrib/tzdata/README Fri Mar 29 01:40:44 2019 (r345670)
@@ -1,7 +1,7 @@
README for the tz distribution
-"What time is it?" -- Richard Deacon as The King
-"Any time you want it to be." -- Frank Baxter as The Scientist
+"Where do I set the hands of the clock?" -- Les Tremayne as The King
+"Oh that--you can set them any place you want." -- Frank Baxter as The Scientist
(from the Bell System film "About Time")
The Time Zone Database (called tz, tzdb or zoneinfo) contains code and
Modified: stable/11/contrib/tzdata/africa
==============================================================================
--- stable/11/contrib/tzdata/africa Fri Mar 29 01:39:20 2019 (r345669)
+++ stable/11/contrib/tzdata/africa Fri Mar 29 01:40:44 2019 (r345670)
@@ -364,6 +364,11 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct
# See Africa/Lagos.
# Eritrea
+# See Africa/Nairobi.
+
+# Eswatini (formerly Swaziland)
+# See Africa/Johannesburg.
+
# Ethiopia
# See Africa/Nairobi.
#
@@ -1188,7 +1193,7 @@ Zone Africa/Johannesburg 1:52:00 - LMT 1892 Feb 8
1:30 - SAST 1903 Mar
2:00 SA SAST
Link Africa/Johannesburg Africa/Maseru # Lesotho
-Link Africa/Johannesburg Africa/Mbabane # Swaziland
+Link Africa/Johannesburg Africa/Mbabane # Eswatini
#
# Marion and Prince Edward Is
# scientific station since 1947
@@ -1229,9 +1234,6 @@ Zone Africa/Khartoum 2:10:08 - LMT 1931
Zone Africa/Juba 2:06:28 - LMT 1931
2:00 Sudan CA%sT 2000 Jan 15 12:00
3:00 - EAT
-
-# Swaziland
-# See Africa/Johannesburg.
# Tanzania
# See Africa/Nairobi.
Modified: stable/11/contrib/tzdata/asia
==============================================================================
--- stable/11/contrib/tzdata/asia Fri Mar 29 01:39:20 2019 (r345669)
+++ stable/11/contrib/tzdata/asia Fri Mar 29 01:40:44 2019 (r345670)
@@ -1620,6 +1620,24 @@ Rule Zion 1974 only - Jul 7 0:00 1:00 D
Rule Zion 1974 only - Oct 13 0:00 0 S
Rule Zion 1975 only - Apr 20 0:00 1:00 D
Rule Zion 1975 only - Aug 31 0:00 0 S
+
+# From Alois Treindl (2019-03-06):
+# http://www.moin.gov.il/Documents/שעון קיץ/clock-50-years-7-2014.pdf
+# From Isaac Starkman (2019-03-06):
+# Summer time was in that period in 1980 and 1984, see
+# https://www.ynet.co.il/articles/0,7340,L-3951073,00.html
+# You can of course read it in translation.
+# I checked the local newspapers for that years.
+# It started on midnight and end at 01.00 am.
+# From Paul Eggert (2019-03-06):
+# Also see this thread about the moin.gov.il URL:
+# https://mm.icann.org/pipermail/tz/2018-November/027194.html
+Rule Zion 1980 only - Aug 2 0:00 1:00 D
+Rule Zion 1980 only - Sep 13 1:00 0 S
+Rule Zion 1984 only - May 5 0:00 1:00 D
+Rule Zion 1984 only - Aug 25 1:00 0 S
+
+# From Shanks & Pottenger:
Rule Zion 1985 only - Apr 14 0:00 1:00 D
Rule Zion 1985 only - Sep 15 0:00 0 S
Rule Zion 1986 only - May 18 0:00 1:00 D
@@ -3071,9 +3089,15 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
# the official website, though the decree did not specify the exact
# time of the time shift.
# http://www.palestinecabinet.gov.ps/Website/AR/NDecrees/ViewFile.ashx?ID=e7a42ab7-ee23-435a-b9c8-a4f7e81f3817
+
+# From Even Scharning (2019-03-23):
+# DST in Palestine will start on 30 March this year, not 23 March as the time
+# zone database predicted.
+# https://ramallah.news/post/123610
#
-# From Paul Eggert (2018-03-16):
-# For 2016 on, predict spring transitions on March's fourth Saturday at 01:00.
+# From Tim Parenti (2019-03-23):
+# Combining this with the rules observed since 2016, adjust our spring
+# transition guess to Mar Sat>=24.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule EgyptAsia 1957 only - May 10 0:00 1:00 S
@@ -3104,7 +3128,7 @@ Rule Palestine 2012 only - Sep 21 1:00 0 -
Rule Palestine 2013 only - Sep Fri>=21 0:00 0 -
Rule Palestine 2014 2015 - Oct Fri>=21 0:00 0 -
Rule Palestine 2015 only - Mar lastFri 24:00 1:00 S
-Rule Palestine 2016 max - Mar Sat>=22 1:00 1:00 S
+Rule Palestine 2016 max - Mar Sat>=24 1:00 1:00 S
Rule Palestine 2016 max - Oct lastSat 1:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
@@ -3595,6 +3619,18 @@ Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 Jul 1
7:00 - +07 1959 Dec 31 23:00
8:00 - +08 1975 Jun 13
7:00 - +07
+
+# From Paul Eggert (2019-02-19):
+#
+# The Ho Chi Minh entry suffices for most purposes as it agrees with all of
+# Vietnam since 1975-06-13. Presumably clocks often changed in south Vietnam
+# in the early 1970s as locations changed hands during the war; however the
+# details are unknown and would likely be too voluminous for this database.
+#
+# For timestamps in north Vietnam back to 1970 (the tzdb cutoff),
+# use Asia/Bangkok; see the VN entries in the file zone1970.tab.
+# For timestamps before 1970, see Asia/Hanoi in the file 'backzone'.
+
# Yemen
# See Asia/Riyadh.
Modified: stable/11/contrib/tzdata/backward
==============================================================================
--- stable/11/contrib/tzdata/backward Fri Mar 29 01:39:20 2019 (r345669)
+++ stable/11/contrib/tzdata/backward Fri Mar 29 01:40:44 2019 (r345670)
@@ -77,6 +77,7 @@ Link Pacific/Easter Chile/EasterIsland
Link America/Havana Cuba
Link Africa/Cairo Egypt
Link Europe/Dublin Eire
+Link Etc/UTC Etc/UCT
Link Europe/London Europe/Belfast
Link Europe/Chisinau Europe/Tiraspol
Link Europe/London GB
@@ -111,7 +112,7 @@ Link Asia/Taipei ROC
Link Asia/Seoul ROK
Link Asia/Singapore Singapore
Link Europe/Istanbul Turkey
-Link Etc/UCT UCT
+Link Etc/UTC UCT
Link America/Anchorage US/Alaska
Link America/Adak US/Aleutian
Link America/Phoenix US/Arizona
Modified: stable/11/contrib/tzdata/backzone
==============================================================================
--- stable/11/contrib/tzdata/backzone Fri Mar 29 01:39:20 2019 (r345669)
+++ stable/11/contrib/tzdata/backzone Fri Mar 29 01:40:44 2019 (r345670)
@@ -204,7 +204,7 @@ Zone Africa/Maseru 1:50:00 - LMT 1903 Mar
2:00 1:00 SAST 1944 Mar 19 2:00
2:00 - SAST
-# Swaziland
+# Eswatini (formerly Swaziland)
Zone Africa/Mbabane 2:04:24 - LMT 1903 Mar
2:00 - SAST
@@ -625,7 +625,7 @@ Zone Europe/Sarajevo 1:13:40 - LMT 1884
1:00 - CET 1982 Nov 27
1:00 EU CE%sT
-# Macedonia
+# North Macedonia
Zone Europe/Skopje 1:25:44 - LMT 1884
1:00 - CET 1941 Apr 18 23:00
1:00 C-Eur CE%sT 1945 May 8 2:00s
Modified: stable/11/contrib/tzdata/etcetera
==============================================================================
--- stable/11/contrib/tzdata/etcetera Fri Mar 29 01:39:20 2019 (r345669)
+++ stable/11/contrib/tzdata/etcetera Fri Mar 29 01:40:44 2019 (r345670)
@@ -19,7 +19,6 @@
Zone Etc/GMT 0 - GMT
Zone Etc/UTC 0 - UTC
-Zone Etc/UCT 0 - UCT
# The following link uses older naming conventions,
# but it belongs here, not in the file 'backward',
Modified: stable/11/contrib/tzdata/europe
==============================================================================
--- stable/11/contrib/tzdata/europe Fri Mar 29 01:39:20 2019 (r345669)
+++ stable/11/contrib/tzdata/europe Fri Mar 29 01:40:44 2019 (r345670)
@@ -1855,7 +1855,7 @@ Zone Europe/Luxembourg 0:24:36 - LMT 1904 Jun
1:00 Belgium CE%sT 1977
1:00 EU CE%sT
-# Macedonia
+# North Macedonia
# See Europe/Belgrade.
# Malta
@@ -3359,7 +3359,7 @@ Zone Europe/Belgrade 1:22:00 - LMT 1884
Link Europe/Belgrade Europe/Ljubljana # Slovenia
Link Europe/Belgrade Europe/Podgorica # Montenegro
Link Europe/Belgrade Europe/Sarajevo # Bosnia and Herzegovina
-Link Europe/Belgrade Europe/Skopje # Macedonia
+Link Europe/Belgrade Europe/Skopje # North Macedonia
Link Europe/Belgrade Europe/Zagreb # Croatia
# Slovakia
Modified: stable/11/contrib/tzdata/leap-seconds.list
==============================================================================
--- stable/11/contrib/tzdata/leap-seconds.list Fri Mar 29 01:39:20 2019 (r345669)
+++ stable/11/contrib/tzdata/leap-seconds.list Fri Mar 29 01:40:44 2019 (r345670)
@@ -204,10 +204,10 @@
# current -- the update time stamp, the data and the name of the file
# will not change.
#
-# Updated through IERS Bulletin C56
-# File expires on: 28 June 2019
+# Updated through IERS Bulletin C57
+# File expires on: 28 December 2019
#
-#@ 3770668800
+#@ 3786480000
#
2272060800 10 # 1 Jan 1972
2287785600 11 # 1 Jul 1972
@@ -252,4 +252,4 @@
# the hash line is also ignored in the
# computation.
#
-#h 62ca19f6 96a4ae0a 3708451c 9f8693f4 016604eb
+#h 83c68138 d3650221 07dbbbcd 11fcc859 ced1106a
Modified: stable/11/contrib/tzdata/leapseconds
==============================================================================
--- stable/11/contrib/tzdata/leapseconds Fri Mar 29 01:39:20 2019 (r345669)
+++ stable/11/contrib/tzdata/leapseconds Fri Mar 29 01:40:44 2019 (r345670)
@@ -63,7 +63,7 @@ Leap 2016 Dec 31 23:59:60 + S
# POSIX timestamps for the data in this file:
#updated 1467936000
-#expires 1561680000
+#expires 1577491200
-# Updated through IERS Bulletin C56
-# File expires on: 28 June 2019
+# Updated through IERS Bulletin C57
+# File expires on: 28 December 2019
Modified: stable/11/contrib/tzdata/northamerica
==============================================================================
--- stable/11/contrib/tzdata/northamerica Fri Mar 29 01:39:20 2019 (r345669)
+++ stable/11/contrib/tzdata/northamerica Fri Mar 29 01:40:44 2019 (r345670)
@@ -609,6 +609,15 @@ Zone America/Los_Angeles -7:52:58 - LMT 1883 Nov 18 12
# In a 2018-12-11 special election, Metlakatla voted to go back to
# Alaska time (including daylight saving time) starting next year.
# https://www.krbd.org/2018/12/12/metlakatla-to-follow-alaska-standard-time-allow-liquor-sales/
+#
+# From Ryan Stanley (2019-01-11):
+# The community will be changing back on the 20th of this month...
+# From Tim Parenti (2019-01-11):
+# Per an announcement on the Metlakatla community's official Facebook page, the
+# "fall back" will be on Sunday 2019-01-20 at 02:00:
+# https://www.facebook.com/141055983004923/photos/607150969728753/
+# So they won't be waiting for Alaska to join them on 2019-03-10, but will
+# rather change their clocks twice in seven weeks.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Juneau 15:02:19 - LMT 1867 Oct 19 15:33:32
@@ -637,7 +646,7 @@ Zone America/Metlakatla 15:13:42 - LMT 1867 Oct 19 15
-8:00 US P%sT 1983 Oct 30 2:00
-8:00 - PST 2015 Nov 1 2:00
-9:00 US AK%sT 2018 Nov 4 2:00
- -8:00 - PST 2019 Mar Sun>=8 3:00
+ -8:00 - PST 2019 Jan 20 2:00
-9:00 US AK%sT
Zone America/Yakutat 14:41:05 - LMT 1867 Oct 19 15:12:18
-9:18:55 - LMT 1900 Aug 20 12:00
Modified: stable/11/contrib/tzdata/theory.html
==============================================================================
--- stable/11/contrib/tzdata/theory.html Fri Mar 29 01:39:20 2019 (r345669)
+++ stable/11/contrib/tzdata/theory.html Fri Mar 29 01:40:44 2019 (r345670)
@@ -15,7 +15,7 @@
- Scope of the
tz
database
- - Names of timezones
+ - Timezone identifiers
- Time zone abbreviations
- Accuracy of the
tz
database
@@ -107,9 +107,9 @@ It does not always make sense to talk about a timezone
- Names of timezones
+ Timezone identifiers
-Each timezone has a unique name.
+Each timezone has a name that uniquely identifies the timezone.
Inexperienced users are not expected to select these names unaided.
Distributors should provide documentation and/or a simple selection
interface that explains each name via a map or via descriptive text like
@@ -142,10 +142,12 @@ among the following goals:
-
Be robust in the presence of political changes.
- For example, names of countries are ordinarily not used, to avoid
+ For example, names are typically not tied to countries, to avoid
incompatibilities when countries change their name (e.g.,
- Zaire→Congo) or when locations change countries (e.g., Hong
+ Swaziland→Eswatini) or when locations change countries (e.g., Hong
Kong from UK colony to China).
+ There is no requirement that every country or national
+ capital must have a timezone name.
-
Be portable to a wide variety of implementations.
@@ -215,19 +217,18 @@ in decreasing order of importance:
do not need locations, since local time is not defined there.
-
- There should typically be at least one name for each ISO
- 3166-1 officially assigned two-letter code for an inhabited
- country or territory.
-
- -
If all the clocks in a timezone have agreed since 1970,
do not bother to include more than one timezone
even if some of the clocks disagreed before 1970.
Otherwise these tables would become annoyingly large.
-
+ If boundaries between regions are fluid, such as during a war or
+ insurrection, do not bother to create a new timezone merely
+ because of yet another boundary change. This helps prevent table
+ bloat and simplifies maintenance.
+
+ -
If a name is ambiguous, use a less ambiguous alternative;
e.g., many cities are named San José and Georgetown, so
prefer
America/Costa_Rica
to
@@ -299,29 +300,23 @@ in decreasing order of importance:
-The file 'zone1970.tab
' lists geographical locations used
-to name timezones.
-It is intended to be an exhaustive list of names for geographic
-regions as described above; this is a subset of the timezones in the data.
-Although a 'zone1970.tab
' location's
-longitude
-corresponds to
-its local mean
-time (LMT) offset with one hour for every 15°
-east longitude, this relationship is not exact.
+Guidelines have evolved with time, and names following old versions of
+this guideline might not follow the current version. When guidelines
+have changed, old names continue to be supported. Guideline changes
+have included the following:
-
-Older versions of this package used a different naming scheme,
-and these older names are still supported.
+
+-
+Older versions of this package used a different naming scheme.
See the file '
backward
' for most of these older names
(e.g., 'US/Eastern
' instead of 'America/New_York
').
The other old-fashioned names still supported are
'WET
', 'CET
', 'MET
', and
'EET
' (see the file 'europe
').
-
+
-
+
Older versions of this package defined legacy names that are
incompatible with the first guideline of location names, but which are
still supported.
@@ -332,6 +327,31 @@ Also, the file 'backward
' defines the leg
and the file 'northamerica
' defines the legacy names
'EST5EDT
', 'CST6CDT
',
'MST7MDT
', and 'PST8PDT
'.
+
+
+
+Older versions of this guideline said that
+there should typically be at least one name for each ISO
+3166-1 officially assigned two-letter code for an inhabited
+country or territory.
+This old guideline has been dropped, as it was not needed to handle
+timestamps correctly and it increased maintenance burden.
+
+
+
+
+The file 'zone1970.tab
' lists geographical locations used
+to name timezones.
+It is intended to be an exhaustive list of names for geographic
+regions as described above; this is a subset of the timezones in the data.
+Although a 'zone1970.tab
' location's
+longitude
+corresponds to
+its local mean
+time (LMT) offset with one hour for every 15°
+east longitude, this relationship is not exact.
@@ -983,7 +1003,9 @@ an older zic
.
constrained to be a string containing abbreviations
and numeric data as described above.
The file's format is TZif,
- a timezone information format that contains binary data.
+ a timezone information format that contains binary data; see
+ Internet
+ RFC 8536.
The daylight saving time rules to be used for a
particular timezone are encoded in the
TZif file; the format of the file allows US,
@@ -1166,7 +1188,7 @@ The tz
code and data supply
-
A set of timezone names as per
- "Names of timezones" above.
+ "Timezone identifiers" above.
-
Library functions described in "Time and date
@@ -1212,6 +1234,17 @@ Interfaces not listed above are less stable.
For example, users should not rely on particular UT
offsets or abbreviations for timestamps, as data entries are often
based on guesswork and these guesses may be corrected or improved.
+
+
+
+Timezone boundaries are not part of the stable interface.
+For example, even though the Asia/Bangkok timezone
+currently includes Chang Mai, Hanoi, and Phnom Penh, this is not part
+of the stable interface and the timezone can split at any time.
+If a calendar application records a future event in some location other
+than Bangkok by putting "Asia/Bangkok" in the event's record,
+the application should be robust in the presence of timezone splits
+between now and the future time.
Modified: stable/11/contrib/tzdata/version
==============================================================================
--- stable/11/contrib/tzdata/version Fri Mar 29 01:39:20 2019 (r345669)
+++ stable/11/contrib/tzdata/version Fri Mar 29 01:40:44 2019 (r345670)
@@ -1 +1 @@
-2018i
+2019a
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:05:49 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 550CDDBEF5;
Tue, 3 Sep 2019 14:05:49 +0000 (UTC)
(envelope-from yuripv@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 46N7yh32bTz4Nrl;
Tue, 3 Sep 2019 14:05:48 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id 8BE6D19BB9; Tue, 3 Sep 2019 14:05:47 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id A168CA3BC;
Thu, 28 Mar 2019 06:10:45 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 52ED286BBF;
Thu, 28 Mar 2019 06:10:45 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 391CAA3BA; Thu, 28 Mar 2019 06:10:45 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id C357DA3B8
for ;
Thu, 28 Mar 2019 06:10:42 +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 903CC86BB6;
Thu, 28 Mar 2019 06:10:42 +0000 (UTC) (envelope-from np@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
[IPv6:2610:1c1:1:6068::e6a:0])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6BFD71AF6F;
Thu, 28 Mar 2019 06:10:42 +0000 (UTC) (envelope-from np@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2S6Agrl021887;
Thu, 28 Mar 2019 06:10:42 GMT (envelope-from np@FreeBSD.org)
Received: (from np@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2S6Ag27021886;
Thu, 28 Mar 2019 06:10:42 GMT (envelope-from np@FreeBSD.org)
Message-Id: <201903280610.x2S6Ag27021886@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org
using -f
From: Navdeep Parhar
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345629 - stable/11/sys/dev/cxgbe/common
X-SVN-Group: stable-11
X-SVN-Commit-Author: np
X-SVN-Commit-Paths: stable/11/sys/dev/cxgbe/common
X-SVN-Commit-Revision: 345629
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 52ED286BBF
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.993,0];
NEURAL_HAM_SHORT(-0.95)[-0.950,0];
ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:05:50 -0000
X-Original-Date: Thu, 28 Mar 2019 06:10:42 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:05:50 -0000
Author: np
Date: Thu Mar 28 06:10:41 2019
New Revision: 345629
URL: https://svnweb.freebsd.org/changeset/base/345629
Log:
MFC r329788 (by jhb@):
Bring in additional constants and message fields for TLS-related messages.
Sponsored by: Chelsio Communications
Modified:
stable/11/sys/dev/cxgbe/common/t4_msg.h
stable/11/sys/dev/cxgbe/common/t4_tcb.h
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/cxgbe/common/t4_msg.h
==============================================================================
--- stable/11/sys/dev/cxgbe/common/t4_msg.h Thu Mar 28 03:48:51 2019 (r345628)
+++ stable/11/sys/dev/cxgbe/common/t4_msg.h Thu Mar 28 06:10:41 2019 (r345629)
@@ -3102,7 +3102,8 @@ struct cpl_rx_mps_pkt {
struct cpl_tx_tls_sfo {
__be32 op_to_seg_len;
__be32 pld_len;
- __be64 rsvd;
+ __be32 type_protover;
+ __be32 r1_lo;
__be32 seqno_numivs;
__be32 ivgen_hdrlen;
__be64 scmd1;
@@ -3126,15 +3127,28 @@ struct cpl_tx_tls_sfo {
#define V_CPL_TX_TLS_SFO_CPL_LEN(x) ((x) << S_CPL_TX_TLS_SFO_CPL_LEN)
#define G_CPL_TX_TLS_SFO_CPL_LEN(x) \
(((x) >> S_CPL_TX_TLS_SFO_CPL_LEN) & M_CPL_TX_TLS_SFO_CPL_LEN)
+
#define S_CPL_TX_TLS_SFO_SEG_LEN 0
#define M_CPL_TX_TLS_SFO_SEG_LEN 0xffff
#define V_CPL_TX_TLS_SFO_SEG_LEN(x) ((x) << S_CPL_TX_TLS_SFO_SEG_LEN)
#define G_CPL_TX_TLS_SFO_SEG_LEN(x) \
(((x) >> S_CPL_TX_TLS_SFO_SEG_LEN) & M_CPL_TX_TLS_SFO_SEG_LEN)
+#define S_CPL_TX_TLS_SFO_TYPE 24
+#define M_CPL_TX_TLS_SFO_TYPE 0xff
+#define V_CPL_TX_TLS_SFO_TYPE(x) ((x) << S_CPL_TX_TLS_SFO_TYPE)
+#define G_CPL_TX_TLS_SFO_TYPE(x) \
+ (((x) >> S_CPL_TX_TLS_SFO_TYPE) & M_CPL_TX_TLS_SFO_TYPE)
+
+#define S_CPL_TX_TLS_SFO_PROTOVER 8
+#define M_CPL_TX_TLS_SFO_PROTOVER 0xffff
+#define V_CPL_TX_TLS_SFO_PROTOVER(x) ((x) << S_CPL_TX_TLS_SFO_PROTOVER)
+#define G_CPL_TX_TLS_SFO_PROTOVER(x) \
+ (((x) >> S_CPL_TX_TLS_SFO_PROTOVER) & M_CPL_TX_TLS_SFO_PROTOVER)
+
struct cpl_tls_data {
RSS_HDR
- __be32 op_tid;
+ union opcode_tid ot;
__be32 length_pkd;
__be32 seq;
__be32 r1;
@@ -3160,7 +3174,7 @@ struct cpl_tls_data {
struct cpl_rx_tls_cmp {
RSS_HDR
- __be32 op_tid;
+ union opcode_tid ot;
__be32 pdulength_length;
__be32 seq;
__be32 ddp_report;
Modified: stable/11/sys/dev/cxgbe/common/t4_tcb.h
==============================================================================
--- stable/11/sys/dev/cxgbe/common/t4_tcb.h Thu Mar 28 03:48:51 2019 (r345628)
+++ stable/11/sys/dev/cxgbe/common/t4_tcb.h Thu Mar 28 06:10:41 2019 (r345629)
@@ -495,6 +495,54 @@
#define M_TCB_RX_DDP_BUF1_TAG 0xffffffffULL
#define V_TCB_RX_DDP_BUF1_TAG(x) ((x) << S_TCB_RX_DDP_BUF1_TAG)
+/* 855:832 */
+#define W_TCB_RX_TLS_BUF_OFFSET 26
+#define S_TCB_RX_TLS_BUF_OFFSET 0
+#define M_TCB_RX_TLS_BUF_OFFSET 0xffffffULL
+#define V_TCB_RX_TLS_BUF_OFFSET(x) ((x) << S_TCB_RX_TLS_BUF_OFFSET)
+
+/* 876:856 */
+#define W_TCB_RX_TLS_BUF_LEN 26
+#define S_TCB_RX_TLS_BUF_LEN 24
+#define M_TCB_RX_TLS_BUF_LEN 0xffffffULL
+#define V_TCB_RX_TLS_BUF_LEN(x) ((__u64)(x) << S_TCB_RX_TLS_BUF_LEN)
+
+/* 895:880 */
+#define W_TCB_RX_TLS_FLAGS 26
+#define S_TCB_RX_TLS_FLAGS 48
+#define M_TCB_RX_TLS_FLAGS 0xffffULL
+#define V_TCB_RX_TLS_FLAGS(x) ((__u64)(x) << S_TCB_RX_TLS_FLAGS)
+
+/* 959:896 */
+#define W_TCB_TLS_SEQ 28
+#define S_TCB_TLS_SEQ 0
+#define M_TCB_TLS_SEQ 0xffffffffffffffffULL
+#define V_TCB_TLS_SEQ(x) ((__u64)(x) << S_TCB_TLS_SEQ)
+
+/* 991:960 */
+#define W_TCB_RX_TLS_BUF_TAG 30
+#define S_TCB_RX_TLS_BUF_TAG 0
+#define M_TCB_RX_TLS_BUF_TAG 0xffffffffULL
+#define V_TCB_RX_TLS_BUF_TAG(x) ((x) << S_TCB_RX_TLS_BUF_TAG)
+
+/* 1023:992 */
+#define W_TCB_RX_TLS_KEY_TAG 31
+#define S_TCB_RX_TLS_KEY_TAG 0
+#define M_TCB_RX_TLS_KEY_TAG 0xffffffffULL
+#define V_TCB_RX_TLS_KEY_TAG(x) ((x) << S_TCB_RX_TLS_KEY_TAG)
+
+#define S_TF_TLS_KEY_SIZE 7
+#define V_TF_TLS_KEY_SIZE(x) ((x) << S_TF_TLS_KEY_SIZE)
+
+#define S_TF_TLS_CONTROL 2
+#define V_TF_TLS_CONTROL(x) ((x) << S_TF_TLS_CONTROL)
+
+#define S_TF_TLS_ACTIVE 1
+#define V_TF_TLS_ACTIVE(x) ((x) << S_TF_TLS_ACTIVE)
+
+#define S_TF_TLS_ENABLE 0
+#define V_TF_TLS_ENABLE(x) ((x) << S_TF_TLS_ENABLE)
+
#define S_TF_MIGRATING 0
#define V_TF_MIGRATING(x) ((x) << S_TF_MIGRATING)
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:05:47 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 94B63DBE97;
Tue, 3 Sep 2019 14:05:47 +0000 (UTC)
(envelope-from yuripv@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 46N7yg1r49z4Nqq;
Tue, 3 Sep 2019 14:05:47 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id 1FA0D19B6F; Tue, 3 Sep 2019 14:05:47 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 6CF9A1D5A;
Wed, 27 Mar 2019 22:09:39 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 359E76B865;
Wed, 27 Mar 2019 22:09:39 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 1AC3B1D59; Wed, 27 Mar 2019 22:09:39 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 5228A1D54
for ;
Wed, 27 Mar 2019 22:09:36 +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 0A5596B860;
Wed, 27 Mar 2019 22:09:36 +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 D7084D7E0;
Wed, 27 Mar 2019 22:09:35 +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 x2RM9ZFb062621;
Wed, 27 Mar 2019 22:09:35 GMT (envelope-from jilles@FreeBSD.org)
Received: (from jilles@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RM9ZAp062619;
Wed, 27 Mar 2019 22:09:35 GMT (envelope-from jilles@FreeBSD.org)
Message-Id: <201903272209.x2RM9ZAp062619@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jilles set sender to
jilles@FreeBSD.org using -f
From: Jilles Tjoelker
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345617 - stable/11/bin/sh
X-SVN-Group: stable-11
X-SVN-Commit-Author: jilles
X-SVN-Commit-Paths: stable/11/bin/sh
X-SVN-Commit-Revision: 345617
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 359E76B865
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.993,0];
NEURAL_HAM_SHORT(-0.96)[-0.964,0];
ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:05:47 -0000
X-Original-Date: Wed, 27 Mar 2019 22:09:35 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:05:47 -0000
Author: jilles
Date: Wed Mar 27 22:09:35 2019
New Revision: 345617
URL: https://svnweb.freebsd.org/changeset/base/345617
Log:
MFC r344306: sh: Send normal output from bind builtin to stdout
PR: 233343
Modified:
stable/11/bin/sh/histedit.c
stable/11/bin/sh/output.c
stable/11/bin/sh/output.h
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/bin/sh/histedit.c
==============================================================================
--- stable/11/bin/sh/histedit.c Wed Mar 27 22:05:57 2019 (r345616)
+++ stable/11/bin/sh/histedit.c Wed Mar 27 22:09:35 2019 (r345617)
@@ -474,10 +474,31 @@ str_to_event(const char *str, int last)
int
bindcmd(int argc, char **argv)
{
+ int ret;
+ FILE *old;
+ FILE *out;
if (el == NULL)
error("line editing is disabled");
- return (el_parse(el, argc, __DECONST(const char **, argv)));
+
+ INTOFF;
+
+ out = out1fp();
+ if (out == NULL)
+ error("Out of space");
+
+ el_get(el, EL_GETFP, 1, &old);
+ el_set(el, EL_SETFP, 1, out);
+
+ ret = el_parse(el, argc, __DECONST(const char **, argv));
+
+ el_set(el, EL_SETFP, 1, old);
+
+ fclose(out);
+
+ INTON;
+
+ return ret;
}
#else
Modified: stable/11/bin/sh/output.c
==============================================================================
--- stable/11/bin/sh/output.c Wed Mar 27 22:05:57 2019 (r345616)
+++ stable/11/bin/sh/output.c Wed Mar 27 22:09:35 2019 (r345617)
@@ -345,6 +345,12 @@ doformat(struct output *dest, const char *f, va_list a
}
}
+FILE *
+out1fp(void)
+{
+ return fwopen(out1, doformat_wr);
+}
+
/*
* Version of write which resumes after a signal is caught.
*/
Modified: stable/11/bin/sh/output.h
==============================================================================
--- stable/11/bin/sh/output.h Wed Mar 27 22:05:57 2019 (r345616)
+++ stable/11/bin/sh/output.h Wed Mar 27 22:09:35 2019 (r345617)
@@ -37,6 +37,7 @@
#include
#include
+#include
struct output {
char *nextc;
@@ -73,6 +74,7 @@ void out1fmt(const char *, ...) __printflike(1, 2);
void out2fmt_flush(const char *, ...) __printflike(1, 2);
void fmtstr(char *, int, const char *, ...) __printflike(3, 4);
void doformat(struct output *, const char *, va_list) __printflike(2, 0);
+FILE *out1fp(void);
int xwrite(int, const char *, int);
#define outc(c, file) (--(file)->nleft < 0? (emptyoutbuf(file), *(file)->nextc++ = (c)) : (*(file)->nextc++ = (c)))
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:05:47 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 049FEDBE4E;
Tue, 3 Sep 2019 14:05:47 +0000 (UTC)
(envelope-from yuripv@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 46N7yf5QvNz4Nq9;
Tue, 3 Sep 2019 14:05:46 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id 9094619B2C; Tue, 3 Sep 2019 14:05:46 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 077DB1EF89;
Wed, 27 Mar 2019 19:59:41 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 694D68CA7B;
Wed, 27 Mar 2019 19:59:40 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 13C1A1EF56; Wed, 27 Mar 2019 19:59:40 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 7A3D81EF54
for ;
Wed, 27 Mar 2019 19:59:37 +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 2E0B68CA73;
Wed, 27 Mar 2019 19:59:37 +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 01953C1AA;
Wed, 27 Mar 2019 19:59:37 +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 x2RJxaBT089161;
Wed, 27 Mar 2019 19:59:36 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RJxadZ089160;
Wed, 27 Mar 2019 19:59:36 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201903271959.x2RJxadZ089160@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
ngie@FreeBSD.org using -f
From: Enji Cooper
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345600 - stable/11/share/man/man8
X-SVN-Group: stable-11
X-SVN-Commit-Author: ngie
X-SVN-Commit-Paths: stable/11/share/man/man8
X-SVN-Commit-Revision: 345600
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 694D68CA7B
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.97 / 15.00];
local_wl_from(0.00)[freebsd.org];
NEURAL_HAM_MEDIUM(-0.99)[-0.993,0];
NEURAL_HAM_SHORT(-0.98)[-0.981,0];
ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:05:47 -0000
X-Original-Date: Wed, 27 Mar 2019 19:59:36 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:05:47 -0000
Author: ngie
Date: Wed Mar 27 19:59:36 2019
New Revision: 345600
URL: https://svnweb.freebsd.org/changeset/base/345600
Log:
MFC r344066:
Add rc.resume(8) alias for rc(8) to fix the manpage cross references
This issue was noticed when running `make manlint` as part of MFCing r342597 to
^/stable/11:
```
$ make -C share/man/man8 rc.8lint
mandoc -Tascii -Tlint rc.8
mandoc: rc.8:548:6: STYLE: referenced manual not found: Xr rc.resume 8
$
```
This is a followup commit to r339818.
Differential Revision: https://reviews.freebsd.org/D19547
Modified:
stable/11/share/man/man8/Makefile
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/share/man/man8/Makefile
==============================================================================
--- stable/11/share/man/man8/Makefile Wed Mar 27 19:47:21 2019 (r345599)
+++ stable/11/share/man/man8/Makefile Wed Mar 27 19:59:36 2019 (r345600)
@@ -24,6 +24,7 @@ MLINKS= \
rc.8 rc.local.8 \
rc.8 rc.network.8 \
rc.8 rc.pccard.8 \
+ rc.8 rc.resume.8 \
rc.8 rc.serial.8 \
rc.8 rc.shutdown.8
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:05:49 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 52950DBEF2;
Tue, 3 Sep 2019 14:05:49 +0000 (UTC)
(envelope-from yuripv@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 46N7yh4tBvz4NsM;
Tue, 3 Sep 2019 14:05:48 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id CF26F19BE5; Tue, 3 Sep 2019 14:05:47 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 70664CFC3;
Thu, 28 Mar 2019 09:18:27 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 368568D82D;
Thu, 28 Mar 2019 09:18:27 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 1B5B1CFBF; Thu, 28 Mar 2019 09:18:27 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 3738DCFB7
for ;
Thu, 28 Mar 2019 09:18:24 +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 E3AF58D822;
Thu, 28 Mar 2019 09:18:23 +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 BF81D1D05B;
Thu, 28 Mar 2019 09:18:23 +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 x2S9IN7w019111;
Thu, 28 Mar 2019 09:18:23 GMT (envelope-from avos@FreeBSD.org)
Received: (from avos@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2S9IMRQ019104;
Thu, 28 Mar 2019 09:18:22 GMT (envelope-from avos@FreeBSD.org)
Message-Id: <201903280918.x2S9IMRQ019104@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avos set sender to
avos@FreeBSD.org using -f
From: Andriy Voskoboinyk
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345635 - in stable/11: share/man/man9 sys/dev/ath
sys/dev/usb/wlan
X-SVN-Group: stable-11
X-SVN-Commit-Author: avos
X-SVN-Commit-Paths: in stable/11: share/man/man9 sys/dev/ath sys/dev/usb/wlan
X-SVN-Commit-Revision: 345635
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 368568D82D
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.95 / 15.00];
local_wl_from(0.00)[freebsd.org];
NEURAL_HAM_MEDIUM(-0.99)[-0.994,0];
NEURAL_HAM_LONG(-1.00)[-1.000,0];
NEURAL_HAM_SHORT(-0.96)[-0.957,0];
ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:05:49 -0000
X-Original-Date: Thu, 28 Mar 2019 09:18:22 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:05:49 -0000
Author: avos
Date: Thu Mar 28 09:18:22 2019
New Revision: 345635
URL: https://svnweb.freebsd.org/changeset/base/345635
Log:
MFC r306049:
net80211: remove IEEE80211_RADIOTAP_TSFT field from transmit definitions.
This field may be used for received frames only.
Modified:
stable/11/share/man/man9/ieee80211_radiotap.9
stable/11/sys/dev/ath/if_ath_tx.c
stable/11/sys/dev/ath/if_athioctl.h
stable/11/sys/dev/usb/wlan/if_rum.c
stable/11/sys/dev/usb/wlan/if_rumvar.h
stable/11/sys/dev/usb/wlan/if_run.c
stable/11/sys/dev/usb/wlan/if_runvar.h
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/share/man/man9/ieee80211_radiotap.9
==============================================================================
--- stable/11/share/man/man9/ieee80211_radiotap.9 Thu Mar 28 09:16:00 2019 (r345634)
+++ stable/11/share/man/man9/ieee80211_radiotap.9 Thu Mar 28 09:18:22 2019 (r345635)
@@ -263,7 +263,6 @@ struct wi_rx_radiotap_header {
and transmit definitions for the Atheros driver:
.Bd -literal -offset indent
#define ATH_TX_RADIOTAP_PRESENT ( \\
- (1 << IEEE80211_RADIOTAP_TSFT) | \\
(1 << IEEE80211_RADIOTAP_FLAGS) | \\
(1 << IEEE80211_RADIOTAP_RATE) | \\
(1 << IEEE80211_RADIOTAP_DBM_TX_POWER) | \\
@@ -273,7 +272,6 @@ and transmit definitions for the Atheros driver:
struct ath_tx_radiotap_header {
struct ieee80211_radiotap_header wt_ihdr;
- uint64_t wt_tsf;
uint8_t wt_flags;
uint8_t wt_rate;
uint8_t wt_txpower;
Modified: stable/11/sys/dev/ath/if_ath_tx.c
==============================================================================
--- stable/11/sys/dev/ath/if_ath_tx.c Thu Mar 28 09:16:00 2019 (r345634)
+++ stable/11/sys/dev/ath/if_ath_tx.c Thu Mar 28 09:18:22 2019 (r345635)
@@ -1527,7 +1527,6 @@ ath_tx_normal_setup(struct ath_softc *sc, struct ieee8
struct ath_buf *bf, struct mbuf *m0, struct ath_txq *txq)
{
struct ieee80211vap *vap = ni->ni_vap;
- struct ath_hal *ah = sc->sc_ah;
struct ieee80211com *ic = &sc->sc_ic;
const struct chanAccParams *cap = &ic->ic_wme.wme_chanParams;
int error, iswep, ismcast, isfrag, ismrr;
@@ -1783,9 +1782,6 @@ ath_tx_normal_setup(struct ath_softc *sc, struct ieee8
sc->sc_hwmap[rix].ieeerate, -1);
if (ieee80211_radiotap_active_vap(vap)) {
- u_int64_t tsf = ath_hal_gettsf64(ah);
-
- sc->sc_tx_th.wt_tsf = htole64(tsf);
sc->sc_tx_th.wt_flags = sc->sc_hwmap[rix].txflags;
if (iswep)
sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP;
@@ -2066,7 +2062,6 @@ ath_tx_raw_start(struct ath_softc *sc, struct ieee8021
const struct ieee80211_bpf_params *params)
{
struct ieee80211com *ic = &sc->sc_ic;
- struct ath_hal *ah = sc->sc_ah;
struct ieee80211vap *vap = ni->ni_vap;
int error, ismcast, ismrr;
int keyix, hdrlen, pktlen, try0, txantenna;
@@ -2201,9 +2196,6 @@ ath_tx_raw_start(struct ath_softc *sc, struct ieee8021
sc->sc_hwmap[rix].ieeerate, -1);
if (ieee80211_radiotap_active_vap(vap)) {
- u_int64_t tsf = ath_hal_gettsf64(ah);
-
- sc->sc_tx_th.wt_tsf = htole64(tsf);
sc->sc_tx_th.wt_flags = sc->sc_hwmap[rix].txflags;
if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED)
sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP;
Modified: stable/11/sys/dev/ath/if_athioctl.h
==============================================================================
--- stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:16:00 2019 (r345634)
+++ stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:18:22 2019 (r345635)
@@ -374,7 +374,6 @@ struct ath_rx_radiotap_header {
} __packed;
#define ATH_TX_RADIOTAP_PRESENT ( \
- (1 << IEEE80211_RADIOTAP_TSFT) | \
(1 << IEEE80211_RADIOTAP_FLAGS) | \
(1 << IEEE80211_RADIOTAP_RATE) | \
(1 << IEEE80211_RADIOTAP_DBM_TX_POWER) | \
@@ -384,7 +383,6 @@ struct ath_rx_radiotap_header {
struct ath_tx_radiotap_header {
struct ieee80211_radiotap_header wt_ihdr;
- u_int64_t wt_tsf;
u_int8_t wt_flags;
u_int8_t wt_rate;
u_int8_t wt_txpower;
Modified: stable/11/sys/dev/usb/wlan/if_rum.c
==============================================================================
--- stable/11/sys/dev/usb/wlan/if_rum.c Thu Mar 28 09:16:00 2019 (r345634)
+++ stable/11/sys/dev/usb/wlan/if_rum.c Thu Mar 28 09:18:22 2019 (r345635)
@@ -1075,7 +1075,6 @@ tr_setup:
tap->wt_flags = 0;
tap->wt_rate = data->rate;
- rum_get_tsf(sc, &tap->wt_tsf);
tap->wt_antenna = sc->tx_ant;
ieee80211_radiotap_tx(vap, m);
Modified: stable/11/sys/dev/usb/wlan/if_rumvar.h
==============================================================================
--- stable/11/sys/dev/usb/wlan/if_rumvar.h Thu Mar 28 09:16:00 2019 (r345634)
+++ stable/11/sys/dev/usb/wlan/if_rumvar.h Thu Mar 28 09:18:22 2019 (r345635)
@@ -44,7 +44,6 @@ struct rum_rx_radiotap_header {
struct rum_tx_radiotap_header {
struct ieee80211_radiotap_header wt_ihdr;
- uint64_t wt_tsf;
uint8_t wt_flags;
uint8_t wt_rate;
uint16_t wt_chan_freq;
@@ -53,8 +52,7 @@ struct rum_tx_radiotap_header {
} __packed __aligned(8);
#define RT2573_TX_RADIOTAP_PRESENT \
- ((1 << IEEE80211_RADIOTAP_TSFT) | \
- (1 << IEEE80211_RADIOTAP_FLAGS) | \
+ ((1 << IEEE80211_RADIOTAP_FLAGS) | \
(1 << IEEE80211_RADIOTAP_RATE) | \
(1 << IEEE80211_RADIOTAP_CHANNEL) | \
(1 << IEEE80211_RADIOTAP_ANTENNA))
Modified: stable/11/sys/dev/usb/wlan/if_run.c
==============================================================================
--- stable/11/sys/dev/usb/wlan/if_run.c Thu Mar 28 09:16:00 2019 (r345634)
+++ stable/11/sys/dev/usb/wlan/if_run.c Thu Mar 28 09:18:22 2019 (r345635)
@@ -3096,7 +3096,6 @@ tr_setup:
(struct rt2860_txwi *)(&data->desc + sizeof(struct rt2870_txd));
tap->wt_flags = 0;
tap->wt_rate = rt2860_rates[data->ridx].rate;
- run_get_tsf(sc, &tap->wt_tsf);
tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq);
tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags);
tap->wt_hwqueue = index;
Modified: stable/11/sys/dev/usb/wlan/if_runvar.h
==============================================================================
--- stable/11/sys/dev/usb/wlan/if_runvar.h Thu Mar 28 09:16:00 2019 (r345634)
+++ stable/11/sys/dev/usb/wlan/if_runvar.h Thu Mar 28 09:18:22 2019 (r345635)
@@ -66,7 +66,6 @@ struct run_rx_radiotap_header {
struct run_tx_radiotap_header {
struct ieee80211_radiotap_header wt_ihdr;
- uint64_t wt_tsf;
uint8_t wt_flags;
uint8_t wt_rate;
uint16_t wt_chan_freq;
@@ -77,8 +76,7 @@ struct run_tx_radiotap_header {
#define IEEE80211_RADIOTAP_HWQUEUE 15
#define RUN_TX_RADIOTAP_PRESENT \
- (1 << IEEE80211_RADIOTAP_TSFT | \
- 1 << IEEE80211_RADIOTAP_FLAGS | \
+ (1 << IEEE80211_RADIOTAP_FLAGS | \
1 << IEEE80211_RADIOTAP_RATE | \
1 << IEEE80211_RADIOTAP_CHANNEL | \
1 << IEEE80211_RADIOTAP_HWQUEUE)
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:05:50 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 79FDDDBF07;
Tue, 3 Sep 2019 14:05:49 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 46N7yh63Dqz4NsQ;
Tue, 3 Sep 2019 14:05:48 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id 3B50A19C03; Tue, 3 Sep 2019 14:05:48 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 5100B11F66;
Thu, 28 Mar 2019 13:44:23 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id AB24771EF3;
Thu, 28 Mar 2019 13:44:22 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 4892B11F2B; Thu, 28 Mar 2019 13:44:22 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 59BB311F29
for ;
Thu, 28 Mar 2019 13:44: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 0F3A271EE5;
Thu, 28 Mar 2019 13:44: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 E26661FF3C;
Thu, 28 Mar 2019 13:44: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 x2SDiIqm060377;
Thu, 28 Mar 2019 13:44:18 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2SDiIIL060376;
Thu, 28 Mar 2019 13:44:18 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201903281344.x2SDiIIL060376@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
using -f
From: Konstantin Belousov
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345642 - stable/11/sys/fs/nullfs
X-SVN-Group: stable-11
X-SVN-Commit-Author: kib
X-SVN-Commit-Paths: stable/11/sys/fs/nullfs
X-SVN-Commit-Revision: 345642
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: AB24771EF3
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.97 / 15.00];
local_wl_from(0.00)[freebsd.org];
NEURAL_HAM_MEDIUM(-0.99)[-0.994,0];
NEURAL_HAM_SHORT(-0.98)[-0.976,0];
ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:05:50 -0000
X-Original-Date: Thu, 28 Mar 2019 13:44:18 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:05:50 -0000
Author: kib
Date: Thu Mar 28 13:44:18 2019
New Revision: 345642
URL: https://svnweb.freebsd.org/changeset/base/345642
Log:
MFC r345376:
nullfs: fix unmounts when filesystem is active.
Modified:
stable/11/sys/fs/nullfs/null_vfsops.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/fs/nullfs/null_vfsops.c
==============================================================================
--- stable/11/sys/fs/nullfs/null_vfsops.c Thu Mar 28 13:42:37 2019 (r345641)
+++ stable/11/sys/fs/nullfs/null_vfsops.c Thu Mar 28 13:44:18 2019 (r345642)
@@ -236,7 +236,7 @@ nullfs_unmount(mp, mntflags)
{
struct null_mount *mntdata;
struct mount *ump;
- int error, flags;
+ int error, flags, rootrefs;
NULLFSDEBUG("nullfs_unmount: mp = %p\n", (void *)mp);
@@ -245,10 +245,20 @@ nullfs_unmount(mp, mntflags)
else
flags = 0;
- /* There is 1 extra root vnode reference (nullm_rootvp). */
- error = vflush(mp, 1, flags, curthread);
- if (error)
- return (error);
+ for (rootrefs = 1;; rootrefs = 0) {
+ /* There is 1 extra root vnode reference (nullm_rootvp). */
+ error = vflush(mp, rootrefs, flags, curthread);
+ if (error)
+ return (error);
+ MNT_ILOCK(mp);
+ if (mp->mnt_nvnodelistsize == 0) {
+ MNT_IUNLOCK(mp);
+ break;
+ }
+ MNT_IUNLOCK(mp);
+ if ((mntflags & MNT_FORCE) == 0)
+ return (EBUSY);
+ }
/*
* Finally, throw away the null_mount structure
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:05:49 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 55315DBEF6;
Tue, 3 Sep 2019 14:05:49 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 46N7yh4dq8z4NsB;
Tue, 3 Sep 2019 14:05:48 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id E107F19BEB; Tue, 3 Sep 2019 14:05:47 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 7A125DDB7;
Thu, 28 Mar 2019 09:50:37 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 2F0448F05B;
Thu, 28 Mar 2019 09:50:37 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 1D7C1DDB5; Thu, 28 Mar 2019 09:50:37 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id ED615DDB3
for ;
Thu, 28 Mar 2019 09:50:33 +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 AD47E8F055;
Thu, 28 Mar 2019 09:50:33 +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 89FBD1D5F5;
Thu, 28 Mar 2019 09:50:33 +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 x2S9oXkE034717;
Thu, 28 Mar 2019 09:50:33 GMT (envelope-from avos@FreeBSD.org)
Received: (from avos@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2S9oQ5m034681;
Thu, 28 Mar 2019 09:50:26 GMT (envelope-from avos@FreeBSD.org)
Message-Id: <201903280950.x2S9oQ5m034681@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avos set sender to
avos@FreeBSD.org using -f
From: Andriy Voskoboinyk
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345636 - in stable/11: share/man/man9 sys/dev/ath
sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn
sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn...
X-SVN-Group: stable-11
X-SVN-Commit-Author: avos
X-SVN-Commit-Paths: in stable/11: share/man/man9 sys/dev/ath sys/dev/bwi
sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo
sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn sys/dev/urtwn sys/dev/us...
X-SVN-Commit-Revision: 345636
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 2F0448F05B
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.962,0];
ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:05:50 -0000
X-Original-Date: Thu, 28 Mar 2019 09:50:26 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:05:50 -0000
Author: avos
Date: Thu Mar 28 09:50:25 2019
New Revision: 345636
URL: https://svnweb.freebsd.org/changeset/base/345636
Log:
MFC r344990:
Fix ieee80211_radiotap(9) usage in wireless drivers:
- Alignment issues:
* Add missing __packed attributes + padding across all drivers; in
most places there was an assumption that padding will be always
minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) -
padding was just missing.
* Add __aligned(8) attribute for all Rx radiotap headers since they can
contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, so
just drop the attribute here. Refresh ieee80211_radiotap(9) man page
accordingly.
- Since net80211 automatically updates channel frequency / flags in
ieee80211_radiotap_chan_change() drop duplicate setup for these fields
in drivers.
Modified:
stable/11/share/man/man9/ieee80211_radiotap.9
stable/11/sys/dev/ath/if_athioctl.h
stable/11/sys/dev/bwi/if_bwi.c
stable/11/sys/dev/bwi/if_bwivar.h
stable/11/sys/dev/bwn/if_bwn.c
stable/11/sys/dev/bwn/if_bwnvar.h
stable/11/sys/dev/ipw/if_ipwvar.h
stable/11/sys/dev/iwi/if_iwivar.h
stable/11/sys/dev/iwm/if_iwmvar.h
stable/11/sys/dev/iwn/if_iwn.c
stable/11/sys/dev/iwn/if_iwnvar.h
stable/11/sys/dev/malo/if_maloioctl.h
stable/11/sys/dev/mwl/if_mwlioctl.h
stable/11/sys/dev/otus/if_otus.c
stable/11/sys/dev/otus/if_otusreg.h
stable/11/sys/dev/ral/rt2560var.h
stable/11/sys/dev/ral/rt2661var.h
stable/11/sys/dev/ral/rt2860var.h
stable/11/sys/dev/rtwn/if_rtwn.c
stable/11/sys/dev/rtwn/if_rtwnreg.h
stable/11/sys/dev/urtwn/if_urtwn.c
stable/11/sys/dev/urtwn/if_urtwnvar.h
stable/11/sys/dev/usb/wlan/if_rsu.c
stable/11/sys/dev/usb/wlan/if_rsureg.h
stable/11/sys/dev/usb/wlan/if_rumvar.h
stable/11/sys/dev/usb/wlan/if_run.c
stable/11/sys/dev/usb/wlan/if_runvar.h
stable/11/sys/dev/usb/wlan/if_uathvar.h
stable/11/sys/dev/usb/wlan/if_upgtvar.h
stable/11/sys/dev/usb/wlan/if_uralvar.h
stable/11/sys/dev/usb/wlan/if_urtw.c
stable/11/sys/dev/usb/wlan/if_urtwvar.h
stable/11/sys/dev/usb/wlan/if_zydreg.h
stable/11/sys/dev/wi/if_wireg.h
stable/11/sys/dev/wpi/if_wpivar.h
stable/11/sys/dev/wtap/if_wtapioctl.h
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/share/man/man9/ieee80211_radiotap.9
==============================================================================
--- stable/11/share/man/man9/ieee80211_radiotap.9 Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/share/man/man9/ieee80211_radiotap.9 Thu Mar 28 09:50:25 2019 (r345636)
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 4, 2009
+.Dd March 28, 2019
.Dt IEEE80211_RADIOTAP 9
.Os
.Sh NAME
@@ -257,7 +257,7 @@ struct wi_rx_radiotap_header {
uint16_t wr_chan_flags;
uint8_t wr_antsignal;
uint8_t wr_antnoise;
-} __packed;
+} __packed __aligned(8);
.Ed
.Pp
and transmit definitions for the Atheros driver:
Modified: stable/11/sys/dev/ath/if_athioctl.h
==============================================================================
--- stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -371,7 +371,7 @@ struct ath_rx_radiotap_header {
*/
struct ath_radiotap_vendor_hdr wr_v;
#endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */
-} __packed;
+} __packed __aligned(8);
#define ATH_TX_RADIOTAP_PRESENT ( \
(1 << IEEE80211_RADIOTAP_FLAGS) | \
Modified: stable/11/sys/dev/bwi/if_bwi.c
==============================================================================
--- stable/11/sys/dev/bwi/if_bwi.c Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/bwi/if_bwi.c Thu Mar 28 09:50:25 2019 (r345636)
@@ -1727,15 +1727,6 @@ bwi_set_channel(struct ieee80211com *ic)
bwi_rf_set_chan(mac, ieee80211_chan2ieee(ic, c), 0);
sc->sc_rates = ieee80211_get_ratetable(c);
-
- /*
- * Setup radio tap channel freq and flags
- */
- sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq =
- htole16(c->ic_freq);
- sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags =
- htole16(c->ic_flags & 0xffff);
-
BWI_UNLOCK(sc);
}
Modified: stable/11/sys/dev/bwi/if_bwivar.h
==============================================================================
--- stable/11/sys/dev/bwi/if_bwivar.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/bwi/if_bwivar.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -511,7 +511,7 @@ struct bwi_tx_radiotap_hdr {
uint8_t wt_rate;
uint16_t wt_chan_freq;
uint16_t wt_chan_flags;
-};
+} __packed;
#define BWI_RX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_TSFT) | \
@@ -531,7 +531,7 @@ struct bwi_rx_radiotap_hdr {
int8_t wr_antsignal;
int8_t wr_antnoise;
/* TODO: sq */
-};
+} __packed __aligned(8);
struct bwi_vap {
struct ieee80211vap bv_vap;
Modified: stable/11/sys/dev/bwn/if_bwn.c
==============================================================================
--- stable/11/sys/dev/bwn/if_bwn.c Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/bwn/if_bwn.c Thu Mar 28 09:50:25 2019 (r345636)
@@ -1831,14 +1831,6 @@ bwn_set_channel(struct ieee80211com *ic)
bwn_mac_enable(mac);
fail:
- /*
- * Setup radio tap channel freq and flags
- */
- sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq =
- htole16(ic->ic_curchan->ic_freq);
- sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags =
- htole16(ic->ic_curchan->ic_flags & 0xffff);
-
BWN_UNLOCK(sc);
}
Modified: stable/11/sys/dev/bwn/if_bwnvar.h
==============================================================================
--- stable/11/sys/dev/bwn/if_bwnvar.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/bwn/if_bwnvar.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -565,7 +565,7 @@ struct bwn_rx_radiotap_header {
int8_t wr_antsignal;
int8_t wr_antnoise;
u_int8_t wr_antenna;
-};
+} __packed __aligned(8);
#define BWN_TX_RADIOTAP_PRESENT ( \
(1 << IEEE80211_RADIOTAP_FLAGS) | \
@@ -583,7 +583,7 @@ struct bwn_tx_radiotap_header {
u_int16_t wt_chan_flags;
u_int8_t wt_txpower;
u_int8_t wt_antenna;
-};
+} __packed;
struct bwn_stats {
int32_t rtsfail;
Modified: stable/11/sys/dev/ipw/if_ipwvar.h
==============================================================================
--- stable/11/sys/dev/ipw/if_ipwvar.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/ipw/if_ipwvar.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -55,11 +55,12 @@ struct ipw_soft_buf {
struct ipw_rx_radiotap_header {
struct ieee80211_radiotap_header wr_ihdr;
uint8_t wr_flags;
+ uint8_t wr_pad;
uint16_t wr_chan_freq;
uint16_t wr_chan_flags;
int8_t wr_antsignal;
int8_t wr_antnoise;
-};
+} __packed __aligned(8);
#define IPW_RX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_FLAGS) | \
@@ -70,9 +71,10 @@ struct ipw_rx_radiotap_header {
struct ipw_tx_radiotap_header {
struct ieee80211_radiotap_header wt_ihdr;
uint8_t wt_flags;
+ uint8_t wt_pad;
uint16_t wt_chan_freq;
uint16_t wt_chan_flags;
-};
+} __packed;
#define IPW_TX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_FLAGS) | \
Modified: stable/11/sys/dev/iwi/if_iwivar.h
==============================================================================
--- stable/11/sys/dev/iwi/if_iwivar.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/iwi/if_iwivar.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -36,7 +36,7 @@ struct iwi_rx_radiotap_header {
int8_t wr_antsignal;
int8_t wr_antnoise;
uint8_t wr_antenna;
-};
+} __packed __aligned(8);
#define IWI_RX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_FLAGS) | \
@@ -49,9 +49,10 @@ struct iwi_rx_radiotap_header {
struct iwi_tx_radiotap_header {
struct ieee80211_radiotap_header wt_ihdr;
uint8_t wt_flags;
+ uint8_t wt_pad;
uint16_t wt_chan_freq;
uint16_t wt_chan_flags;
-};
+} __packed;
#define IWI_TX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_FLAGS) | \
Modified: stable/11/sys/dev/iwm/if_iwmvar.h
==============================================================================
--- stable/11/sys/dev/iwm/if_iwmvar.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/iwm/if_iwmvar.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -113,7 +113,7 @@ struct iwm_rx_radiotap_header {
uint16_t wr_chan_flags;
int8_t wr_dbm_antsignal;
int8_t wr_dbm_antnoise;
-} __packed;
+} __packed __aligned(8);
#define IWM_RX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_TSFT) | \
Modified: stable/11/sys/dev/iwn/if_iwn.c
==============================================================================
--- stable/11/sys/dev/iwn/if_iwn.c Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/iwn/if_iwn.c Thu Mar 28 09:50:25 2019 (r345636)
@@ -8892,18 +8892,12 @@ iwn_scan_end(struct ieee80211com *ic)
static void
iwn_set_channel(struct ieee80211com *ic)
{
- const struct ieee80211_channel *c = ic->ic_curchan;
struct iwn_softc *sc = ic->ic_softc;
int error;
DPRINTF(sc, IWN_DEBUG_TRACE, "->Doing %s\n", __func__);
IWN_LOCK(sc);
- sc->sc_rxtap.wr_chan_freq = htole16(c->ic_freq);
- sc->sc_rxtap.wr_chan_flags = htole16(c->ic_flags);
- sc->sc_txtap.wt_chan_freq = htole16(c->ic_freq);
- sc->sc_txtap.wt_chan_flags = htole16(c->ic_flags);
-
/*
* Only need to set the channel in Monitor mode. AP scanning and auth
* are already taken care of by their respective firmware commands.
Modified: stable/11/sys/dev/iwn/if_iwnvar.h
==============================================================================
--- stable/11/sys/dev/iwn/if_iwnvar.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/iwn/if_iwnvar.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -62,7 +62,7 @@ struct iwn_rx_radiotap_header {
uint16_t wr_chan_flags;
int8_t wr_dbm_antsignal;
int8_t wr_dbm_antnoise;
-} __packed;
+} __packed __aligned(8);
#define IWN_RX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_TSFT) | \
Modified: stable/11/sys/dev/malo/if_maloioctl.h
==============================================================================
--- stable/11/sys/dev/malo/if_maloioctl.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/malo/if_maloioctl.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -91,7 +91,7 @@ struct malo_rx_radiotap_header {
int8_t wr_antsignal;
int8_t wr_antnoise;
u_int8_t wr_antenna;
-};
+} __packed __aligned(8);
#define MALO_TX_RADIOTAP_PRESENT ( \
(1 << IEEE80211_RADIOTAP_FLAGS) | \
@@ -109,6 +109,6 @@ struct malo_tx_radiotap_header {
u_int16_t wt_chan_flags;
u_int8_t wt_txpower;
u_int8_t wt_antenna;
-};
+} __packed;
#endif /* _DEV_MALO_MVIOCTL_H */
Modified: stable/11/sys/dev/mwl/if_mwlioctl.h
==============================================================================
--- stable/11/sys/dev/mwl/if_mwlioctl.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/mwl/if_mwlioctl.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -113,7 +113,7 @@ struct mwl_rx_radiotap_header {
int8_t wr_antsignal;
int8_t wr_antnoise;
u_int8_t wr_antenna;
-};
+} __packed __aligned(8);
#define MWL_TX_RADIOTAP_PRESENT ( \
(1 << IEEE80211_RADIOTAP_FLAGS) | \
@@ -131,6 +131,6 @@ struct mwl_tx_radiotap_header {
u_int16_t wt_chan_flags;
u_int8_t wt_txpower;
u_int8_t wt_antenna;
-};
+} __packed;
#endif /* _DEV_MWL_MVIOCTL_H */
Modified: stable/11/sys/dev/otus/if_otus.c
==============================================================================
--- stable/11/sys/dev/otus/if_otus.c Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/otus/if_otus.c Thu Mar 28 09:50:25 2019 (r345636)
@@ -1670,8 +1670,6 @@ otus_sub_rxeof(struct otus_softc *sc, uint8_t *buf, in
struct mbuf mb;
tap->wr_flags = 0;
- tap->wr_chan_freq = htole16(ic->ic_ibss_chan->ic_freq);
- tap->wr_chan_flags = htole16(ic->ic_ibss_chan->ic_flags);
tap->wr_antsignal = tail->rssi;
tap->wr_rate = 2; /* In case it can't be found below. */
switch (tail->status & AR_RX_STATUS_MT_MASK) {
Modified: stable/11/sys/dev/otus/if_otusreg.h
==============================================================================
--- stable/11/sys/dev/otus/if_otusreg.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/otus/if_otusreg.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -900,7 +900,7 @@ struct otus_rx_radiotap_header {
uint16_t wr_chan_freq;
uint16_t wr_chan_flags;
uint8_t wr_antsignal;
-} __packed;
+} __packed __aligned(8);
#define OTUS_RX_RADIOTAP_PRESENT \
(1 << IEEE80211_RADIOTAP_FLAGS | \
Modified: stable/11/sys/dev/ral/rt2560var.h
==============================================================================
--- stable/11/sys/dev/ral/rt2560var.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/ral/rt2560var.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -27,7 +27,7 @@ struct rt2560_rx_radiotap_header {
int8_t wr_antsignal;
int8_t wr_antnoise;
uint8_t wr_antenna;
-};
+} __packed __aligned(8);
#define RT2560_RX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_TSFT) | \
@@ -45,7 +45,7 @@ struct rt2560_tx_radiotap_header {
uint16_t wt_chan_freq;
uint16_t wt_chan_flags;
uint8_t wt_antenna;
-};
+} __packed;
#define RT2560_TX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_FLAGS) | \
Modified: stable/11/sys/dev/ral/rt2661var.h
==============================================================================
--- stable/11/sys/dev/ral/rt2661var.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/ral/rt2661var.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -42,7 +42,7 @@ struct rt2661_tx_radiotap_header {
uint8_t wt_rate;
uint16_t wt_chan_freq;
uint16_t wt_chan_flags;
-} __packed __aligned(8);
+} __packed;
#define RT2661_TX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_FLAGS) | \
Modified: stable/11/sys/dev/ral/rt2860var.h
==============================================================================
--- stable/11/sys/dev/ral/rt2860var.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/ral/rt2860var.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -55,7 +55,7 @@ struct rt2860_tx_radiotap_header {
uint8_t wt_rate;
uint16_t wt_chan_freq;
uint16_t wt_chan_flags;
-} __packed __aligned(8);
+} __packed;
#define RT2860_TX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_FLAGS) | \
Modified: stable/11/sys/dev/rtwn/if_rtwn.c
==============================================================================
--- stable/11/sys/dev/rtwn/if_rtwn.c Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/rtwn/if_rtwn.c Thu Mar 28 09:50:25 2019 (r345636)
@@ -1540,8 +1540,6 @@ rtwn_rx_frame(struct rtwn_softc *sc, struct r92c_rx_de
tap->wr_rate = 0x80 | (rate - 12);
}
tap->wr_dbm_antsignal = rssi;
- tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq);
- tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags);
}
RTWN_UNLOCK(sc);
@@ -1734,8 +1732,6 @@ rtwn_tx(struct rtwn_softc *sc, struct mbuf *m, struct
struct rtwn_tx_radiotap_header *tap = &sc->sc_txtap;
tap->wt_flags = 0;
- tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq);
- tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags);
ieee80211_radiotap_tx(vap, m);
}
Modified: stable/11/sys/dev/rtwn/if_rtwnreg.h
==============================================================================
--- stable/11/sys/dev/rtwn/if_rtwnreg.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/rtwn/if_rtwnreg.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -1217,7 +1217,7 @@ struct rtwn_rx_radiotap_header {
uint16_t wr_chan_freq;
uint16_t wr_chan_flags;
uint8_t wr_dbm_antsignal;
-} __packed;
+} __packed __aligned(8);
#define RTWN_RX_RADIOTAP_PRESENT \
(1 << IEEE80211_RADIOTAP_FLAGS | \
@@ -1228,6 +1228,7 @@ struct rtwn_rx_radiotap_header {
struct rtwn_tx_radiotap_header {
struct ieee80211_radiotap_header wt_ihdr;
uint8_t wt_flags;
+ uint8_t wt_pad;
uint16_t wt_chan_freq;
uint16_t wt_chan_flags;
} __packed;
Modified: stable/11/sys/dev/urtwn/if_urtwn.c
==============================================================================
--- stable/11/sys/dev/urtwn/if_urtwn.c Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/urtwn/if_urtwn.c Thu Mar 28 09:50:25 2019 (r345636)
@@ -4841,10 +4841,6 @@ urtwn_set_channel(struct ieee80211com *ic)
urtwn_set_led(sc, URTWN_LED_LINK, !sc->ledlink);
}
urtwn_set_chan(sc, c, NULL);
- sc->sc_rxtap.wr_chan_freq = htole16(c->ic_freq);
- sc->sc_rxtap.wr_chan_flags = htole16(c->ic_flags);
- sc->sc_txtap.wt_chan_freq = htole16(c->ic_freq);
- sc->sc_txtap.wt_chan_flags = htole16(c->ic_flags);
URTWN_UNLOCK(sc);
}
Modified: stable/11/sys/dev/urtwn/if_urtwnvar.h
==============================================================================
--- stable/11/sys/dev/urtwn/if_urtwnvar.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/urtwn/if_urtwnvar.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -55,9 +55,10 @@ struct urtwn_rx_radiotap_header {
struct urtwn_tx_radiotap_header {
struct ieee80211_radiotap_header wt_ihdr;
uint8_t wt_flags;
+ uint8_t wt_pad;
uint16_t wt_chan_freq;
uint16_t wt_chan_flags;
-} __packed __aligned(8);
+} __packed;
#define URTWN_TX_RADIOTAP_PRESENT \
(1 << IEEE80211_RADIOTAP_FLAGS | \
Modified: stable/11/sys/dev/usb/wlan/if_rsu.c
==============================================================================
--- stable/11/sys/dev/usb/wlan/if_rsu.c Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/usb/wlan/if_rsu.c Thu Mar 28 09:50:25 2019 (r345636)
@@ -1830,8 +1830,6 @@ rsu_rx_frame(struct rsu_softc *sc, uint8_t *buf, int p
#endif
/* XXX not nice */
tap->wr_dbm_antsignal = rsu_hwrssi_to_rssi(sc, sc->sc_currssi);
- tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq);
- tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags);
}
return (m);
@@ -2117,7 +2115,6 @@ static int
rsu_tx_start(struct rsu_softc *sc, struct ieee80211_node *ni,
struct mbuf *m0, struct rsu_data *data)
{
- struct ieee80211com *ic = &sc->sc_ic;
struct ieee80211vap *vap = ni->ni_vap;
struct ieee80211_frame *wh;
struct ieee80211_key *k = NULL;
@@ -2229,8 +2226,6 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no
struct rsu_tx_radiotap_header *tap = &sc->sc_txtap;
tap->wt_flags = 0;
- tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq);
- tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags);
ieee80211_radiotap_tx(vap, m0);
}
Modified: stable/11/sys/dev/usb/wlan/if_rsureg.h
==============================================================================
--- stable/11/sys/dev/usb/wlan/if_rsureg.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/usb/wlan/if_rsureg.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -689,9 +689,10 @@ struct rsu_rx_radiotap_header {
struct rsu_tx_radiotap_header {
struct ieee80211_radiotap_header wt_ihdr;
uint8_t wt_flags;
+ uint8_t wt_pad;
uint16_t wt_chan_freq;
uint16_t wt_chan_flags;
-} __packed __aligned(8);
+} __packed;
#define RSU_TX_RADIOTAP_PRESENT \
(1 << IEEE80211_RADIOTAP_FLAGS | \
Modified: stable/11/sys/dev/usb/wlan/if_rumvar.h
==============================================================================
--- stable/11/sys/dev/usb/wlan/if_rumvar.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/usb/wlan/if_rumvar.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -49,7 +49,7 @@ struct rum_tx_radiotap_header {
uint16_t wt_chan_freq;
uint16_t wt_chan_flags;
uint8_t wt_antenna;
-} __packed __aligned(8);
+} __packed;
#define RT2573_TX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_FLAGS) | \
Modified: stable/11/sys/dev/usb/wlan/if_run.c
==============================================================================
--- stable/11/sys/dev/usb/wlan/if_run.c Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/usb/wlan/if_run.c Thu Mar 28 09:50:25 2019 (r345636)
@@ -2830,8 +2830,6 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uin
uint16_t phy;
tap->wr_flags = 0;
- tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq);
- tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags);
tap->wr_antsignal = rssi;
tap->wr_antenna = ant;
tap->wr_dbm_antsignal = run_rssi2dbm(sc, rssi, ant);
@@ -3096,8 +3094,6 @@ tr_setup:
(struct rt2860_txwi *)(&data->desc + sizeof(struct rt2870_txd));
tap->wt_flags = 0;
tap->wt_rate = rt2860_rates[data->ridx].rate;
- tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq);
- tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags);
tap->wt_hwqueue = index;
if (le16toh(txwi->phy) & RT2860_PHY_SHPRE)
tap->wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE;
Modified: stable/11/sys/dev/usb/wlan/if_runvar.h
==============================================================================
--- stable/11/sys/dev/usb/wlan/if_runvar.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/usb/wlan/if_runvar.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -71,7 +71,7 @@ struct run_tx_radiotap_header {
uint16_t wt_chan_freq;
uint16_t wt_chan_flags;
uint8_t wt_hwqueue;
-} __packed __aligned(8);
+} __packed;
#define IEEE80211_RADIOTAP_HWQUEUE 15
Modified: stable/11/sys/dev/usb/wlan/if_uathvar.h
==============================================================================
--- stable/11/sys/dev/usb/wlan/if_uathvar.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/usb/wlan/if_uathvar.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -67,9 +67,10 @@ struct uath_rx_radiotap_header {
struct uath_tx_radiotap_header {
struct ieee80211_radiotap_header wt_ihdr;
uint8_t wt_flags;
+ uint8_t wt_pad;
uint16_t wt_chan_freq;
uint16_t wt_chan_flags;
-} __packed __aligned(8);
+} __packed;
#define UATH_TX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_FLAGS) | \
Modified: stable/11/sys/dev/usb/wlan/if_upgtvar.h
==============================================================================
--- stable/11/sys/dev/usb/wlan/if_upgtvar.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/usb/wlan/if_upgtvar.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -394,7 +394,7 @@ struct upgt_tx_radiotap_header {
uint8_t wt_rate;
uint16_t wt_chan_freq;
uint16_t wt_chan_flags;
-} __packed __aligned(8);
+} __packed;
#define UPGT_TX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_FLAGS) | \
Modified: stable/11/sys/dev/usb/wlan/if_uralvar.h
==============================================================================
--- stable/11/sys/dev/usb/wlan/if_uralvar.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/usb/wlan/if_uralvar.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -51,7 +51,7 @@ struct ural_tx_radiotap_header {
uint16_t wt_chan_freq;
uint16_t wt_chan_flags;
uint8_t wt_antenna;
-} __packed __aligned(8);
+} __packed;
#define RAL_TX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_FLAGS) | \
Modified: stable/11/sys/dev/usb/wlan/if_urtw.c
==============================================================================
--- stable/11/sys/dev/usb/wlan/if_urtw.c Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/usb/wlan/if_urtw.c Thu Mar 28 09:50:25 2019 (r345636)
@@ -1686,11 +1686,7 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_
if (ieee80211_radiotap_active_vap(vap)) {
struct urtw_tx_radiotap_header *tap = &sc->sc_txtap;
- /* XXX Are variables correct? */
tap->wt_flags = 0;
- tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq);
- tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags);
-
ieee80211_radiotap_tx(vap, m0);
}
@@ -3995,9 +3991,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
if (ieee80211_radiotap_active(ic)) {
struct urtw_rx_radiotap_header *tap = &sc->sc_rxtap;
- /* XXX Are variables correct? */
- tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq);
- tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags);
+ tap->wr_flags = 0;
tap->wr_dbm_antsignal = (int8_t)rssi;
}
Modified: stable/11/sys/dev/usb/wlan/if_urtwvar.h
==============================================================================
--- stable/11/sys/dev/usb/wlan/if_urtwvar.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/usb/wlan/if_urtwvar.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -56,6 +56,7 @@ typedef STAILQ_HEAD(, urtw_data) urtw_datahead;
struct urtw_rx_radiotap_header {
struct ieee80211_radiotap_header wr_ihdr;
uint8_t wr_flags;
+ uint8_t wr_pad;
uint16_t wr_chan_freq;
uint16_t wr_chan_flags;
int8_t wr_dbm_antsignal;
@@ -69,9 +70,10 @@ struct urtw_rx_radiotap_header {
struct urtw_tx_radiotap_header {
struct ieee80211_radiotap_header wt_ihdr;
uint8_t wt_flags;
+ uint8_t wt_pad;
uint16_t wt_chan_freq;
uint16_t wt_chan_flags;
-} __packed __aligned(8);
+} __packed;
#define URTW_TX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_FLAGS) | \
Modified: stable/11/sys/dev/usb/wlan/if_zydreg.h
==============================================================================
--- stable/11/sys/dev/usb/wlan/if_zydreg.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/usb/wlan/if_zydreg.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -1200,7 +1200,7 @@ struct zyd_tx_radiotap_header {
uint8_t wt_rate;
uint16_t wt_chan_freq;
uint16_t wt_chan_flags;
-} __packed __aligned(8);
+} __packed;
#define ZYD_TX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_FLAGS) | \
Modified: stable/11/sys/dev/wi/if_wireg.h
==============================================================================
--- stable/11/sys/dev/wi/if_wireg.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/wi/if_wireg.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -707,7 +707,7 @@ struct wi_rx_radiotap_header {
u_int16_t wr_chan_flags;
u_int8_t wr_antsignal;
u_int8_t wr_antnoise;
-};
+} __packed __aligned(8);
#define WI_TX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_FLAGS) | \
@@ -720,5 +720,5 @@ struct wi_tx_radiotap_header {
u_int8_t wt_rate;
u_int16_t wt_chan_freq;
u_int16_t wt_chan_flags;
-};
+} __packed;
#endif /* IEEE80211_RADIOTAP_F_CFP */
Modified: stable/11/sys/dev/wpi/if_wpivar.h
==============================================================================
--- stable/11/sys/dev/wpi/if_wpivar.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/wpi/if_wpivar.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -26,7 +26,7 @@ struct wpi_rx_radiotap_header {
int8_t wr_dbm_antsignal;
int8_t wr_dbm_antnoise;
uint8_t wr_antenna;
-} __packed;
+} __packed __aligned(8);
#define WPI_RX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_TSFT) | \
Modified: stable/11/sys/dev/wtap/if_wtapioctl.h
==============================================================================
--- stable/11/sys/dev/wtap/if_wtapioctl.h Thu Mar 28 09:18:22 2019 (r345635)
+++ stable/11/sys/dev/wtap/if_wtapioctl.h Thu Mar 28 09:50:25 2019 (r345636)
@@ -157,7 +157,7 @@ struct wtap_rx_radiotap_header {
u_int8_t wr_chan_ieee;
int8_t wr_chan_maxpow;
#endif
-} __packed;
+} __packed __aligned(8);
#define WTAP_TX_RADIOTAP_PRESENT ( \
0)
@@ -165,7 +165,6 @@ struct wtap_rx_radiotap_header {
struct wtap_tx_radiotap_header {
struct ieee80211_radiotap_header wt_ihdr;
#if 0
- u_int64_t wt_tsf;
u_int8_t wt_flags;
u_int8_t wt_rate;
u_int8_t wt_txpower;
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:05:52 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id A93C4DBFD3;
Tue, 3 Sep 2019 14:05:52 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 46N7ym0rx1z4Nw4;
Tue, 3 Sep 2019 14:05:52 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id D0B3319D0C; Tue, 3 Sep 2019 14:05:50 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 3A0D87524;
Fri, 29 Mar 2019 11:59:56 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id A3B2E8D9C5;
Fri, 29 Mar 2019 11:59:55 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 8456074EE; Fri, 29 Mar 2019 11:59:55 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 77A5774EC
for ;
Fri, 29 Mar 2019 11:59:55 +0000 (UTC) (envelope-from kp@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
[IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4B8458D9C1;
Fri, 29 Mar 2019 11:59:55 +0000 (UTC) (envelope-from kp@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
[IPv6:2610:1c1:1:6068::e6a:0])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 264212E697;
Fri, 29 Mar 2019 11:59:55 +0000 (UTC) (envelope-from kp@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2TBxsle065073;
Fri, 29 Mar 2019 11:59:54 GMT (envelope-from kp@FreeBSD.org)
Received: (from kp@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2TBxsJb065072;
Fri, 29 Mar 2019 11:59:54 GMT (envelope-from kp@FreeBSD.org)
Message-Id: <201903291159.x2TBxsJb065072@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org
using -f
From: Kristof Provost
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345683 - stable/11/sys/net
X-SVN-Group: stable-11
X-SVN-Commit-Author: kp
X-SVN-Commit-Paths: stable/11/sys/net
X-SVN-Commit-Revision: 345683
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: A3B2E8D9C5
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
local_wl_from(0.00)[freebsd.org];
NEURAL_HAM_MEDIUM(-1.00)[-0.995,0];
NEURAL_HAM_SHORT(-0.98)[-0.981,0];
ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:05:53 -0000
X-Original-Date: Fri, 29 Mar 2019 11:59:54 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:05:53 -0000
Author: kp
Date: Fri Mar 29 11:59:54 2019
New Revision: 345683
URL: https://svnweb.freebsd.org/changeset/base/345683
Log:
MFC r345178:
bridge: Fix panic if the STP root is removed
If the spanning tree root interface is removed from the bridge we panic
on the next 'ifconfig'.
While the STP code is notified whenever a bridge member interface is
removed from the bridge it does not clear the bs_root_port. This means
bs_root_port can still point at an bridge_iflist which has been free()d.
The next access to it will panic.
Explicitly check if the interface we're removing in bstp_destroy() is
the root, and if so re-assign the roles, which clears bs_root_port.
Reviewed by: philip
Modified:
stable/11/sys/net/bridgestp.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/net/bridgestp.c
==============================================================================
--- stable/11/sys/net/bridgestp.c Fri Mar 29 11:59:53 2019 (r345682)
+++ stable/11/sys/net/bridgestp.c Fri Mar 29 11:59:54 2019 (r345683)
@@ -2271,4 +2271,7 @@ bstp_destroy(struct bstp_port *bp)
taskqueue_drain(taskqueue_swi, &bp->bp_statetask);
taskqueue_drain(taskqueue_swi, &bp->bp_rtagetask);
taskqueue_drain(taskqueue_swi, &bp->bp_mediatask);
+
+ if (bp->bp_bs->bs_root_port == bp)
+ bstp_assign_roles(bp->bp_bs);
}
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:05:51 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB072DBF89;
Tue, 3 Sep 2019 14:05:51 +0000 (UTC)
(envelope-from yuripv@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 46N7yl0yhlz4NvB;
Tue, 3 Sep 2019 14:05:51 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id 31CAD19CA2; Tue, 3 Sep 2019 14:05:49 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 751CF1E263;
Fri, 29 Mar 2019 01:32:28 +0000 (UTC)
(envelope-from owner-src-committers@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 2686A6E439;
Fri, 29 Mar 2019 01:32:28 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 12F801E261; Fri, 29 Mar 2019 01:32:28 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 41A961E25C
for ;
Fri, 29 Mar 2019 01:32:25 +0000 (UTC)
(envelope-from rpokala@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
[IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id EB2AB6E424;
Fri, 29 Mar 2019 01:32:24 +0000 (UTC)
(envelope-from rpokala@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
[IPv6:2610:1c1:1:6068::e6a:0])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6B7B27AC8;
Fri, 29 Mar 2019 01:32:24 +0000 (UTC)
(envelope-from rpokala@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2T1WO4h037511;
Fri, 29 Mar 2019 01:32:24 GMT (envelope-from rpokala@FreeBSD.org)
Received: (from rpokala@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2T1WO8J037510;
Fri, 29 Mar 2019 01:32:24 GMT (envelope-from rpokala@FreeBSD.org)
Message-Id: <201903290132.x2T1WO8J037510@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: rpokala set sender to
rpokala@FreeBSD.org using -f
From: Ravi Pokala
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345668 - stable/11/sys/dev/netmap
X-SVN-Group: stable-11
X-SVN-Commit-Author: rpokala
X-SVN-Commit-Paths: stable/11/sys/dev/netmap
X-SVN-Commit-Revision: 345668
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 2686A6E439
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.95 / 15.00];
local_wl_from(0.00)[freebsd.org];
NEURAL_HAM_MEDIUM(-1.00)[-0.995,0];
NEURAL_HAM_SHORT(-0.96)[-0.956,0];
ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:05:52 -0000
X-Original-Date: Fri, 29 Mar 2019 01:32:24 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:05:52 -0000
Author: rpokala
Date: Fri Mar 29 01:32:24 2019
New Revision: 345668
URL: https://svnweb.freebsd.org/changeset/base/345668
Log:
MFC r339683:
Remove redundant redeclaration of netmap_vp_reg().
This should unbreak sparc64 and powerpc LINT builds.
-- While this does fix that error, powerpc.LINT, powerpc.LINT64, and
-- sparc64.LINT are broken in stable/11 for other reasons. --rpokala
Sponsored by: Panasas
Modified:
stable/11/sys/dev/netmap/netmap_bdg.h
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/netmap/netmap_bdg.h
==============================================================================
--- stable/11/sys/dev/netmap/netmap_bdg.h Fri Mar 29 01:16:38 2019 (r345667)
+++ stable/11/sys/dev/netmap/netmap_bdg.h Fri Mar 29 01:32:24 2019 (r345668)
@@ -177,7 +177,6 @@ struct nm_bridge *nm_find_bridge(const char *name, int
int netmap_bdg_free(struct nm_bridge *b);
void netmap_bdg_detach_common(struct nm_bridge *b, int hw, int sw);
int netmap_vp_bdg_ctl(struct nmreq_header *hdr, struct netmap_adapter *na);
-int netmap_vp_reg(struct netmap_adapter *na, int onoff);
int netmap_bwrap_reg(struct netmap_adapter *, int onoff);
int netmap_vp_reg(struct netmap_adapter *na, int onoff);
int netmap_vp_rxsync(struct netmap_kring *kring, int flags);
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:05:51 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D4B2DBF6A;
Tue, 3 Sep 2019 14:05:51 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 46N7yk64z8z4Nv3;
Tue, 3 Sep 2019 14:05:50 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id 17A5119C99; Tue, 3 Sep 2019 14:05:49 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 3E6491CDF1;
Thu, 28 Mar 2019 23:43:45 +0000 (UTC)
(envelope-from owner-src-committers@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 7BD166ADFF;
Thu, 28 Mar 2019 23:43:44 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 564111CDCA; Thu, 28 Mar 2019 23:43:44 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 14E091CDC8
for ;
Thu, 28 Mar 2019 23:43:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
[IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id C23A16ADFA;
Thu, 28 Mar 2019 23:43:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
[IPv6:2610:1c1:1:6068::e6a:0])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 84715267FF;
Thu, 28 Mar 2019 23:43:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2SNhefw079323;
Thu, 28 Mar 2019 23:43:40 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2SNhcKH079312;
Thu, 28 Mar 2019 23:43:38 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201903282343.x2SNhcKH079312@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
using -f
From: John Baldwin
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345664 - in stable/11/sys: dev/cxgbe dev/cxgbe/crypto
dev/cxgbe/cxgbei dev/cxgbe/firmware dev/cxgbe/tom modules/cxgbe/tom
X-SVN-Group: stable-11
X-SVN-Commit-Author: jhb
X-SVN-Commit-Paths: in stable/11/sys: dev/cxgbe dev/cxgbe/crypto
dev/cxgbe/cxgbei dev/cxgbe/firmware dev/cxgbe/tom modules/cxgbe/tom
X-SVN-Commit-Revision: 345664
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 7BD166ADFF
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
local_wl_from(0.00)[freebsd.org];
NEURAL_HAM_MEDIUM(-1.00)[-0.995,0];
NEURAL_HAM_SHORT(-0.96)[-0.962,0];
ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:05:51 -0000
X-Original-Date: Thu, 28 Mar 2019 23:43:38 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:05:51 -0000
Author: jhb
Date: Thu Mar 28 23:43:38 2019
New Revision: 345664
URL: https://svnweb.freebsd.org/changeset/base/345664
Log:
MFC 330040,330041,330079,330884,330946,330947,331649,333068,333810,337722,
340466,340468,340469,340473: Add TOE-based TLS offload.
Note that this requires a modified OpenSSL library.
330040:
Fetch TLS key parameters from the firmware.
The parameters describe how much of the adapter's memory is reserved for
storing TLS keys. The 'meminfo' sysctl now lists this region of adapter
memory as 'TLS keys' if present.
330041:
Move ccr_aes_getdeckey() from ccr(4) to the cxgbe(4) driver.
This routine will also be used by the TOE module to manage TLS keys.
330079:
Move #include for rijndael.h out of x86-specific region.
The #include was added inside of the conditional by accident and the lack
of it broke non-x86 builds.
330884:
Support for TLS offload of TOE connections on T6 adapters.
The TOE engine in Chelsio T6 adapters supports offloading of TLS
encryption and TCP segmentation for offloaded connections. Sockets
using TLS are required to use a set of custom socket options to upload
RX and TX keys to the NIC and to enable RX processing. Currently
these socket options are implemented as TCP options in the vendor
specific range. A patched OpenSSL library will be made available in a
port / package for use with the TLS TOE support.
TOE sockets can either offload both transmit and reception of TLS
records or just transmit. TLS offload (both RX and TX) is enabled by
setting the dev.t6nex..tls sysctl to 1 and requires TOE to be
enabled on the relevant interface. Transmit offload can be used on
any "normal" or TLS TOE socket by using the custom socket option to
program a transmit key. This permits most TOE sockets to
transparently offload TLS when applications use a patched SSL library
(e.g. using LD_LIBRARY_PATH to request use of a patched OpenSSL
library). Receive offload can only be used with TOE sockets using the
TLS mode. The dev.t6nex.0.toe.tls_rx_ports sysctl can be set to a
list of TCP port numbers. Any connection with either a local or
remote port number in that list will be created as a TLS socket rather
than a plain TOE socket. Note that although this sysctl accepts an
arbitrary list of port numbers, the sysctl(8) tool is only able to set
sysctl nodes to a single value. A TLS socket will hang without
receiving data if used by an application that is not using a patched
SSL library. Thus, the tls_rx_ports node should be used with care.
For a server mostly concerned with offloading TLS transmit, this node
is not needed as plain TOE sockets will fall back to software crypto
when using an unpatched SSL library.
New per-interface statistics nodes are added giving counts of TLS
packets and payload bytes (payload bytes do not include TLS headers or
authentication tags/MACs) offloaded via the TOE engine, e.g.:
dev.cc.0.stats.rx_tls_octets: 149
dev.cc.0.stats.rx_tls_records: 13
dev.cc.0.stats.tx_tls_octets: 26501823
dev.cc.0.stats.tx_tls_records: 1620
TLS transmit work requests are constructed by a new variant of
t4_push_frames() called t4_push_tls_records() in tom/t4_tls.c.
TLS transmit work requests require a buffer containing IVs. If the
IVs are too large to fit into the work request, a separate buffer is
allocated when constructing a work request. This buffer is associated
with the transmit descriptor and freed when the descriptor is ACKed by
the adapter.
Received TLS frames use two new CPL messages. The first message is a
CPL_TLS_DATA containing the decryped payload of a single TLS record.
The handler places the mbuf containing the received payload on an
mbufq in the TOE pcb. The second message is a CPL_RX_TLS_CMP message
which includes a copy of the TLS header and indicates if there were
any errors. The handler for this message places the TLS header into
the socket buffer followed by the saved mbuf with the payload data.
Both of these handlers are contained in tom/t4_tls.c.
A few routines were exposed from t4_cpl_io.c for use by t4_tls.c
including send_rx_credits(), a new send_rx_modulate(), and
t4_close_conn().
TLS keys for both transmit and receive are stored in onboard memory
in the NIC in the "TLS keys" memory region.
In some cases a TLS socket can hang with pending data available in the
NIC that is not delivered to the host. As a workaround, TLS sockets
are more aggressive about sending CPL_RX_DATA_ACK messages anytime that
any data is read from a TLS socket. In addition, a fallback timer will
periodically send CPL_RX_DATA_ACK messages to the NIC for connections
that are still in the handshake phase. Once the connection has
finished the handshake and programmed RX keys via the socket option,
the timer is stopped.
A new function select_ulp_mode() is used to determine what sub-mode a
given TOE socket should use (plain TOE, DDP, or TLS). The existing
set_tcpddp_ulp_mode() function has been renamed to set_ulp_mode() and
handles initialization of TLS-specific state when necessary in
addition to DDP-specific state.
Since TLS sockets do not receive individual TCP segments but always
receive full TLS records, they can receive more data than is available
in the current window (e.g. if a 16k TLS record is received but the
socket buffer is itself 16k). To cope with this, just drop the window
to 0 when this happens, but track the overage and "eat" the overage as
it is read from the socket buffer not opening the window (or adding
rx_credits) for the overage bytes.
330946:
Remove TLS-related inlines from t4_tom.h to fix iw_cxgbe(4) build.
- Remove the one use of is_tls_offload() and the function. AIO special
handling only needs to be disabled when a TOE socket is actively doing
TLS offload on transmit. The TOE socket's mode (which affects receive
operation) doesn't matter, so remove the check for the socket's mode and
only check if a TOE socket has TLS transmit keys configured to determine
if an AIO write request should fall back to the normal socket handling
instead of the TOE fast path.
- Move can_tls_offload() into t4_tls.c. It is not used in critical paths,
so inlining isn't that important. Change return type to bool while here.
330947:
Fix the check for an empty send socket buffer on a TOE TLS socket.
Compare sbavail() with the cached sb_off of already-sent data instead of
always comparing with zero. This will correctly close the connection and
send the FIN if the socket buffer contains some previously-sent data but
no unsent data.
331649:
Use the offload transmit queue to set flags on TLS connections.
Requests to modify the state of TLS connections need to be sent on the
same queue as TLS record transmit requests to ensure ordering.
However, in order to use the offload transmit queue in t4_set_tcb_field(),
the function needs to be updated to do proper flow control / credit
management when queueing a request to an offload queue. This required
passing a pointer to the toepcb itself to this function, so while here
remove the 'tid' and 'iqid' parameters and obtain those values from the
toepcb in t4_set_tcb_field() itself.
333068:
Use the correct key address when renegotiating the transmit key.
Previously, get_keyid() was returning the address of the receive key
instead of the transmit key when renegotiating the transmit key. This
could either hang the card (if a connection was only offloading TLS TX
and thus had a receive key address of -1) or cause the connection to
fail by overwriting the wrong key (if both RX and TX TLS were
offloaded).
333810:
Be more robust against garbage input on a TOE TLS TX socket.
If a socket is closed or shutdown and a partial record (or what
appears to be a partial record) is waiting in the socket buffer,
discard the partial record and close the connection rather than
waiting forever for the rest of the record.
337722:
Whitespace nit in t4_tom.h
340466:
Move the TLS key map into the adapter softc so non-TOE code can use it.
340468:
Change the quantum for TLS key addresses to 32 bytes.
The addresses passed when reading and writing keys are always shifted
right by 5 as the memory locations are addressed in 32-byte chunks, so
the quantum needs to be 32, not 8.
340469:
Remove bogus roundup2() of the key programming work request header.
The key context is always placed immediately after the work request
header. The total work request length has to be rounded up by 16
however.
340473:
Restore the header to fix build of cxgbe(4) TOM.
vmem's are not just used for TLS memory in TOM and the #include actually
predates the TLS code so should not have been removed when the TLS vmem
moved in r340466.
Sponsored by: Chelsio Communications
Added:
stable/11/sys/dev/cxgbe/tom/t4_tls.c
- copied, changed from r330884, head/sys/dev/cxgbe/tom/t4_tls.c
stable/11/sys/dev/cxgbe/tom/t4_tls.h
- copied unchanged from r330884, head/sys/dev/cxgbe/tom/t4_tls.h
Modified:
stable/11/sys/dev/cxgbe/adapter.h
stable/11/sys/dev/cxgbe/crypto/t4_crypto.c
stable/11/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
stable/11/sys/dev/cxgbe/firmware/t6fw_cfg.txt
stable/11/sys/dev/cxgbe/offload.h
stable/11/sys/dev/cxgbe/t4_main.c
stable/11/sys/dev/cxgbe/tom/t4_connect.c
stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c
stable/11/sys/dev/cxgbe/tom/t4_ddp.c
stable/11/sys/dev/cxgbe/tom/t4_listen.c
stable/11/sys/dev/cxgbe/tom/t4_tom.c
stable/11/sys/dev/cxgbe/tom/t4_tom.h
stable/11/sys/modules/cxgbe/tom/Makefile
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/cxgbe/adapter.h
==============================================================================
--- stable/11/sys/dev/cxgbe/adapter.h Thu Mar 28 22:19:09 2019 (r345663)
+++ stable/11/sys/dev/cxgbe/adapter.h Thu Mar 28 23:43:38 2019 (r345664)
@@ -39,6 +39,7 @@
#include
#include
#include
+#include
#include
#include
@@ -297,6 +298,10 @@ struct port_info {
struct port_stats stats;
u_int tnl_cong_drops;
u_int tx_parse_error;
+ u_long tx_tls_records;
+ u_long tx_tls_octets;
+ u_long rx_tls_records;
+ u_long rx_tls_octets;
struct callout tick;
};
@@ -805,6 +810,7 @@ struct adapter {
void *ccr_softc; /* (struct ccr_softc *) */
struct l2t_data *l2t; /* L2 table */
struct tid_info tids;
+ vmem_t *key_map;
uint8_t doorbells;
int offload_map; /* ports with IFCAP_TOE enabled */
@@ -1091,6 +1097,7 @@ void t4_os_link_changed(struct port_info *);
void t4_iterate(void (*)(struct adapter *, void *), void *);
void t4_init_devnames(struct adapter *);
void t4_add_adapter(struct adapter *);
+void t4_aes_getdeckey(void *, const void *, unsigned int);
int t4_detach_common(device_t);
int t4_filter_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *);
int t4_map_bars_0_and_4(struct adapter *);
Modified: stable/11/sys/dev/cxgbe/crypto/t4_crypto.c
==============================================================================
--- stable/11/sys/dev/cxgbe/crypto/t4_crypto.c Thu Mar 28 22:19:09 2019 (r345663)
+++ stable/11/sys/dev/cxgbe/crypto/t4_crypto.c Thu Mar 28 23:43:38 2019 (r345664)
@@ -1815,46 +1815,7 @@ ccr_aes_check_keylen(int alg, int klen)
return (0);
}
-/*
- * Borrowed from cesa_prep_aes_key(). We should perhaps have a public
- * function to generate this instead.
- *
- * NB: The crypto engine wants the words in the decryption key in reverse
- * order.
- */
static void
-ccr_aes_getdeckey(void *dec_key, const void *enc_key, unsigned int kbits)
-{
- uint32_t ek[4 * (RIJNDAEL_MAXNR + 1)];
- uint32_t *dkey;
- int i;
-
- rijndaelKeySetupEnc(ek, enc_key, kbits);
- dkey = dec_key;
- dkey += (kbits / 8) / 4;
-
- switch (kbits) {
- case 128:
- for (i = 0; i < 4; i++)
- *--dkey = htobe32(ek[4 * 10 + i]);
- break;
- case 192:
- for (i = 0; i < 2; i++)
- *--dkey = htobe32(ek[4 * 11 + 2 + i]);
- for (i = 0; i < 4; i++)
- *--dkey = htobe32(ek[4 * 12 + i]);
- break;
- case 256:
- for (i = 0; i < 4; i++)
- *--dkey = htobe32(ek[4 * 13 + i]);
- for (i = 0; i < 4; i++)
- *--dkey = htobe32(ek[4 * 14 + i]);
- break;
- }
- MPASS(dkey == dec_key);
-}
-
-static void
ccr_aes_setkey(struct ccr_session *s, int alg, const void *key, int klen)
{
unsigned int ck_size, iopad_size, kctx_flits, kctx_len, kbits, mk_size;
@@ -1883,7 +1844,7 @@ ccr_aes_setkey(struct ccr_session *s, int alg, const v
switch (alg) {
case CRYPTO_AES_CBC:
case CRYPTO_AES_XTS:
- ccr_aes_getdeckey(s->blkcipher.deckey, key, kbits);
+ t4_aes_getdeckey(s->blkcipher.deckey, key, kbits);
break;
}
Modified: stable/11/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
==============================================================================
--- stable/11/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Thu Mar 28 22:19:09 2019 (r345663)
+++ stable/11/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Thu Mar 28 23:43:38 2019 (r345664)
@@ -595,9 +595,9 @@ set_ulp_mode_iscsi(struct adapter *sc, struct toepcb *
CTR4(KTR_CXGBE, "%s: tid %u, ULP_MODE_ISCSI, CRC hdr=%d data=%d",
__func__, toep->tid, hcrc, dcrc);
- t4_set_tcb_field(sc, toep->ctrlq, toep->tid, W_TCB_ULP_TYPE,
+ t4_set_tcb_field(sc, toep->ctrlq, toep, W_TCB_ULP_TYPE,
V_TCB_ULP_TYPE(M_TCB_ULP_TYPE) | V_TCB_ULP_RAW(M_TCB_ULP_RAW), val,
- 0, 0, toep->ofld_rxq->iq.abs_id);
+ 0, 0);
}
/*
Modified: stable/11/sys/dev/cxgbe/firmware/t6fw_cfg.txt
==============================================================================
--- stable/11/sys/dev/cxgbe/firmware/t6fw_cfg.txt Thu Mar 28 22:19:09 2019 (r345663)
+++ stable/11/sys/dev/cxgbe/firmware/t6fw_cfg.txt Thu Mar 28 23:43:38 2019 (r345664)
@@ -163,10 +163,12 @@
nserver = 512
nhpfilter = 0
nhash = 16384
- protocol = ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu, iscsi_t10dif, crypto_lookaside
+ protocol = ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu, iscsi_t10dif, tlskeys, crypto_lookaside
tp_l2t = 4096
tp_ddp = 2
tp_ddp_iscsi = 2
+ tp_tls_key = 3
+ tp_tls_mxrxsize = 17408 # 16384 + 1024, governs max rx data, pm max xfer len, rx coalesce sizes
tp_stag = 2
tp_pbl = 5
tp_rq = 7
@@ -273,7 +275,7 @@
[fini]
version = 0x1
- checksum = 0x7191019f
+ checksum = 0x9e8952d2
#
# $FreeBSD$
#
Modified: stable/11/sys/dev/cxgbe/offload.h
==============================================================================
--- stable/11/sys/dev/cxgbe/offload.h Thu Mar 28 22:19:09 2019 (r345663)
+++ stable/11/sys/dev/cxgbe/offload.h Thu Mar 28 23:43:38 2019 (r345664)
@@ -124,6 +124,7 @@ struct t4_virt_res { /* virtualiz
struct t4_range srq;
struct t4_range ocq;
struct t4_range l2t;
+ struct t4_range key;
};
enum {
@@ -148,6 +149,9 @@ struct tom_tunables {
int sndbuf;
int ddp;
int rx_coalesce;
+ int tls;
+ int *tls_rx_ports;
+ int num_tls_rx_ports;
int tx_align;
int tx_zcopy;
};
Modified: stable/11/sys/dev/cxgbe/t4_main.c
==============================================================================
--- stable/11/sys/dev/cxgbe/t4_main.c Thu Mar 28 22:19:09 2019 (r345663)
+++ stable/11/sys/dev/cxgbe/t4_main.c Thu Mar 28 23:43:38 2019 (r345664)
@@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$");
#include
#include
#endif
+#include
#ifdef DDB
#include
#include
@@ -667,6 +668,7 @@ static int sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS);
static int sysctl_tc_params(SYSCTL_HANDLER_ARGS);
#endif
#ifdef TCP_OFFLOAD
+static int sysctl_tls_rx_ports(SYSCTL_HANDLER_ARGS);
static int sysctl_tp_tick(SYSCTL_HANDLER_ARGS);
static int sysctl_tp_dack_timer(SYSCTL_HANDLER_ARGS);
static int sysctl_tp_timer(SYSCTL_HANDLER_ARGS);
@@ -1215,6 +1217,9 @@ t4_attach(device_t dev)
t4_init_l2t(sc, M_WAITOK);
t4_init_tx_sched(sc);
+ if (sc->vres.key.size != 0)
+ sc->key_map = vmem_create("T4TLS key map", sc->vres.key.start,
+ sc->vres.key.size, 32, 0, M_FIRSTFIT | M_WAITOK);
/*
* Second pass over the ports. This time we know the number of rx and
@@ -1499,6 +1504,8 @@ t4_detach_common(device_t dev)
if (sc->l2t)
t4_free_l2t(sc->l2t);
+ if (sc->key_map)
+ vmem_destroy(sc->key_map);
#ifdef TCP_OFFLOAD
free(sc->sge.ofld_rxq, M_CXGBE);
@@ -1515,6 +1522,7 @@ t4_detach_common(device_t dev)
free(sc->sge.iqmap, M_CXGBE);
free(sc->sge.eqmap, M_CXGBE);
free(sc->tids.ftid_tab, M_CXGBE);
+ free(sc->tt.tls_rx_ports, M_CXGBE);
t4_destroy_dma_tag(sc);
if (mtx_initialized(&sc->sc_lock)) {
sx_xlock(&t4_list_lock);
@@ -3981,6 +3989,18 @@ get_params__post_init(struct adapter *sc)
sc->vres.iscsi.start = val[0];
sc->vres.iscsi.size = val[1] - val[0] + 1;
}
+ if (sc->cryptocaps & FW_CAPS_CONFIG_TLSKEYS) {
+ param[0] = FW_PARAM_PFVF(TLS_START);
+ param[1] = FW_PARAM_PFVF(TLS_END);
+ rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 2, param, val);
+ if (rc != 0) {
+ device_printf(sc->dev,
+ "failed to query TLS parameters: %d.\n", rc);
+ return (rc);
+ }
+ sc->vres.key.start = val[0];
+ sc->vres.key.size = val[1] - val[0] + 1;
+ }
t4_init_sge_params(sc);
@@ -5780,6 +5800,14 @@ t4_sysctls(struct adapter *sc)
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_coalesce",
CTLFLAG_RW, &sc->tt.rx_coalesce, 0, "receive coalescing");
+ sc->tt.tls = 0;
+ SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tls", CTLFLAG_RW,
+ &sc->tt.tls, 0, "Inline TLS allowed");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "tls_rx_ports",
+ CTLTYPE_INT | CTLFLAG_RW, sc, 0, sysctl_tls_rx_ports,
+ "I", "TCP ports that use inline TLS+TOE RX");
+
sc->tt.tx_align = 1;
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tx_align",
CTLFLAG_RW, &sc->tt.tx_align, 0, "chop and align payload");
@@ -6183,6 +6211,19 @@ cxgbe_sysctls(struct port_info *pi)
"# of buffer-group 3 truncated packets");
#undef SYSCTL_ADD_T4_PORTSTAT
+
+ SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_tls_records",
+ CTLFLAG_RD, &pi->tx_tls_records,
+ "# of TLS records transmitted");
+ SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_tls_octets",
+ CTLFLAG_RD, &pi->tx_tls_octets,
+ "# of payload octets in transmitted TLS records");
+ SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_tls_records",
+ CTLFLAG_RD, &pi->rx_tls_records,
+ "# of TLS records received");
+ SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_tls_octets",
+ CTLFLAG_RD, &pi->rx_tls_octets,
+ "# of payload octets in received TLS records");
}
static int
@@ -7443,7 +7484,7 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS)
"TDDP region:", "TPT region:", "STAG region:", "RQ region:",
"RQUDP region:", "PBL region:", "TXPBL region:",
"DBVFIFO region:", "ULPRX state:", "ULPTX state:",
- "On-chip queues:"
+ "On-chip queues:", "TLS keys:",
};
struct mem_desc avail[4];
struct mem_desc mem[nitems(region) + 3]; /* up to 3 holes */
@@ -7583,6 +7624,13 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS)
md->idx = nitems(region); /* hide it */
md++;
+ md->base = sc->vres.key.start;
+ if (sc->vres.key.size)
+ md->limit = md->base + sc->vres.key.size - 1;
+ else
+ md->idx = nitems(region); /* hide it */
+ md++;
+
/* add any address-space holes, there can be up to 3 */
for (n = 0; n < i - 1; n++)
if (avail[n].limit < avail[n + 1].base)
@@ -8674,6 +8722,68 @@ done:
#endif
#ifdef TCP_OFFLOAD
+static int
+sysctl_tls_rx_ports(SYSCTL_HANDLER_ARGS)
+{
+ struct adapter *sc = arg1;
+ int *old_ports, *new_ports;
+ int i, new_count, rc;
+
+ if (req->newptr == NULL && req->oldptr == NULL)
+ return (SYSCTL_OUT(req, NULL, imax(sc->tt.num_tls_rx_ports, 1) *
+ sizeof(sc->tt.tls_rx_ports[0])));
+
+ rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4tlsrx");
+ if (rc)
+ return (rc);
+
+ if (sc->tt.num_tls_rx_ports == 0) {
+ i = -1;
+ rc = SYSCTL_OUT(req, &i, sizeof(i));
+ } else
+ rc = SYSCTL_OUT(req, sc->tt.tls_rx_ports,
+ sc->tt.num_tls_rx_ports * sizeof(sc->tt.tls_rx_ports[0]));
+ if (rc == 0 && req->newptr != NULL) {
+ new_count = req->newlen / sizeof(new_ports[0]);
+ new_ports = malloc(new_count * sizeof(new_ports[0]), M_CXGBE,
+ M_WAITOK);
+ rc = SYSCTL_IN(req, new_ports, new_count *
+ sizeof(new_ports[0]));
+ if (rc)
+ goto err;
+
+ /* Allow setting to a single '-1' to clear the list. */
+ if (new_count == 1 && new_ports[0] == -1) {
+ ADAPTER_LOCK(sc);
+ old_ports = sc->tt.tls_rx_ports;
+ sc->tt.tls_rx_ports = NULL;
+ sc->tt.num_tls_rx_ports = 0;
+ ADAPTER_UNLOCK(sc);
+ free(old_ports, M_CXGBE);
+ } else {
+ for (i = 0; i < new_count; i++) {
+ if (new_ports[i] < 1 ||
+ new_ports[i] > IPPORT_MAX) {
+ rc = EINVAL;
+ goto err;
+ }
+ }
+
+ ADAPTER_LOCK(sc);
+ old_ports = sc->tt.tls_rx_ports;
+ sc->tt.tls_rx_ports = new_ports;
+ sc->tt.num_tls_rx_ports = new_count;
+ ADAPTER_UNLOCK(sc);
+ free(old_ports, M_CXGBE);
+ new_ports = NULL;
+ }
+ err:
+ free(new_ports, M_CXGBE);
+ }
+ end_synchronized_op(sc, 0);
+ return (rc);
+}
+
static void
unit_conv(char *buf, size_t len, u_int val, u_int factor)
{
@@ -10628,6 +10738,44 @@ DB_FUNC(tcb, db_show_t4tcb, db_t4_table, CS_OWN, NULL)
t4_dump_tcb(device_get_softc(dev), tid);
}
#endif
+
+/*
+ * Borrowed from cesa_prep_aes_key().
+ *
+ * NB: The crypto engine wants the words in the decryption key in reverse
+ * order.
+ */
+void
+t4_aes_getdeckey(void *dec_key, const void *enc_key, unsigned int kbits)
+{
+ uint32_t ek[4 * (RIJNDAEL_MAXNR + 1)];
+ uint32_t *dkey;
+ int i;
+
+ rijndaelKeySetupEnc(ek, enc_key, kbits);
+ dkey = dec_key;
+ dkey += (kbits / 8) / 4;
+
+ switch (kbits) {
+ case 128:
+ for (i = 0; i < 4; i++)
+ *--dkey = htobe32(ek[4 * 10 + i]);
+ break;
+ case 192:
+ for (i = 0; i < 2; i++)
+ *--dkey = htobe32(ek[4 * 11 + 2 + i]);
+ for (i = 0; i < 4; i++)
+ *--dkey = htobe32(ek[4 * 12 + i]);
+ break;
+ case 256:
+ for (i = 0; i < 4; i++)
+ *--dkey = htobe32(ek[4 * 13 + i]);
+ for (i = 0; i < 4; i++)
+ *--dkey = htobe32(ek[4 * 14 + i]);
+ break;
+ }
+ MPASS(dkey == dec_key);
+}
static struct sx mlu; /* mod load unload */
SX_SYSINIT(cxgbe_mlu, &mlu, "cxgbe mod load/unload");
Modified: stable/11/sys/dev/cxgbe/tom/t4_connect.c
==============================================================================
--- stable/11/sys/dev/cxgbe/tom/t4_connect.c Thu Mar 28 22:19:09 2019 (r345663)
+++ stable/11/sys/dev/cxgbe/tom/t4_connect.c Thu Mar 28 23:43:38 2019 (r345664)
@@ -140,6 +140,10 @@ do_act_establish(struct sge_iq *iq, const struct rss_h
}
make_established(toep, cpl->snd_isn, cpl->rcv_isn, cpl->tcp_opt);
+
+ if (toep->ulp_mode == ULP_MODE_TLS)
+ tls_establish(toep);
+
done:
INP_WUNLOCK(inp);
CURVNET_RESTORE();
@@ -266,6 +270,11 @@ calc_opt2a(struct socket *so, struct toepcb *toep)
if (toep->ulp_mode == ULP_MODE_TCPDDP)
opt2 |= F_RX_FC_VALID | F_RX_FC_DDP;
#endif
+ if (toep->ulp_mode == ULP_MODE_TLS) {
+ opt2 |= F_RX_FC_VALID;
+ opt2 &= ~V_RX_COALESCE(M_RX_COALESCE);
+ opt2 |= F_RX_FC_DISABLE;
+ }
return (htobe32(opt2));
}
@@ -376,10 +385,7 @@ t4_connect(struct toedev *tod, struct socket *so, stru
DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM);
toep->vnet = so->so_vnet;
- if (sc->tt.ddp && (so->so_options & SO_NO_DDP) == 0)
- set_tcpddp_ulp_mode(toep);
- else
- toep->ulp_mode = ULP_MODE_NONE;
+ set_ulp_mode(toep, select_ulp_mode(so, sc));
SOCKBUF_LOCK(&so->so_rcv);
/* opt0 rcv_bufsiz initially, assumes its normal meaning later */
toep->rx_credits = min(select_rcv_wnd(so) >> 10, M_RCV_BUFSIZ);
Modified: stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c
==============================================================================
--- stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c Thu Mar 28 22:19:09 2019 (r345663)
+++ stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c Thu Mar 28 23:43:38 2019 (r345664)
@@ -82,9 +82,6 @@ VNET_DECLARE(int, tcp_autorcvbuf_inc);
VNET_DECLARE(int, tcp_autorcvbuf_max);
#define V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max)
-#define IS_AIOTX_MBUF(m) \
- ((m)->m_flags & M_EXT && (m)->m_ext.ext_flags & EXT_FLAG_AIOTX)
-
static void t4_aiotx_cancel(struct kaiocb *job);
static void t4_aiotx_queue_toep(struct toepcb *toep);
@@ -115,7 +112,7 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_par
{
struct wrqe *wr;
struct fw_flowc_wr *flowc;
- unsigned int nparams = ftxp ? 8 : 6, flowclen;
+ unsigned int nparams, flowclen, paramidx;
struct vi_info *vi = toep->vi;
struct port_info *pi = vi->pi;
struct adapter *sc = pi->adapter;
@@ -125,6 +122,15 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_par
KASSERT(!(toep->flags & TPF_FLOWC_WR_SENT),
("%s: flowc for tid %u sent already", __func__, toep->tid));
+ if (ftxp != NULL)
+ nparams = 8;
+ else
+ nparams = 6;
+ if (toep->ulp_mode == ULP_MODE_TLS)
+ nparams++;
+ if (toep->tls.fcplenmax != 0)
+ nparams++;
+
flowclen = sizeof(*flowc) + nparams * sizeof(struct fw_flowc_mnemval);
wr = alloc_wrqe(roundup2(flowclen, 16), toep->ofld_txq);
@@ -140,39 +146,45 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_par
flowc->flowid_len16 = htonl(V_FW_WR_LEN16(howmany(flowclen, 16)) |
V_FW_WR_FLOWID(toep->tid));
- flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_PFNVFN;
- flowc->mnemval[0].val = htobe32(pfvf);
- flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH;
- flowc->mnemval[1].val = htobe32(pi->tx_chan);
- flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT;
- flowc->mnemval[2].val = htobe32(pi->tx_chan);
- flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID;
- flowc->mnemval[3].val = htobe32(toep->ofld_rxq->iq.abs_id);
+#define FLOWC_PARAM(__m, __v) \
+ do { \
+ flowc->mnemval[paramidx].mnemonic = FW_FLOWC_MNEM_##__m; \
+ flowc->mnemval[paramidx].val = htobe32(__v); \
+ paramidx++; \
+ } while (0)
+
+ paramidx = 0;
+
+ FLOWC_PARAM(PFNVFN, pfvf);
+ FLOWC_PARAM(CH, pi->tx_chan);
+ FLOWC_PARAM(PORT, pi->tx_chan);
+ FLOWC_PARAM(IQID, toep->ofld_rxq->iq.abs_id);
if (ftxp) {
uint32_t sndbuf = min(ftxp->snd_space, sc->tt.sndbuf);
- flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDNXT;
- flowc->mnemval[4].val = htobe32(ftxp->snd_nxt);
- flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_RCVNXT;
- flowc->mnemval[5].val = htobe32(ftxp->rcv_nxt);
- flowc->mnemval[6].mnemonic = FW_FLOWC_MNEM_SNDBUF;
- flowc->mnemval[6].val = htobe32(sndbuf);
- flowc->mnemval[7].mnemonic = FW_FLOWC_MNEM_MSS;
- flowc->mnemval[7].val = htobe32(ftxp->mss);
+ FLOWC_PARAM(SNDNXT, ftxp->snd_nxt);
+ FLOWC_PARAM(RCVNXT, ftxp->rcv_nxt);
+ FLOWC_PARAM(SNDBUF, sndbuf);
+ FLOWC_PARAM(MSS, ftxp->mss);
CTR6(KTR_CXGBE,
"%s: tid %u, mss %u, sndbuf %u, snd_nxt 0x%x, rcv_nxt 0x%x",
__func__, toep->tid, ftxp->mss, sndbuf, ftxp->snd_nxt,
ftxp->rcv_nxt);
} else {
- flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDBUF;
- flowc->mnemval[4].val = htobe32(512);
- flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_MSS;
- flowc->mnemval[5].val = htobe32(512);
+ FLOWC_PARAM(SNDBUF, 512);
+ FLOWC_PARAM(MSS, 512);
CTR2(KTR_CXGBE, "%s: tid %u", __func__, toep->tid);
}
+ if (toep->ulp_mode == ULP_MODE_TLS)
+ FLOWC_PARAM(ULP_MODE, toep->ulp_mode);
+ if (toep->tls.fcplenmax != 0)
+ FLOWC_PARAM(TXDATAPLEN_MAX, toep->tls.fcplenmax);
+#undef FLOWC_PARAM
+ KASSERT(paramidx == nparams, ("nparams mismatch"));
+
txsd->tx_credits = howmany(flowclen, 16);
txsd->plen = 0;
KASSERT(toep->tx_credits >= txsd->tx_credits && toep->txsd_avail > 0,
@@ -360,7 +372,7 @@ make_established(struct toepcb *toep, uint32_t snd_isn
soisconnected(so);
}
-static int
+int
send_rx_credits(struct adapter *sc, struct toepcb *toep, int credits)
{
struct wrqe *wr;
@@ -382,6 +394,23 @@ send_rx_credits(struct adapter *sc, struct toepcb *toe
}
void
+send_rx_modulate(struct adapter *sc, struct toepcb *toep)
+{
+ struct wrqe *wr;
+ struct cpl_rx_data_ack *req;
+
+ wr = alloc_wrqe(sizeof(*req), toep->ctrlq);
+ if (wr == NULL)
+ return;
+ req = wrtod(wr);
+
+ INIT_TP_WR_MIT_CPL(req, CPL_RX_DATA_ACK, toep->tid);
+ req->credit_dack = htobe32(F_RX_MODULATE_RX);
+
+ t4_wrq_tx(sc, wr);
+}
+
+void
t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp)
{
struct adapter *sc = tod->tod_softc;
@@ -398,8 +427,18 @@ t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp)
("%s: sb %p has more data (%d) than last time (%d).",
__func__, sb, sbused(sb), toep->sb_cc));
- toep->rx_credits += toep->sb_cc - sbused(sb);
+ credits = toep->sb_cc - sbused(sb);
toep->sb_cc = sbused(sb);
+ if (toep->ulp_mode == ULP_MODE_TLS) {
+ if (toep->tls.rcv_over >= credits) {
+ toep->tls.rcv_over -= credits;
+ credits = 0;
+ } else {
+ credits -= toep->tls.rcv_over;
+ toep->tls.rcv_over = 0;
+ }
+ }
+ toep->rx_credits += credits;
if (toep->rx_credits > 0 &&
(tp->rcv_wnd <= 32 * 1024 || toep->rx_credits >= 64 * 1024 ||
@@ -410,7 +449,8 @@ t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp)
toep->rx_credits -= credits;
tp->rcv_wnd += credits;
tp->rcv_adv += credits;
- }
+ } else if (toep->flags & TPF_FORCE_CREDITS)
+ send_rx_modulate(sc, toep);
}
void
@@ -428,8 +468,8 @@ t4_rcvd(struct toedev *tod, struct tcpcb *tp)
/*
* Close a connection by sending a CPL_CLOSE_CON_REQ message.
*/
-static int
-close_conn(struct adapter *sc, struct toepcb *toep)
+int
+t4_close_conn(struct adapter *sc, struct toepcb *toep)
{
struct wrqe *wr;
struct cpl_close_con_req *req;
@@ -630,6 +670,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep
KASSERT(toep->ulp_mode == ULP_MODE_NONE ||
toep->ulp_mode == ULP_MODE_TCPDDP ||
+ toep->ulp_mode == ULP_MODE_TLS ||
toep->ulp_mode == ULP_MODE_RDMA,
("%s: ulp_mode %u for toep %p", __func__, toep->ulp_mode, toep));
@@ -836,7 +877,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep
/* Send a FIN if requested, but only if there's no more data to send */
if (m == NULL && toep->flags & TPF_SEND_FIN)
- close_conn(sc, toep);
+ t4_close_conn(sc, toep);
}
static inline void
@@ -1028,7 +1069,7 @@ t4_push_pdus(struct adapter *sc, struct toepcb *toep,
/* Send a FIN if requested, but only if there are no more PDUs to send */
if (mbufq_first(pduq) == NULL && toep->flags & TPF_SEND_FIN)
- close_conn(sc, toep);
+ t4_close_conn(sc, toep);
}
int
@@ -1047,6 +1088,8 @@ t4_tod_output(struct toedev *tod, struct tcpcb *tp)
if (toep->ulp_mode == ULP_MODE_ISCSI)
t4_push_pdus(sc, toep, 0);
+ else if (tls_tx_key(toep))
+ t4_push_tls_records(sc, toep, 0);
else
t4_push_frames(sc, toep, 0);
@@ -1071,6 +1114,8 @@ t4_send_fin(struct toedev *tod, struct tcpcb *tp)
if (tp->t_state >= TCPS_ESTABLISHED) {
if (toep->ulp_mode == ULP_MODE_ISCSI)
t4_push_pdus(sc, toep, 0);
+ else if (tls_tx_key(toep))
+ t4_push_tls_records(sc, toep, 0);
else
t4_push_frames(sc, toep, 0);
}
@@ -1703,6 +1748,10 @@ do_fw4_ack(struct sge_iq *iq, const struct rss_header
credits -= txsd->tx_credits;
toep->tx_credits += txsd->tx_credits;
plen += txsd->plen;
+ if (txsd->iv_buffer) {
+ free(txsd->iv_buffer, M_CXGBE);
+ txsd->iv_buffer = NULL;
+ }
txsd++;
toep->txsd_avail++;
KASSERT(toep->txsd_avail <= toep->txsd_total,
@@ -1728,6 +1777,8 @@ do_fw4_ack(struct sge_iq *iq, const struct rss_header
CURVNET_SET(toep->vnet);
if (toep->ulp_mode == ULP_MODE_ISCSI)
t4_push_pdus(sc, toep, plen);
+ else if (tls_tx_key(toep))
+ t4_push_tls_records(sc, toep, plen);
else
t4_push_frames(sc, toep, plen);
CURVNET_RESTORE();
@@ -1757,6 +1808,12 @@ do_fw4_ack(struct sge_iq *iq, const struct rss_header
tid, plen);
#endif
sbdrop_locked(sb, plen);
+ if (tls_tx_key(toep)) {
+ struct tls_ofld_info *tls_ofld = &toep->tls;
+
+ MPASS(tls_ofld->sb_off >= plen);
+ tls_ofld->sb_off -= plen;
+ }
if (!TAILQ_EMPTY(&toep->aiotx_jobq))
t4_aiotx_queue_toep(toep);
sowwakeup_locked(so); /* unlocks so_snd */
@@ -1808,14 +1865,14 @@ do_set_tcb_rpl(struct sge_iq *iq, const struct rss_hea
}
void
-t4_set_tcb_field(struct adapter *sc, struct sge_wrq *wrq, int tid,
- uint16_t word, uint64_t mask, uint64_t val, int reply, int cookie, int iqid)
+t4_set_tcb_field(struct adapter *sc, struct sge_wrq *wrq, struct toepcb *toep,
+ uint16_t word, uint64_t mask, uint64_t val, int reply, int cookie)
{
struct wrqe *wr;
struct cpl_set_tcb_field *req;
+ struct ofld_tx_sdesc *txsd;
MPASS((cookie & ~M_COOKIE) == 0);
- MPASS((iqid & ~M_QUEUENO) == 0);
wr = alloc_wrqe(sizeof(*req), wrq);
if (wr == NULL) {
@@ -1824,13 +1881,26 @@ t4_set_tcb_field(struct adapter *sc, struct sge_wrq *w
}
req = wrtod(wr);
- INIT_TP_WR_MIT_CPL(req, CPL_SET_TCB_FIELD, tid);
- req->reply_ctrl = htobe16(V_QUEUENO(iqid));
+ INIT_TP_WR_MIT_CPL(req, CPL_SET_TCB_FIELD, toep->tid);
+ req->reply_ctrl = htobe16(V_QUEUENO(toep->ofld_rxq->iq.abs_id));
if (reply == 0)
req->reply_ctrl |= htobe16(F_NO_REPLY);
req->word_cookie = htobe16(V_WORD(word) | V_COOKIE(cookie));
req->mask = htobe64(mask);
req->val = htobe64(val);
+ if ((wrq->eq.flags & EQ_TYPEMASK) == EQ_OFLD) {
+ txsd = &toep->txsd[toep->txsd_pidx];
+ txsd->tx_credits = howmany(sizeof(*req), 16);
+ txsd->plen = 0;
+ KASSERT(toep->tx_credits >= txsd->tx_credits &&
+ toep->txsd_avail > 0,
+ ("%s: not enough credits (%d)", __func__,
+ toep->tx_credits));
+ toep->tx_credits -= txsd->tx_credits;
+ if (__predict_false(++toep->txsd_pidx == toep->txsd_total))
+ toep->txsd_pidx = 0;
+ toep->txsd_avail--;
+ }
t4_wrq_tx(sc, wr);
}
@@ -2229,6 +2299,9 @@ t4_aio_queue_aiotx(struct socket *so, struct kaiocb *j
return (EOPNOTSUPP);
if (!sc->tt.tx_zcopy)
+ return (EOPNOTSUPP);
+
+ if (tls_tx_key(toep))
return (EOPNOTSUPP);
SOCKBUF_LOCK(&so->so_snd);
Modified: stable/11/sys/dev/cxgbe/tom/t4_ddp.c
==============================================================================
--- stable/11/sys/dev/cxgbe/tom/t4_ddp.c Thu Mar 28 22:19:09 2019 (r345663)
+++ stable/11/sys/dev/cxgbe/tom/t4_ddp.c Thu Mar 28 23:43:38 2019 (r345664)
@@ -816,14 +816,13 @@ enable_ddp(struct adapter *sc, struct toepcb *toep)
DDP_ASSERT_LOCKED(toep);
toep->ddp.flags |= DDP_SC_REQ;
- t4_set_tcb_field(sc, toep->ctrlq, toep->tid, W_TCB_RX_DDP_FLAGS,
+ t4_set_tcb_field(sc, toep->ctrlq, toep, W_TCB_RX_DDP_FLAGS,
V_TF_DDP_OFF(1) | V_TF_DDP_INDICATE_OUT(1) |
V_TF_DDP_BUF0_INDICATE(1) | V_TF_DDP_BUF1_INDICATE(1) |
V_TF_DDP_BUF0_VALID(1) | V_TF_DDP_BUF1_VALID(1),
- V_TF_DDP_BUF0_INDICATE(1) | V_TF_DDP_BUF1_INDICATE(1), 0, 0,
- toep->ofld_rxq->iq.abs_id);
- t4_set_tcb_field(sc, toep->ctrlq, toep->tid, W_TCB_T_FLAGS,
- V_TF_RCV_COALESCE_ENABLE(1), 0, 0, 0, toep->ofld_rxq->iq.abs_id);
+ V_TF_DDP_BUF0_INDICATE(1) | V_TF_DDP_BUF1_INDICATE(1), 0, 0);
+ t4_set_tcb_field(sc, toep->ctrlq, toep, W_TCB_T_FLAGS,
+ V_TF_RCV_COALESCE_ENABLE(1), 0, 0, 0);
}
static int
@@ -1873,10 +1872,9 @@ t4_aio_cancel_active(struct kaiocb *job)
*/
valid_flag = i == 0 ? V_TF_DDP_BUF0_VALID(1) :
V_TF_DDP_BUF1_VALID(1);
- t4_set_tcb_field(sc, toep->ctrlq, toep->tid,
+ t4_set_tcb_field(sc, toep->ctrlq, toep,
W_TCB_RX_DDP_FLAGS, valid_flag, 0, 1,
- i + DDP_BUF0_INVALIDATED,
- toep->ofld_rxq->iq.abs_id);
+ i + DDP_BUF0_INVALIDATED);
toep->ddp.db[i].cancel_pending = 1;
CTR2(KTR_CXGBE, "%s: request %p marked pending",
__func__, job);
Modified: stable/11/sys/dev/cxgbe/tom/t4_listen.c
==============================================================================
--- stable/11/sys/dev/cxgbe/tom/t4_listen.c Thu Mar 28 22:19:09 2019 (r345663)
+++ stable/11/sys/dev/cxgbe/tom/t4_listen.c Thu Mar 28 23:43:38 2019 (r345664)
@@ -1054,6 +1054,11 @@ calc_opt2p(struct adapter *sc, struct port_info *pi, i
if (ulp_mode == ULP_MODE_TCPDDP)
opt2 |= F_RX_FC_VALID | F_RX_FC_DDP;
#endif
+ if (ulp_mode == ULP_MODE_TLS) {
+ opt2 |= F_RX_FC_VALID;
+ opt2 &= ~V_RX_COALESCE(M_RX_COALESCE);
+ opt2 |= F_RX_FC_DISABLE;
+ }
return htobe32(opt2);
}
@@ -1344,11 +1349,15 @@ found:
INIT_TP_WR_MIT_CPL(rpl5, CPL_PASS_ACCEPT_RPL, tid);
}
- if (sc->tt.ddp && (so->so_options & SO_NO_DDP) == 0) {
- ulp_mode = ULP_MODE_TCPDDP;
+ ulp_mode = select_ulp_mode(so, sc);
+ switch (ulp_mode) {
+ case ULP_MODE_TCPDDP:
synqe->flags |= TPF_SYNQE_TCPDDP;
- } else
- ulp_mode = ULP_MODE_NONE;
+ break;
+ case ULP_MODE_TLS:
+ synqe->flags |= TPF_SYNQE_TLS;
+ break;
+ }
rpl->opt0 = calc_opt0(so, vi, e, mtu_idx, rscale, rx_credits, ulp_mode);
rpl->opt2 = calc_opt2p(sc, pi, rxqid, &cpl->tcpopt, &th, ulp_mode);
@@ -1404,8 +1413,8 @@ found:
REJECT_PASS_ACCEPT();
}
- CTR5(KTR_CXGBE, "%s: stid %u, tid %u, lctx %p, synqe %p, SYNACK",
- __func__, stid, tid, lctx, synqe);
+ CTR6(KTR_CXGBE, "%s: stid %u, tid %u, lctx %p, synqe %p, SYNACK mode %d",
+ __func__, stid, tid, lctx, synqe, ulp_mode);
INP_WLOCK(inp);
synqe->flags |= TPF_SYNQE_HAS_L2TE;
@@ -1554,9 +1563,11 @@ reset:
toep->tid = tid;
toep->l2te = &sc->l2t->l2tab[synqe->l2e_idx];
if (synqe->flags & TPF_SYNQE_TCPDDP)
- set_tcpddp_ulp_mode(toep);
+ set_ulp_mode(toep, ULP_MODE_TCPDDP);
+ else if (synqe->flags & TPF_SYNQE_TLS)
+ set_ulp_mode(toep, ULP_MODE_TLS);
else
- toep->ulp_mode = ULP_MODE_NONE;
+ set_ulp_mode(toep, ULP_MODE_NONE);
/* opt0 rcv_bufsiz initially, assumes its normal meaning later */
toep->rx_credits = synqe->rcv_bufsize;
Copied and modified: stable/11/sys/dev/cxgbe/tom/t4_tls.c (from r330884, head/sys/dev/cxgbe/tom/t4_tls.c)
==============================================================================
--- head/sys/dev/cxgbe/tom/t4_tls.c Tue Mar 13 23:05:51 2018 (r330884, copy source)
+++ stable/11/sys/dev/cxgbe/tom/t4_tls.c Thu Mar 28 23:43:38 2019 (r345664)
@@ -48,6 +48,19 @@ __FBSDID("$FreeBSD$");
#include "tom/t4_tom_l2t.h"
#include "tom/t4_tom.h"
+VNET_DECLARE(int, tcp_do_autosndbuf);
+#define V_tcp_do_autosndbuf VNET(tcp_do_autosndbuf)
+VNET_DECLARE(int, tcp_autosndbuf_inc);
+#define V_tcp_autosndbuf_inc VNET(tcp_autosndbuf_inc)
+VNET_DECLARE(int, tcp_autosndbuf_max);
+#define V_tcp_autosndbuf_max VNET(tcp_autosndbuf_max)
+VNET_DECLARE(int, tcp_do_autorcvbuf);
+#define V_tcp_do_autorcvbuf VNET(tcp_do_autorcvbuf)
+VNET_DECLARE(int, tcp_autorcvbuf_inc);
+#define V_tcp_autorcvbuf_inc VNET(tcp_autorcvbuf_inc)
+VNET_DECLARE(int, tcp_autorcvbuf_max);
+#define V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max)
+
/*
* The TCP sequence number of a CPL_TLS_DATA mbuf is saved here while
* the mbuf is in the ulp_pdu_reclaimq.
@@ -68,11 +81,17 @@ t4_set_tls_tcb_field(struct toepcb *toep, uint16_t wor
{
struct adapter *sc = td_adapter(toep->td);
- t4_set_tcb_field(sc, toep->ctrlq, toep->tid, word, mask, val, 0, 0,
- toep->ofld_rxq->iq.abs_id);
+ t4_set_tcb_field(sc, toep->ofld_txq, toep, word, mask, val, 0, 0);
}
/* TLS and DTLS common routines */
+bool
+can_tls_offload(struct adapter *sc)
+{
+
+ return (sc->tt.tls && sc->cryptocaps & FW_CAPS_CONFIG_TLSKEYS);
+}
+
int
tls_tx_key(struct toepcb *toep)
{
@@ -423,32 +442,13 @@ prepare_txkey_wr(struct tls_keyctx *kwr, struct tls_ke
}
/* TLS Key memory management */
-int
-tls_init_kmap(struct adapter *sc, struct tom_data *td)
-{
-
- td->key_map = vmem_create("T4TLS key map", sc->vres.key.start,
- sc->vres.key.size, 8, 0, M_FIRSTFIT | M_NOWAIT);
- if (td->key_map == NULL)
- return (ENOMEM);
- return (0);
-}
-
-void
-tls_free_kmap(struct tom_data *td)
-{
-
- if (td->key_map != NULL)
- vmem_destroy(td->key_map);
-}
-
static int
get_new_keyid(struct toepcb *toep, struct tls_key_context *k_ctx)
{
- struct tom_data *td = toep->td;
+ struct adapter *sc = td_adapter(toep->td);
vmem_addr_t addr;
- if (vmem_alloc(td->key_map, TLS_KEY_CONTEXT_SZ, M_NOWAIT | M_FIRSTFIT,
+ if (vmem_alloc(sc->key_map, TLS_KEY_CONTEXT_SZ, M_NOWAIT | M_FIRSTFIT,
&addr) != 0)
return (-1);
@@ -458,9 +458,9 @@ get_new_keyid(struct toepcb *toep, struct tls_key_cont
static void
free_keyid(struct toepcb *toep, int keyid)
{
- struct tom_data *td = toep->td;
+ struct adapter *sc = td_adapter(toep->td);
- vmem_free(td->key_map, keyid, TLS_KEY_CONTEXT_SZ);
+ vmem_free(sc->key_map, keyid, TLS_KEY_CONTEXT_SZ);
}
static void
@@ -482,7 +482,7 @@ static int
get_keyid(struct tls_ofld_info *tls_ofld, unsigned int ops)
{
return (ops & KEY_WRITE_RX ? tls_ofld->rx_key_addr :
- ((ops & KEY_WRITE_TX) ? tls_ofld->rx_key_addr : -1));
+ ((ops & KEY_WRITE_TX) ? tls_ofld->tx_key_addr : -1));
}
static int
@@ -505,9 +505,9 @@ tls_program_key_id(struct toepcb *toep, struct tls_key
struct tls_key_req *kwr;
struct tls_keyctx *kctx;
- kwrlen = roundup2(sizeof(*kwr), 16);
+ kwrlen = sizeof(*kwr);
kctxlen = roundup2(sizeof(*kctx), 32);
- len = kwrlen + kctxlen;
+ len = roundup2(kwrlen + kctxlen, 16);
if (toep->txsd_avail == 0)
return (EAGAIN);
@@ -549,7 +549,6 @@ tls_program_key_id(struct toepcb *toep, struct tls_key
kwr->sc_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_IMM));
kwr->sc_len = htobe32(kctxlen);
- /* XXX: This assumes that kwrlen == sizeof(*kwr). */
kctx = (struct tls_keyctx *)(kwr + 1);
memset(kctx, 0, kctxlen);
@@ -1168,7 +1167,8 @@ t4_push_tls_records(struct adapter *sc, struct toepcb
* Send a FIN if requested, but only if there's no
* more data to send.
*/
- if (sbavail(sb) == 0 && toep->flags & TPF_SEND_FIN) {
+ if (sbavail(sb) == tls_ofld->sb_off &&
+ toep->flags & TPF_SEND_FIN) {
if (sowwakeup)
sowwakeup_locked(so);
else
@@ -1182,17 +1182,23 @@ t4_push_tls_records(struct adapter *sc, struct toepcb
/*
* A full TLS header is not yet queued, stop
* for now until more data is added to the
- * socket buffer.
+ * socket buffer. However, if the connection
+ * has been closed, we will never get the rest
+ * of the header so just discard the partial
+ * header and close the connection.
*/
#ifdef VERBOSE_TRACES
- CTR4(KTR_CXGBE, "%s: tid %d sbavail %d sb_off %d",
- __func__, toep->tid, sbavail(sb), tls_ofld->sb_off);
+ CTR5(KTR_CXGBE, "%s: tid %d sbavail %d sb_off %d%s",
+ __func__, toep->tid, sbavail(sb), tls_ofld->sb_off,
+ toep->flags & TPF_SEND_FIN ? "" : " SEND_FIN");
#endif
if (sowwakeup)
sowwakeup_locked(so);
else
SOCKBUF_UNLOCK(sb);
SOCKBUF_UNLOCK_ASSERT(sb);
+ if (toep->flags & TPF_SEND_FIN)
+ t4_close_conn(sc, toep);
return;
}
@@ -1209,19 +1215,25 @@ t4_push_tls_records(struct adapter *sc, struct toepcb
/*
* The full TLS record is not yet queued, stop
* for now until more data is added to the
- * socket buffer.
+ * socket buffer. However, if the connection
+ * has been closed, we will never get the rest
+ * of the record so just discard the partial
+ * record and close the connection.
*/
#ifdef VERBOSE_TRACES
- CTR5(KTR_CXGBE,
- "%s: tid %d sbavail %d sb_off %d plen %d",
+ CTR6(KTR_CXGBE,
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:05:52 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB10CDBF8A;
Tue, 3 Sep 2019 14:05:51 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 46N7yl0vZKz4Nv8;
Tue, 3 Sep 2019 14:05:51 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id 1EF8019C9C; Tue, 3 Sep 2019 14:05:49 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id D9F671D41E;
Fri, 29 Mar 2019 00:04:54 +0000 (UTC)
(envelope-from owner-src-committers@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 4EC616B986;
Fri, 29 Mar 2019 00:04:54 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 1E11E1D3F6; Fri, 29 Mar 2019 00:04:54 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 1D5CD1D3F4
for ;
Fri, 29 Mar 2019 00:04:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
[IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id D50406B980;
Fri, 29 Mar 2019 00:04:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
[IPv6:2610:1c1:1:6068::e6a:0])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C44E26B65;
Fri, 29 Mar 2019 00:04:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2T04oet090052;
Fri, 29 Mar 2019 00:04:50 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2T04oKO090051;
Fri, 29 Mar 2019 00:04:50 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201903290004.x2T04oKO090051@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
using -f
From: John Baldwin
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345665 - stable/11/sys/arm/conf
X-SVN-Group: stable-11
X-SVN-Commit-Author: jhb
X-SVN-Commit-Paths: stable/11/sys/arm/conf
X-SVN-Commit-Revision: 345665
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 4EC616B986
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.97 / 15.00];
local_wl_from(0.00)[freebsd.org];
NEURAL_HAM_MEDIUM(-1.00)[-0.995,0];
NEURAL_HAM_SHORT(-0.97)[-0.973,0];
ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:05:52 -0000
X-Original-Date: Fri, 29 Mar 2019 00:04:50 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:05:52 -0000
Author: jhb
Date: Fri Mar 29 00:04:50 2019
New Revision: 345665
URL: https://svnweb.freebsd.org/changeset/base/345665
Log:
MFC 318562: Exclude ccr(4) from arm LINT since it excludes cxgbe(4).
Modified:
stable/11/sys/arm/conf/NOTES
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/arm/conf/NOTES
==============================================================================
--- stable/11/sys/arm/conf/NOTES Thu Mar 28 23:43:38 2019 (r345664)
+++ stable/11/sys/arm/conf/NOTES Fri Mar 29 00:04:50 2019 (r345665)
@@ -77,6 +77,7 @@ nodevice snake_saver
nodevice star_saver
nodevice warp_saver
+nodevice ccr
nodevice cxgbe
nodevice cxgbev
nodevice snd_cmi
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:05:51 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 877C6DBF75;
Tue, 3 Sep 2019 14:05:51 +0000 (UTC)
(envelope-from yuripv@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 46N7yl04KYz4Nv5;
Tue, 3 Sep 2019 14:05:51 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id 2B93B19CA0; Tue, 3 Sep 2019 14:05:49 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 5742E1DEA3;
Fri, 29 Mar 2019 01:16:42 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 2AA376D965;
Fri, 29 Mar 2019 01:16:42 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 0ECC91DEA2; Fri, 29 Mar 2019 01:16:42 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 8C3FF1DE97
for ;
Fri, 29 Mar 2019 01:16:39 +0000 (UTC)
(envelope-from mckusick@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
[IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 600206D959;
Fri, 29 Mar 2019 01:16:39 +0000 (UTC)
(envelope-from mckusick@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
[IPv6:2610:1c1:1:6068::e6a:0])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C34527783;
Fri, 29 Mar 2019 01:16:39 +0000 (UTC)
(envelope-from mckusick@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2T1Gdkt026827;
Fri, 29 Mar 2019 01:16:39 GMT (envelope-from mckusick@FreeBSD.org)
Received: (from mckusick@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2T1GcSx026825;
Fri, 29 Mar 2019 01:16:38 GMT (envelope-from mckusick@FreeBSD.org)
Message-Id: <201903290116.x2T1GcSx026825@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: mckusick set sender to
mckusick@FreeBSD.org using -f
From: Kirk McKusick
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345667 - in stable/11/sys: kern ufs/ffs
X-SVN-Group: stable-11
X-SVN-Commit-Author: mckusick
X-SVN-Commit-Paths: in stable/11/sys: kern ufs/ffs
X-SVN-Commit-Revision: 345667
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 2AA376D965
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.95 / 15.00];
local_wl_from(0.00)[freebsd.org];
NEURAL_HAM_MEDIUM(-1.00)[-0.995,0];
NEURAL_HAM_SHORT(-0.96)[-0.956,0];
ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:05:52 -0000
X-Original-Date: Fri, 29 Mar 2019 01:16:38 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:05:52 -0000
Author: mckusick
Date: Fri Mar 29 01:16:38 2019
New Revision: 345667
URL: https://svnweb.freebsd.org/changeset/base/345667
Log:
MFC of 343536, 345077, and 345352
Collectively fixing ffs_truncate3 and dangling dependencies panics
when using ACLs.
Sponsored by: Netflix
Modified:
stable/11/sys/kern/vfs_bio.c
stable/11/sys/ufs/ffs/ffs_softdep.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/kern/vfs_bio.c
==============================================================================
--- stable/11/sys/kern/vfs_bio.c Fri Mar 29 01:15:37 2019 (r345666)
+++ stable/11/sys/kern/vfs_bio.c Fri Mar 29 01:16:38 2019 (r345667)
@@ -4479,6 +4479,8 @@ b_io_dismiss(struct buf *bp, int ioflag, bool release)
if ((ioflag & IO_DIRECT) != 0)
bp->b_flags |= B_DIRECT;
+ if ((ioflag & IO_EXT) != 0)
+ bp->b_xflags |= BX_ALTDATA;
if ((ioflag & (IO_VMIO | IO_DIRECT)) != 0 && LIST_EMPTY(&bp->b_dep)) {
bp->b_flags |= B_RELBUF;
if ((ioflag & IO_NOREUSE) != 0)
Modified: stable/11/sys/ufs/ffs/ffs_softdep.c
==============================================================================
--- stable/11/sys/ufs/ffs/ffs_softdep.c Fri Mar 29 01:15:37 2019 (r345666)
+++ stable/11/sys/ufs/ffs/ffs_softdep.c Fri Mar 29 01:16:38 2019 (r345667)
@@ -13902,6 +13902,8 @@ softdep_bp_to_mp(bp)
if (LIST_EMPTY(&bp->b_dep))
return (NULL);
vp = bp->b_vp;
+ KASSERT(vp != NULL,
+ ("%s, buffer with dependencies lacks vnode", __func__));
/*
* The ump mount point is stable after we get a correct
@@ -13911,17 +13913,33 @@ softdep_bp_to_mp(bp)
* workitem might be freed while dereferenced.
*/
retry:
- if (vp->v_type == VCHR) {
+ switch (vp->v_type) {
+ case VCHR:
VI_LOCK(vp);
mp = vp->v_type == VCHR ? vp->v_rdev->si_mountpt : NULL;
VI_UNLOCK(vp);
if (mp == NULL)
goto retry;
- } else if (vp->v_type == VREG || vp->v_type == VDIR ||
- vp->v_type == VLNK) {
+ break;
+ case VREG:
+ case VDIR:
+ case VLNK:
+ case VFIFO:
+ case VSOCK:
mp = vp->v_mount;
- } else {
- return (NULL);
+ break;
+ case VBLK:
+ vn_printf(vp, "softdep_bp_to_mp: unexpected block device\n");
+ /* FALLTHROUGH */
+ case VNON:
+ case VBAD:
+ case VMARKER:
+ mp = NULL;
+ break;
+ default:
+ vn_printf(vp, "unknown vnode type");
+ mp = NULL;
+ break;
}
return (VFSTOUFS(mp));
}
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:05:52 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA061DBF8D;
Tue, 3 Sep 2019 14:05:51 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 46N7yl1D4Jz4NvH;
Tue, 3 Sep 2019 14:05:51 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id 4FBE419CAC; Tue, 3 Sep 2019 14:05:49 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 475B61EA0D;
Fri, 29 Mar 2019 01:51:46 +0000 (UTC)
(envelope-from owner-src-committers@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 94E876F11E;
Fri, 29 Mar 2019 01:51:45 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 0F7061E9D2; Fri, 29 Mar 2019 01:51:45 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 23EF61E9C7
for ;
Fri, 29 Mar 2019 01:51:42 +0000 (UTC)
(envelope-from philip@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
[IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id D02DA6F0F9;
Fri, 29 Mar 2019 01:51:41 +0000 (UTC)
(envelope-from philip@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
[IPv6:2610:1c1:1:6068::e6a:0])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB9E327D03;
Fri, 29 Mar 2019 01:51:41 +0000 (UTC)
(envelope-from philip@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2T1pf9f047694;
Fri, 29 Mar 2019 01:51:41 GMT (envelope-from philip@FreeBSD.org)
Received: (from philip@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2T1pfaB047693;
Fri, 29 Mar 2019 01:51:41 GMT (envelope-from philip@FreeBSD.org)
Message-Id: <201903290151.x2T1pfaB047693@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: philip set sender to
philip@FreeBSD.org using -f
From: Philip Paeps
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345673 - stable/11/share/misc
X-SVN-Group: stable-11
X-SVN-Commit-Author: philip
X-SVN-Commit-Paths: stable/11/share/misc
X-SVN-Commit-Revision: 345673
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 94E876F11E
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
local_wl_from(0.00)[freebsd.org];
NEURAL_HAM_MEDIUM(-1.00)[-0.995,0];
NEURAL_HAM_SHORT(-0.97)[-0.968,0];
ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:05:52 -0000
X-Original-Date: Fri, 29 Mar 2019 01:51:41 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:05:52 -0000
Author: philip
Date: Fri Mar 29 01:51:41 2019
New Revision: 345673
URL: https://svnweb.freebsd.org/changeset/base/345673
Log:
MFC r345526:
SZ has been known as Eswatini since April 2018 (formerly Swaziland).
Modified:
stable/11/share/misc/iso3166
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/share/misc/iso3166
==============================================================================
--- stable/11/share/misc/iso3166 Fri Mar 29 01:50:16 2019 (r345672)
+++ stable/11/share/misc/iso3166 Fri Mar 29 01:51:41 2019 (r345673)
@@ -232,7 +232,7 @@ LK LKA 144 Sri Lanka
SD SDN 729 Sudan
SR SUR 740 Suriname
SJ SJM 744 Svalbard and Jan Mayen
-SZ SWZ 748 Swaziland
+SZ SWZ 748 Eswatini
SE SWE 752 Sweden
CH CHE 756 Switzerland
SY SYR 760 Syrian Arab Republic
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:05:54 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF651DC036;
Tue, 3 Sep 2019 14:05:54 +0000 (UTC)
(envelope-from yuripv@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 46N7yp35wCz4Nxd;
Tue, 3 Sep 2019 14:05:54 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id 23FC819D6D; Tue, 3 Sep 2019 14:05:51 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 841939086;
Fri, 29 Mar 2019 13:38:51 +0000 (UTC)
(envelope-from owner-src-committers@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 2D58091C3C;
Fri, 29 Mar 2019 13:38:51 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 197EF9084; Fri, 29 Mar 2019 13:38:51 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 7E491907F
for ;
Fri, 29 Mar 2019 13:38:48 +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 508D691C33;
Fri, 29 Mar 2019 13:38:48 +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 2CC3E2F76F;
Fri, 29 Mar 2019 13:38:48 +0000 (UTC)
(envelope-from markj@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2TDcmgm018766;
Fri, 29 Mar 2019 13:38:48 GMT (envelope-from markj@FreeBSD.org)
Received: (from markj@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2TDcmfu018765;
Fri, 29 Mar 2019 13:38:48 GMT (envelope-from markj@FreeBSD.org)
Message-Id: <201903291338.x2TDcmfu018765@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: markj set sender to
markj@FreeBSD.org using -f
From: Mark Johnston
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345688 - stable/11/sys/netinet
X-SVN-Group: stable-11
X-SVN-Commit-Author: markj
X-SVN-Commit-Paths: stable/11/sys/netinet
X-SVN-Commit-Revision: 345688
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 2D58091C3C
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:96.47.64.0/20, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:05:55 -0000
X-Original-Date: Fri, 29 Mar 2019 13:38:48 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:05:55 -0000
Author: markj
Date: Fri Mar 29 13:38:47 2019
New Revision: 345688
URL: https://svnweb.freebsd.org/changeset/base/345688
Log:
MFC r345560:
Add CTLFLAG_VNET to the net.inet.icmp.tstamprepl definition.
Modified:
stable/11/sys/netinet/ip_icmp.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/netinet/ip_icmp.c
==============================================================================
--- stable/11/sys/netinet/ip_icmp.c Fri Mar 29 13:37:29 2019 (r345687)
+++ stable/11/sys/netinet/ip_icmp.c Fri Mar 29 13:38:47 2019 (r345688)
@@ -151,7 +151,7 @@ SYSCTL_INT(_net_inet_icmp, OID_AUTO, bmcastecho, CTLFL
static VNET_DEFINE(int, icmptstamprepl) = 1;
#define V_icmptstamprepl VNET(icmptstamprepl)
-SYSCTL_INT(_net_inet_icmp, OID_AUTO, tstamprepl, CTLFLAG_RW,
+SYSCTL_INT(_net_inet_icmp, OID_AUTO, tstamprepl, CTLFLAG_VNET | CTLFLAG_RW,
&VNET_NAME(icmptstamprepl), 0,
"Respond to ICMP Timestamp packets");
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:06:00 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3A10DDC16B;
Tue, 3 Sep 2019 14:06:00 +0000 (UTC)
(envelope-from yuripv@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 46N7yv0pc4z4P3f;
Tue, 3 Sep 2019 14:05:59 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id 00B0B19EF5; Tue, 3 Sep 2019 14:05:52 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 677521D91;
Sat, 30 Mar 2019 10:12:05 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 28BFC80FAE;
Sat, 30 Mar 2019 10:12:05 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 15C4F1D90; Sat, 30 Mar 2019 10:12:05 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 029D91D8C
for ;
Sat, 30 Mar 2019 10:12:02 +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 07BF180F92;
Sat, 30 Mar 2019 10:12:01 +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 C6E03D57A;
Sat, 30 Mar 2019 10:12: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 x2UAC0qR076645;
Sat, 30 Mar 2019 10:12:00 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2UAC0gm076644;
Sat, 30 Mar 2019 10:12:00 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201903301012.x2UAC0gm076644@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
using -f
From: Konstantin Belousov
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345732 - stable/11/libexec/rtld-elf
X-SVN-Group: stable-11
X-SVN-Commit-Author: kib
X-SVN-Commit-Paths: stable/11/libexec/rtld-elf
X-SVN-Commit-Revision: 345732
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 28BFC80FAE
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.94 / 15.00];
local_wl_from(0.00)[freebsd.org];
NEURAL_HAM_MEDIUM(-1.00)[-0.997,0];
NEURAL_HAM_SHORT(-0.94)[-0.941,0];
ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:06:00 -0000
X-Original-Date: Sat, 30 Mar 2019 10:12:00 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:06:00 -0000
Author: kib
Date: Sat Mar 30 10:12:00 2019
New Revision: 345732
URL: https://svnweb.freebsd.org/changeset/base/345732
Log:
MFC r345620:
rtld: disable relro enforcement for irelative relocation processing.
Modified:
stable/11/libexec/rtld-elf/rtld.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/libexec/rtld-elf/rtld.c
==============================================================================
--- stable/11/libexec/rtld-elf/rtld.c Sat Mar 30 10:04:42 2019 (r345731)
+++ stable/11/libexec/rtld-elf/rtld.c Sat Mar 30 10:12:00 2019 (r345732)
@@ -2935,14 +2935,14 @@ resolve_object_ifunc(Obj_Entry *obj, bool bind_now, in
if (obj->ifuncs_resolved)
return (0);
obj->ifuncs_resolved = true;
- if (obj->irelative && reloc_iresolve(obj, lockstate) == -1)
+ if (!obj->irelative && !((obj->bind_now || bind_now) && obj->gnu_ifunc))
+ return (0);
+ if (obj_disable_relro(obj) == -1 ||
+ (obj->irelative && reloc_iresolve(obj, lockstate) == -1) ||
+ ((obj->bind_now || bind_now) && obj->gnu_ifunc &&
+ reloc_gnu_ifunc(obj, flags, lockstate) == -1) ||
+ obj_enforce_relro(obj) == -1)
return (-1);
- if ((obj->bind_now || bind_now) && obj->gnu_ifunc) {
- if (obj_disable_relro(obj) ||
- reloc_gnu_ifunc(obj, flags, lockstate) == -1 ||
- obj_enforce_relro(obj))
- return (-1);
- }
return (0);
}
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:05:56 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F877DC06B;
Tue, 3 Sep 2019 14:05:56 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 46N7yq5Ksmz4P0P;
Tue, 3 Sep 2019 14:05:55 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id 6FD8719DE0; Tue, 3 Sep 2019 14:05:51 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id D1FD0BEA2;
Fri, 29 Mar 2019 14:35:08 +0000 (UTC)
(envelope-from owner-src-committers@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 451BF963F5;
Fri, 29 Mar 2019 14:35:06 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 0B169BE91; Fri, 29 Mar 2019 14:34:59 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 9C4A2BD90
for ;
Fri, 29 Mar 2019 14:34:56 +0000 (UTC) (envelope-from kp@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
[IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 8F4DC962E9;
Fri, 29 Mar 2019 14:34:55 +0000 (UTC) (envelope-from kp@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
[IPv6:2610:1c1:1:6068::e6a:0])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B5DC22F;
Fri, 29 Mar 2019 14:34:51 +0000 (UTC) (envelope-from kp@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2TEYpbx053221;
Fri, 29 Mar 2019 14:34:51 GMT (envelope-from kp@FreeBSD.org)
Received: (from kp@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2TEYpQn053219;
Fri, 29 Mar 2019 14:34:51 GMT (envelope-from kp@FreeBSD.org)
Message-Id: <201903291434.x2TEYpQn053219@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org
using -f
From: Kristof Provost
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345691 - in stable/11/sys: net netpfil/pf
X-SVN-Group: stable-11
X-SVN-Commit-Author: kp
X-SVN-Commit-Paths: in stable/11/sys: net netpfil/pf
X-SVN-Commit-Revision: 345691
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 451BF963F5
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.957,0];
ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:05:56 -0000
X-Original-Date: Fri, 29 Mar 2019 14:34:51 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:05:56 -0000
Author: kp
Date: Fri Mar 29 14:34:50 2019
New Revision: 345691
URL: https://svnweb.freebsd.org/changeset/base/345691
Log:
MFC r345177:
pf :Use counter(9) in pf tables.
The counters of pf tables are updated outside the rule lock. That means state
updates might overwrite each other. Furthermore allocation and
freeing of counters happens outside the lock as well.
Use counter(9) for the counters, and always allocate the counter table
element, so that the race condition cannot happen any more.
PR: 230619
Submitted by: Kajetan Staszkiewicz
Modified:
stable/11/sys/net/pfvar.h
stable/11/sys/netpfil/pf/pf_table.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/net/pfvar.h
==============================================================================
--- stable/11/sys/net/pfvar.h Fri Mar 29 14:19:31 2019 (r345690)
+++ stable/11/sys/net/pfvar.h Fri Mar 29 14:34:50 2019 (r345691)
@@ -1013,6 +1013,17 @@ struct pfr_tstats {
int pfrts_cnt;
int pfrts_refcnt[PFR_REFCNT_MAX];
};
+
+struct pfr_ktstats {
+ struct pfr_table pfrts_t;
+ counter_u64_t pfrkts_packets[PFR_DIR_MAX][PFR_OP_TABLE_MAX];
+ counter_u64_t pfrkts_bytes[PFR_DIR_MAX][PFR_OP_TABLE_MAX];
+ counter_u64_t pfrkts_match;
+ counter_u64_t pfrkts_nomatch;
+ long pfrkts_tzero;
+ int pfrkts_cnt;
+ int pfrkts_refcnt[PFR_REFCNT_MAX];
+};
#define pfrts_name pfrts_t.pfrt_name
#define pfrts_flags pfrts_t.pfrt_flags
@@ -1026,8 +1037,9 @@ union sockaddr_union {
#endif /* _SOCKADDR_UNION_DEFINED */
struct pfr_kcounters {
- u_int64_t pfrkc_packets[PFR_DIR_MAX][PFR_OP_ADDR_MAX];
- u_int64_t pfrkc_bytes[PFR_DIR_MAX][PFR_OP_ADDR_MAX];
+ counter_u64_t pfrkc_packets[PFR_DIR_MAX][PFR_OP_ADDR_MAX];
+ counter_u64_t pfrkc_bytes[PFR_DIR_MAX][PFR_OP_ADDR_MAX];
+ long pfrkc_tzero;
};
SLIST_HEAD(pfr_kentryworkq, pfr_kentry);
@@ -1035,8 +1047,7 @@ struct pfr_kentry {
struct radix_node pfrke_node[2];
union sockaddr_union pfrke_sa;
SLIST_ENTRY(pfr_kentry) pfrke_workq;
- struct pfr_kcounters *pfrke_counters;
- long pfrke_tzero;
+ struct pfr_kcounters pfrke_counters;
u_int8_t pfrke_af;
u_int8_t pfrke_net;
u_int8_t pfrke_not;
@@ -1046,7 +1057,7 @@ struct pfr_kentry {
SLIST_HEAD(pfr_ktableworkq, pfr_ktable);
RB_HEAD(pfr_ktablehead, pfr_ktable);
struct pfr_ktable {
- struct pfr_tstats pfrkt_ts;
+ struct pfr_ktstats pfrkt_kts;
RB_ENTRY(pfr_ktable) pfrkt_tree;
SLIST_ENTRY(pfr_ktable) pfrkt_workq;
struct radix_node_head *pfrkt_ip4;
@@ -1057,18 +1068,18 @@ struct pfr_ktable {
long pfrkt_larg;
int pfrkt_nflags;
};
-#define pfrkt_t pfrkt_ts.pfrts_t
+#define pfrkt_t pfrkt_kts.pfrts_t
#define pfrkt_name pfrkt_t.pfrt_name
#define pfrkt_anchor pfrkt_t.pfrt_anchor
#define pfrkt_ruleset pfrkt_t.pfrt_ruleset
#define pfrkt_flags pfrkt_t.pfrt_flags
-#define pfrkt_cnt pfrkt_ts.pfrts_cnt
-#define pfrkt_refcnt pfrkt_ts.pfrts_refcnt
-#define pfrkt_packets pfrkt_ts.pfrts_packets
-#define pfrkt_bytes pfrkt_ts.pfrts_bytes
-#define pfrkt_match pfrkt_ts.pfrts_match
-#define pfrkt_nomatch pfrkt_ts.pfrts_nomatch
-#define pfrkt_tzero pfrkt_ts.pfrts_tzero
+#define pfrkt_cnt pfrkt_kts.pfrkts_cnt
+#define pfrkt_refcnt pfrkt_kts.pfrkts_refcnt
+#define pfrkt_packets pfrkt_kts.pfrkts_packets
+#define pfrkt_bytes pfrkt_kts.pfrkts_bytes
+#define pfrkt_match pfrkt_kts.pfrkts_match
+#define pfrkt_nomatch pfrkt_kts.pfrkts_nomatch
+#define pfrkt_tzero pfrkt_kts.pfrkts_tzero
/* keep synced with pfi_kif, used in RB_FIND */
struct pfi_kif_cmp {
Modified: stable/11/sys/netpfil/pf/pf_table.c
==============================================================================
--- stable/11/sys/netpfil/pf/pf_table.c Fri Mar 29 14:19:31 2019 (r345690)
+++ stable/11/sys/netpfil/pf/pf_table.c Fri Mar 29 14:34:50 2019 (r345691)
@@ -111,6 +111,7 @@ struct pfr_walktree {
struct pfi_dynaddr *pfrw1_dyn;
} pfrw_1;
int pfrw_free;
+ int pfrw_flags;
};
#define pfrw_addr pfrw_1.pfrw1_addr
#define pfrw_astats pfrw_1.pfrw1_astats
@@ -124,15 +125,16 @@ struct pfr_walktree {
static MALLOC_DEFINE(M_PFTABLE, "pf_table", "pf(4) tables structures");
static VNET_DEFINE(uma_zone_t, pfr_kentry_z);
#define V_pfr_kentry_z VNET(pfr_kentry_z)
-static VNET_DEFINE(uma_zone_t, pfr_kcounters_z);
-#define V_pfr_kcounters_z VNET(pfr_kcounters_z)
static struct pf_addr pfr_ffaddr = {
.addr32 = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff }
};
+static void pfr_copyout_astats(struct pfr_astats *,
+ const struct pfr_kentry *,
+ const struct pfr_walktree *);
static void pfr_copyout_addr(struct pfr_addr *,
- struct pfr_kentry *ke);
+ const struct pfr_kentry *ke);
static int pfr_validate_addr(struct pfr_addr *);
static void pfr_enqueue_addrs(struct pfr_ktable *,
struct pfr_kentryworkq *, int *, int);
@@ -140,8 +142,12 @@ static void pfr_mark_addrs(struct pfr_ktable *);
static struct pfr_kentry
*pfr_lookup_addr(struct pfr_ktable *,
struct pfr_addr *, int);
+static bool pfr_create_kentry_counter(struct pfr_kcounters *,
+ int, int);
static struct pfr_kentry *pfr_create_kentry(struct pfr_addr *);
static void pfr_destroy_kentries(struct pfr_kentryworkq *);
+static void pfr_destroy_kentry_counter(struct pfr_kcounters *,
+ int, int);
static void pfr_destroy_kentry(struct pfr_kentry *);
static void pfr_insert_kentries(struct pfr_ktable *,
struct pfr_kentryworkq *, long);
@@ -195,9 +201,6 @@ pfr_initialize(void)
V_pfr_kentry_z = uma_zcreate("pf table entries",
sizeof(struct pfr_kentry), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR,
0);
- V_pfr_kcounters_z = uma_zcreate("pf table counters",
- sizeof(struct pfr_kcounters), NULL, NULL, NULL, NULL,
- UMA_ALIGN_PTR, 0);
V_pf_limits[PF_LIMIT_TABLE_ENTRIES].zone = V_pfr_kentry_z;
V_pf_limits[PF_LIMIT_TABLE_ENTRIES].limit = PFR_KENTRY_HIWAT;
}
@@ -207,7 +210,6 @@ pfr_cleanup(void)
{
uma_zdestroy(V_pfr_kentry_z);
- uma_zdestroy(V_pfr_kcounters_z);
}
int
@@ -601,6 +603,13 @@ pfr_get_astats(struct pfr_table *tbl, struct pfr_astat
w.pfrw_op = PFRW_GET_ASTATS;
w.pfrw_astats = addr;
w.pfrw_free = kt->pfrkt_cnt;
+ /*
+ * Flags below are for backward compatibility. It was possible to have
+ * a table without per-entry counters. Now they are always allocated,
+ * we just discard data when reading it if table is not configured to
+ * have counters.
+ */
+ w.pfrw_flags = kt->pfrkt_flags;
rv = kt->pfrkt_ip4->rnh_walktree(&kt->pfrkt_ip4->rh, pfr_walktree, &w);
if (!rv)
rv = kt->pfrkt_ip6->rnh_walktree(&kt->pfrkt_ip6->rh,
@@ -767,10 +776,30 @@ pfr_lookup_addr(struct pfr_ktable *kt, struct pfr_addr
return (ke);
}
+static bool
+pfr_create_kentry_counter(struct pfr_kcounters *kc, int pfr_dir, int pfr_op)
+{
+ kc->pfrkc_packets[pfr_dir][pfr_op] = counter_u64_alloc(M_NOWAIT);
+ if (! kc->pfrkc_packets[pfr_dir][pfr_op])
+ return (false);
+
+ kc->pfrkc_bytes[pfr_dir][pfr_op] = counter_u64_alloc(M_NOWAIT);
+ if (! kc->pfrkc_bytes[pfr_dir][pfr_op]) {
+ /* Previous allocation will be freed through
+ * pfr_destroy_kentry() */
+ return (false);
+ }
+
+ kc->pfrkc_tzero = 0;
+
+ return (true);
+}
+
static struct pfr_kentry *
pfr_create_kentry(struct pfr_addr *ad)
{
struct pfr_kentry *ke;
+ int pfr_dir, pfr_op;
ke = uma_zalloc(V_pfr_kentry_z, M_NOWAIT | M_ZERO);
if (ke == NULL)
@@ -783,6 +812,14 @@ pfr_create_kentry(struct pfr_addr *ad)
ke->pfrke_af = ad->pfra_af;
ke->pfrke_net = ad->pfra_net;
ke->pfrke_not = ad->pfra_not;
+ for (pfr_dir = 0; pfr_dir < PFR_DIR_MAX; pfr_dir ++)
+ for (pfr_op = 0; pfr_op < PFR_OP_ADDR_MAX; pfr_op ++) {
+ if (! pfr_create_kentry_counter(&ke->pfrke_counters,
+ pfr_dir, pfr_op)) {
+ pfr_destroy_kentry(ke);
+ return (NULL);
+ }
+ }
return (ke);
}
@@ -798,10 +835,22 @@ pfr_destroy_kentries(struct pfr_kentryworkq *workq)
}
static void
+pfr_destroy_kentry_counter(struct pfr_kcounters *kc, int pfr_dir, int pfr_op)
+{
+ counter_u64_free(kc->pfrkc_packets[pfr_dir][pfr_op]);
+ counter_u64_free(kc->pfrkc_bytes[pfr_dir][pfr_op]);
+}
+
+static void
pfr_destroy_kentry(struct pfr_kentry *ke)
{
- if (ke->pfrke_counters)
- uma_zfree(V_pfr_kcounters_z, ke->pfrke_counters);
+ int pfr_dir, pfr_op;
+
+ for (pfr_dir = 0; pfr_dir < PFR_DIR_MAX; pfr_dir ++)
+ for (pfr_op = 0; pfr_op < PFR_OP_ADDR_MAX; pfr_op ++)
+ pfr_destroy_kentry_counter(&ke->pfrke_counters,
+ pfr_dir, pfr_op);
+
uma_zfree(V_pfr_kentry_z, ke);
}
@@ -819,7 +868,7 @@ pfr_insert_kentries(struct pfr_ktable *kt,
"(code=%d).\n", rv);
break;
}
- p->pfrke_tzero = tzero;
+ p->pfrke_counters.pfrkc_tzero = tzero;
n++;
}
kt->pfrkt_cnt += n;
@@ -842,7 +891,7 @@ pfr_insert_kentry(struct pfr_ktable *kt, struct pfr_ad
if (rv)
return (rv);
- p->pfrke_tzero = tzero;
+ p->pfrke_counters.pfrkc_tzero = tzero;
kt->pfrkt_cnt++;
return (0);
@@ -877,15 +926,20 @@ static void
pfr_clstats_kentries(struct pfr_kentryworkq *workq, long tzero, int negchange)
{
struct pfr_kentry *p;
+ int pfr_dir, pfr_op;
SLIST_FOREACH(p, workq, pfrke_workq) {
if (negchange)
p->pfrke_not = !p->pfrke_not;
- if (p->pfrke_counters) {
- uma_zfree(V_pfr_kcounters_z, p->pfrke_counters);
- p->pfrke_counters = NULL;
+ for (pfr_dir = 0; pfr_dir < PFR_DIR_MAX; pfr_dir ++) {
+ for (pfr_op = 0; pfr_op < PFR_OP_ADDR_MAX; pfr_op ++) {
+ counter_u64_zero(p->pfrke_counters.
+ pfrkc_packets[pfr_dir][pfr_op]);
+ counter_u64_zero(p->pfrke_counters.
+ pfrkc_bytes[pfr_dir][pfr_op]);
+ }
}
- p->pfrke_tzero = tzero;
+ p->pfrke_counters.pfrkc_tzero = tzero;
}
}
@@ -974,7 +1028,7 @@ pfr_unroute_kentry(struct pfr_ktable *kt, struct pfr_k
}
static void
-pfr_copyout_addr(struct pfr_addr *ad, struct pfr_kentry *ke)
+pfr_copyout_addr(struct pfr_addr *ad, const struct pfr_kentry *ke)
{
bzero(ad, sizeof(*ad));
if (ke == NULL)
@@ -988,6 +1042,33 @@ pfr_copyout_addr(struct pfr_addr *ad, struct pfr_kentr
ad->pfra_ip6addr = ke->pfrke_sa.sin6.sin6_addr;
}
+static void
+pfr_copyout_astats(struct pfr_astats *as, const struct pfr_kentry *ke,
+ const struct pfr_walktree *w)
+{
+ int dir, op;
+ const struct pfr_kcounters *kc = &ke->pfrke_counters;
+
+ pfr_copyout_addr(&as->pfras_a, ke);
+ as->pfras_tzero = kc->pfrkc_tzero;
+
+ if (! (w->pfrw_flags & PFR_TFLAG_COUNTERS)) {
+ bzero(as->pfras_packets, sizeof(as->pfras_packets));
+ bzero(as->pfras_bytes, sizeof(as->pfras_bytes));
+ as->pfras_a.pfra_fback = PFR_FB_NOCOUNT;
+ return;
+ }
+
+ for (dir = 0; dir < PFR_DIR_MAX; dir ++) {
+ for (op = 0; op < PFR_OP_ADDR_MAX; op ++) {
+ as->pfras_packets[dir][op] =
+ counter_u64_fetch(kc->pfrkc_packets[dir][op]);
+ as->pfras_bytes[dir][op] =
+ counter_u64_fetch(kc->pfrkc_bytes[dir][op]);
+ }
+ }
+}
+
static int
pfr_walktree(struct radix_node *rn, void *arg)
{
@@ -1016,20 +1097,8 @@ pfr_walktree(struct radix_node *rn, void *arg)
if (w->pfrw_free-- > 0) {
struct pfr_astats as;
- pfr_copyout_addr(&as.pfras_a, ke);
+ pfr_copyout_astats(&as, ke, w);
- if (ke->pfrke_counters) {
- bcopy(ke->pfrke_counters->pfrkc_packets,
- as.pfras_packets, sizeof(as.pfras_packets));
- bcopy(ke->pfrke_counters->pfrkc_bytes,
- as.pfras_bytes, sizeof(as.pfras_bytes));
- } else {
- bzero(as.pfras_packets, sizeof(as.pfras_packets));
- bzero(as.pfras_bytes, sizeof(as.pfras_bytes));
- as.pfras_a.pfra_fback = PFR_FB_NOCOUNT;
- }
- as.pfras_tzero = ke->pfrke_tzero;
-
bcopy(&as, w->pfrw_astats, sizeof(as));
w->pfrw_astats++;
}
@@ -1253,6 +1322,7 @@ pfr_get_tstats(struct pfr_table *filter, struct pfr_ts
struct pfr_ktableworkq workq;
int n, nn;
long tzero = time_second;
+ int pfr_dir, pfr_op;
/* XXX PFR_FLAG_CLSTATS disabled */
ACCEPT_FLAGS(flags, PFR_FLAG_ALLRSETS);
@@ -1271,7 +1341,25 @@ pfr_get_tstats(struct pfr_table *filter, struct pfr_ts
continue;
if (n-- <= 0)
continue;
- bcopy(&p->pfrkt_ts, tbl++, sizeof(*tbl));
+ bcopy(&p->pfrkt_kts.pfrts_t, &tbl->pfrts_t,
+ sizeof(struct pfr_table));
+ for (pfr_dir = 0; pfr_dir < PFR_DIR_MAX; pfr_dir ++) {
+ for (pfr_op = 0; pfr_op < PFR_OP_TABLE_MAX; pfr_op ++) {
+ tbl->pfrts_packets[pfr_dir][pfr_op] =
+ counter_u64_fetch(
+ p->pfrkt_packets[pfr_dir][pfr_op]);
+ tbl->pfrts_bytes[pfr_dir][pfr_op] =
+ counter_u64_fetch(
+ p->pfrkt_bytes[pfr_dir][pfr_op]);
+ }
+ }
+ tbl->pfrts_match = counter_u64_fetch(p->pfrkt_match);
+ tbl->pfrts_nomatch = counter_u64_fetch(p->pfrkt_nomatch);
+ tbl->pfrts_tzero = p->pfrkt_tzero;
+ tbl->pfrts_cnt = p->pfrkt_cnt;
+ for (pfr_op = 0; pfr_op < PFR_REFCNT_MAX; pfr_op++)
+ tbl->pfrts_refcnt[pfr_op] = p->pfrkt_refcnt[pfr_op];
+ tbl++;
SLIST_INSERT_HEAD(&workq, p, pfrkt_workq);
}
if (flags & PFR_FLAG_CLSTATS)
@@ -1605,7 +1693,7 @@ pfr_commit_ktable(struct pfr_ktable *kt, long tzero)
q->pfrke_mark = 1;
SLIST_INSERT_HEAD(&garbageq, p, pfrke_workq);
} else {
- p->pfrke_tzero = tzero;
+ p->pfrke_counters.pfrkc_tzero = tzero;
SLIST_INSERT_HEAD(&addq, p, pfrke_workq);
}
}
@@ -1789,14 +1877,20 @@ static void
pfr_clstats_ktable(struct pfr_ktable *kt, long tzero, int recurse)
{
struct pfr_kentryworkq addrq;
+ int pfr_dir, pfr_op;
if (recurse) {
pfr_enqueue_addrs(kt, &addrq, NULL, 0);
pfr_clstats_kentries(&addrq, tzero, 0);
}
- bzero(kt->pfrkt_packets, sizeof(kt->pfrkt_packets));
- bzero(kt->pfrkt_bytes, sizeof(kt->pfrkt_bytes));
- kt->pfrkt_match = kt->pfrkt_nomatch = 0;
+ for (pfr_dir = 0; pfr_dir < PFR_DIR_MAX; pfr_dir ++) {
+ for (pfr_op = 0; pfr_op < PFR_OP_TABLE_MAX; pfr_op ++) {
+ counter_u64_zero(kt->pfrkt_packets[pfr_dir][pfr_op]);
+ counter_u64_zero(kt->pfrkt_bytes[pfr_dir][pfr_op]);
+ }
+ }
+ counter_u64_zero(kt->pfrkt_match);
+ counter_u64_zero(kt->pfrkt_nomatch);
kt->pfrkt_tzero = tzero;
}
@@ -1805,6 +1899,7 @@ pfr_create_ktable(struct pfr_table *tbl, long tzero, i
{
struct pfr_ktable *kt;
struct pf_ruleset *rs;
+ int pfr_dir, pfr_op;
PF_RULES_WASSERT();
@@ -1823,6 +1918,34 @@ pfr_create_ktable(struct pfr_table *tbl, long tzero, i
rs->tables++;
}
+ for (pfr_dir = 0; pfr_dir < PFR_DIR_MAX; pfr_dir ++) {
+ for (pfr_op = 0; pfr_op < PFR_OP_TABLE_MAX; pfr_op ++) {
+ kt->pfrkt_packets[pfr_dir][pfr_op] =
+ counter_u64_alloc(M_NOWAIT);
+ if (! kt->pfrkt_packets[pfr_dir][pfr_op]) {
+ pfr_destroy_ktable(kt, 0);
+ return (NULL);
+ }
+ kt->pfrkt_bytes[pfr_dir][pfr_op] =
+ counter_u64_alloc(M_NOWAIT);
+ if (! kt->pfrkt_bytes[pfr_dir][pfr_op]) {
+ pfr_destroy_ktable(kt, 0);
+ return (NULL);
+ }
+ }
+ }
+ kt->pfrkt_match = counter_u64_alloc(M_NOWAIT);
+ if (! kt->pfrkt_match) {
+ pfr_destroy_ktable(kt, 0);
+ return (NULL);
+ }
+
+ kt->pfrkt_nomatch = counter_u64_alloc(M_NOWAIT);
+ if (! kt->pfrkt_nomatch) {
+ pfr_destroy_ktable(kt, 0);
+ return (NULL);
+ }
+
if (!rn_inithead((void **)&kt->pfrkt_ip4,
offsetof(struct sockaddr_in, sin_addr) * 8) ||
!rn_inithead((void **)&kt->pfrkt_ip6,
@@ -1850,6 +1973,7 @@ static void
pfr_destroy_ktable(struct pfr_ktable *kt, int flushaddr)
{
struct pfr_kentryworkq addrq;
+ int pfr_dir, pfr_op;
if (flushaddr) {
pfr_enqueue_addrs(kt, &addrq, NULL, 0);
@@ -1866,6 +1990,15 @@ pfr_destroy_ktable(struct pfr_ktable *kt, int flushadd
kt->pfrkt_rs->tables--;
pf_remove_if_empty_ruleset(kt->pfrkt_rs);
}
+ for (pfr_dir = 0; pfr_dir < PFR_DIR_MAX; pfr_dir ++) {
+ for (pfr_op = 0; pfr_op < PFR_OP_TABLE_MAX; pfr_op ++) {
+ counter_u64_free(kt->pfrkt_packets[pfr_dir][pfr_op]);
+ counter_u64_free(kt->pfrkt_bytes[pfr_dir][pfr_op]);
+ }
+ }
+ counter_u64_free(kt->pfrkt_match);
+ counter_u64_free(kt->pfrkt_nomatch);
+
free(kt, M_PFTABLE);
}
@@ -1934,9 +2067,9 @@ pfr_match_addr(struct pfr_ktable *kt, struct pf_addr *
}
match = (ke && !ke->pfrke_not);
if (match)
- kt->pfrkt_match++;
+ counter_u64_add(kt->pfrkt_match, 1);
else
- kt->pfrkt_nomatch++;
+ counter_u64_add(kt->pfrkt_nomatch, 1);
return (match);
}
@@ -1991,17 +2124,14 @@ pfr_update_stats(struct pfr_ktable *kt, struct pf_addr
("pfr_update_stats: assertion failed.\n"));
op_pass = PFR_OP_XPASS;
}
- kt->pfrkt_packets[dir_out][op_pass]++;
- kt->pfrkt_bytes[dir_out][op_pass] += len;
+ counter_u64_add(kt->pfrkt_packets[dir_out][op_pass], 1);
+ counter_u64_add(kt->pfrkt_bytes[dir_out][op_pass], len);
if (ke != NULL && op_pass != PFR_OP_XPASS &&
(kt->pfrkt_flags & PFR_TFLAG_COUNTERS)) {
- if (ke->pfrke_counters == NULL)
- ke->pfrke_counters = uma_zalloc(V_pfr_kcounters_z,
- M_NOWAIT | M_ZERO);
- if (ke->pfrke_counters != NULL) {
- ke->pfrke_counters->pfrkc_packets[dir_out][op_pass]++;
- ke->pfrke_counters->pfrkc_bytes[dir_out][op_pass] += len;
- }
+ counter_u64_add(ke->pfrke_counters.
+ pfrkc_packets[dir_out][op_pass], 1);
+ counter_u64_add(ke->pfrke_counters.
+ pfrkc_bytes[dir_out][op_pass], len);
}
}
@@ -2091,7 +2221,7 @@ pfr_pool_get(struct pfr_ktable *kt, int *pidx, struct
_next_block:
ke = pfr_kentry_byidx(kt, idx, af);
if (ke == NULL) {
- kt->pfrkt_nomatch++;
+ counter_u64_add(kt->pfrkt_nomatch, 1);
return (1);
}
pfr_prepare_network(&umask, af, ke->pfrke_net);
@@ -2116,7 +2246,7 @@ _next_block:
/* this is a single IP address - no possible nested block */
PF_ACPY(counter, addr, af);
*pidx = idx;
- kt->pfrkt_match++;
+ counter_u64_add(kt->pfrkt_match, 1);
return (0);
}
for (;;) {
@@ -2136,7 +2266,7 @@ _next_block:
/* lookup return the same block - perfect */
PF_ACPY(counter, addr, af);
*pidx = idx;
- kt->pfrkt_match++;
+ counter_u64_add(kt->pfrkt_match, 1);
return (0);
}
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:06:04 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6F204DC2CF;
Tue, 3 Sep 2019 14:06:04 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 46N7yz55vCz4P8S;
Tue, 3 Sep 2019 14:06:03 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id EE5041A090; Tue, 3 Sep 2019 14:05:56 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 6629421B4;
Tue, 2 Apr 2019 13:58:35 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 360BB8DB4C;
Tue, 2 Apr 2019 13:58:35 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 1575821B3; Tue, 2 Apr 2019 13:58:35 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 9A85C21AB
for ;
Tue, 2 Apr 2019 13:58:32 +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 680C08DB44;
Tue, 2 Apr 2019 13:58:32 +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 4438326F15;
Tue, 2 Apr 2019 13:58:32 +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 x32DwWsD090181;
Tue, 2 Apr 2019 13:58:32 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x32DwVxC090179;
Tue, 2 Apr 2019 13:58:31 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201904021358.x32DwVxC090179@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
emaste@FreeBSD.org using -f
From: Ed Maste
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345802 - stable/11/usr.sbin/freebsd-update
X-SVN-Group: stable-11
X-SVN-Commit-Author: emaste
X-SVN-Commit-Paths: stable/11/usr.sbin/freebsd-update
X-SVN-Commit-Revision: 345802
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 360BB8DB4C
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.95 / 15.00];
local_wl_from(0.00)[freebsd.org];
NEURAL_HAM_MEDIUM(-1.00)[-0.998,0];
NEURAL_HAM_SHORT(-0.96)[-0.955,0];
ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:06:04 -0000
X-Original-Date: Tue, 2 Apr 2019 13:58:31 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:06:04 -0000
Author: emaste
Date: Tue Apr 2 13:58:31 2019
New Revision: 345802
URL: https://svnweb.freebsd.org/changeset/base/345802
Log:
MFC r344280: freebsd-update: Clarify help text
Improve help text to include example release numbers for reference
and clarify the -F option.
PR: 231185, 214619
Submitted by: Gerald Aryeetey
Reviewed by: delphij, rgrimes
Sponsored by: The FreeBSD Foundation
Modified:
stable/11/usr.sbin/freebsd-update/freebsd-update.8
stable/11/usr.sbin/freebsd-update/freebsd-update.sh
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.8
==============================================================================
--- stable/11/usr.sbin/freebsd-update/freebsd-update.8 Tue Apr 2 13:57:52 2019 (r345801)
+++ stable/11/usr.sbin/freebsd-update/freebsd-update.8 Tue Apr 2 13:58:31 2019 (r345802)
@@ -89,13 +89,13 @@ Read configuration options from
.It Fl F
Force
.Nm Cm fetch
-to proceed where it normally would not, such as an unfinished upgrade
+to proceed in the case of an unfinished upgrade.
.It Fl k Ar KEY
Trust an RSA key with SHA256 of
.Ar KEY .
(default: read value from configuration file.)
.It Fl r Ar newrelease
-Specify the new release to which
+Specify the new release (e.g. 11.2-RELEASE) to which
.Nm
should upgrade (upgrade command only).
.It Fl s Ar server
Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh
==============================================================================
--- stable/11/usr.sbin/freebsd-update/freebsd-update.sh Tue Apr 2 13:57:52 2019 (r345801)
+++ stable/11/usr.sbin/freebsd-update/freebsd-update.sh Tue Apr 2 13:58:31 2019 (r345802)
@@ -45,7 +45,8 @@ Options:
(default: /var/db/freebsd-update/)
-f conffile -- Read configuration options from conffile
(default: /etc/freebsd-update.conf)
- -F -- Force a fetch operation to proceed
+ -F -- Force a fetch operation to proceed in the
+ case of an unfinished upgrade
-k KEY -- Trust an RSA key with SHA256 hash of KEY
-r release -- Target for upgrade (e.g., 11.1-RELEASE)
-s server -- Server from which to fetch updates
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:06:06 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C484DC352;
Tue, 3 Sep 2019 14:06:06 +0000 (UTC)
(envelope-from yuripv@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 46N7z15vdwz4PBg;
Tue, 3 Sep 2019 14:06:05 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id D01421A112; Tue, 3 Sep 2019 14:05:57 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 10D50E0E1;
Wed, 3 Apr 2019 01:29:59 +0000 (UTC)
(envelope-from owner-src-committers@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 4649689C2A;
Wed, 3 Apr 2019 01:29:58 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 1C88CE0AA; Wed, 3 Apr 2019 01:29:58 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 84983E0A8
for ;
Wed, 3 Apr 2019 01:29:55 +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 568F089C21;
Wed, 3 Apr 2019 01:29:55 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
[IPv6:2610:1c1:1:6068::e6a:0])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 323156A6C;
Wed, 3 Apr 2019 01:29:55 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x331TsSh055645;
Wed, 3 Apr 2019 01:29:54 GMT (envelope-from mav@FreeBSD.org)
Received: (from mav@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x331TsF0055644;
Wed, 3 Apr 2019 01:29:54 GMT (envelope-from mav@FreeBSD.org)
Message-Id: <201904030129.x331TsF0055644@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org
using -f
From: Alexander Motin
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345820 - in stable/11/sys/dev: ahci ichsmb
X-SVN-Group: stable-11
X-SVN-Commit-Author: mav
X-SVN-Commit-Paths: in stable/11/sys/dev: ahci ichsmb
X-SVN-Commit-Revision: 345820
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 4649689C2A
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:96.47.64.0/20, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:06:06 -0000
X-Original-Date: Wed, 3 Apr 2019 01:29:54 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:06:06 -0000
Author: mav
Date: Wed Apr 3 01:29:54 2019
New Revision: 345820
URL: https://svnweb.freebsd.org/changeset/base/345820
Log:
MFC r345333: Add some Cannon Lake chipset IDs.
Modified:
stable/11/sys/dev/ahci/ahci_pci.c
stable/11/sys/dev/ichsmb/ichsmb_pci.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/ahci/ahci_pci.c
==============================================================================
--- stable/11/sys/dev/ahci/ahci_pci.c Wed Apr 3 01:29:30 2019 (r345819)
+++ stable/11/sys/dev/ahci/ahci_pci.c Wed Apr 3 01:29:54 2019 (r345820)
@@ -232,6 +232,8 @@ static const struct {
{0xa2828086, 0x00, "Intel Union Point", 0},
{0xa2868086, 0x00, "Intel Union Point (RAID)", 0},
{0xa28e8086, 0x00, "Intel Union Point (RAID)", 0},
+ {0xa3528086, 0x00, "Intel Cannon Lake", 0},
+ {0xa3538086, 0x00, "Intel Cannon Lake", 0},
{0x23238086, 0x00, "Intel DH89xxCC", 0},
{0x2360197b, 0x00, "JMicron JMB360", 0},
{0x2361197b, 0x00, "JMicron JMB361", AHCI_Q_NOFORCE | AHCI_Q_1CH},
Modified: stable/11/sys/dev/ichsmb/ichsmb_pci.c
==============================================================================
--- stable/11/sys/dev/ichsmb/ichsmb_pci.c Wed Apr 3 01:29:30 2019 (r345819)
+++ stable/11/sys/dev/ichsmb/ichsmb_pci.c Wed Apr 3 01:29:54 2019 (r345820)
@@ -104,6 +104,7 @@ __FBSDID("$FreeBSD$");
#define ID_LEWISBURG 0xa1a3
#define ID_LEWISBURG2 0xa223
#define ID_KABYLAKE 0xa2a3
+#define ID_CANNONLAKE 0xa323
static const struct ichsmb_device {
uint16_t id;
@@ -148,6 +149,7 @@ static const struct ichsmb_device {
{ ID_LEWISBURG, "Intel Lewisburg SMBus controller" },
{ ID_LEWISBURG2,"Intel Lewisburg SMBus controller" },
{ ID_KABYLAKE, "Intel Kaby Lake SMBus controller" },
+ { ID_CANNONLAKE,"Intel Cannon Lake SMBus controller" },
{ 0, NULL },
};
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:06:07 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6131ADC394;
Tue, 3 Sep 2019 14:06:07 +0000 (UTC)
(envelope-from yuripv@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 46N7z26W7Xz4PCV;
Tue, 3 Sep 2019 14:06:06 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id 0B08C1A13B; Tue, 3 Sep 2019 14:05:58 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id D33D7FA6D;
Wed, 3 Apr 2019 03:31:02 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 3DD148DCAC;
Wed, 3 Apr 2019 03:31:02 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 129FDFA01; Wed, 3 Apr 2019 03:31:02 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id E1D0FF9FF
for ;
Wed, 3 Apr 2019 03:30:58 +0000 (UTC)
(envelope-from rpokala@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
[IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 7F0FA8DC96;
Wed, 3 Apr 2019 03:30:58 +0000 (UTC)
(envelope-from rpokala@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
[IPv6:2610:1c1:1:6068::e6a:0])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 59FB9806F;
Wed, 3 Apr 2019 03:30:58 +0000 (UTC)
(envelope-from rpokala@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x333Uwq2020854;
Wed, 3 Apr 2019 03:30:58 GMT (envelope-from rpokala@FreeBSD.org)
Received: (from rpokala@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x333UwHC020852;
Wed, 3 Apr 2019 03:30:58 GMT (envelope-from rpokala@FreeBSD.org)
Message-Id: <201904030330.x333UwHC020852@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: rpokala set sender to
rpokala@FreeBSD.org using -f
From: Ravi Pokala
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345827 - in stable/11: lib/libc/gen sys/kern
X-SVN-Group: stable-11
X-SVN-Commit-Author: rpokala
X-SVN-Commit-Paths: in stable/11: lib/libc/gen sys/kern
X-SVN-Commit-Revision: 345827
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 3DD148DCAC
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];
ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:06:07 -0000
X-Original-Date: Wed, 3 Apr 2019 03:30:58 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:06:07 -0000
Author: rpokala
Date: Wed Apr 3 03:30:57 2019
New Revision: 345827
URL: https://svnweb.freebsd.org/changeset/base/345827
Log:
MFC r345457:
Add descriptions for sysctls in kern_mib.c and sysctl.3 which lack them.
r343532 noted the difference between "hw.realmem" and "hw.physmem", which I
was previously unaware of. I discovered that neither sysctl had a
description visible via `sysctl -d', so I found where they were defined and
added suitable descriptions. While in the file, I went ahead and added
descriptions for all the others which lacked them. I also updated sysctl.3
accordingly.
Modified:
stable/11/lib/libc/gen/sysctl.3
stable/11/sys/kern/kern_mib.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/lib/libc/gen/sysctl.3
==============================================================================
--- stable/11/lib/libc/gen/sysctl.3 Wed Apr 3 03:30:14 2019 (r345826)
+++ stable/11/lib/libc/gen/sysctl.3 Wed Apr 3 03:30:57 2019 (r345827)
@@ -28,7 +28,7 @@
.\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95
.\" $FreeBSD$
.\"
-.Dd October 22, 2017
+.Dd March 22, 2019
.Dt SYSCTL 3
.Os
.Sh NAME
@@ -284,6 +284,7 @@ privilege may change the value.
.It Dv HW_FLOATINGPT Ta integer Ta no
.It Dv HW_MACHINE_ARCH Ta string Ta no
.It Dv HW_REALMEM Ta integer Ta no
+.It Dv HW_AVAILPAGES Ta integer Ta no
.El
.Bl -tag -width 6n
.It Li HW_MACHINE
@@ -295,9 +296,10 @@ The number of cpus.
.It Li HW_BYTEORDER
The byteorder (4321 or 1234).
.It Li HW_PHYSMEM
-The bytes of physical memory.
+Amount of physical memory (in bytes), minus the amount used by the kernel,
+pre-loaded modules, and (on x86) the dcons buffer.
.It Li HW_USERMEM
-The bytes of non-kernel memory.
+Amount of memory (in bytes) which is not wired.
.It Li HW_PAGESIZE
The software page size.
.\".It Fa HW_DISKNAMES
@@ -307,7 +309,13 @@ Nonzero if the floating point support is in hardware.
.It Li HW_MACHINE_ARCH
The machine dependent architecture type.
.It Li HW_REALMEM
-The bytes of real memory.
+Amount of memory (in bytes) reported by the firmware.
+That value is sometimes not sane; in that case, the kernel reports the max
+memory address instead.
+.It Li HW_AVAILPAGES
+The same value as
+.Li HW_PHYSMEM ,
+measured in pages rather than bytes.
.El
.Ss CTL_KERN
The string and integer information available for the CTL_KERN level
Modified: stable/11/sys/kern/kern_mib.c
==============================================================================
--- stable/11/sys/kern/kern_mib.c Wed Apr 3 03:30:14 2019 (r345826)
+++ stable/11/sys/kern/kern_mib.c Wed Apr 3 03:30:57 2019 (r345827)
@@ -183,7 +183,8 @@ sysctl_hw_physmem(SYSCTL_HANDLER_ARGS)
return (sysctl_handle_long(oidp, &val, 0, req));
}
SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_ULONG | CTLFLAG_RD,
- 0, 0, sysctl_hw_physmem, "LU", "");
+ 0, 0, sysctl_hw_physmem, "LU",
+ "Amount of physical memory (in bytes)");
static int
sysctl_hw_realmem(SYSCTL_HANDLER_ARGS)
@@ -197,7 +198,8 @@ sysctl_hw_realmem(SYSCTL_HANDLER_ARGS)
return (sysctl_handle_long(oidp, &val, 0, req));
}
SYSCTL_PROC(_hw, HW_REALMEM, realmem, CTLTYPE_ULONG | CTLFLAG_RD,
- 0, 0, sysctl_hw_realmem, "LU", "");
+ 0, 0, sysctl_hw_realmem, "LU",
+ "Amount of memory (in bytes) reported by the firmware");
static int
sysctl_hw_usermem(SYSCTL_HANDLER_ARGS)
@@ -212,9 +214,11 @@ sysctl_hw_usermem(SYSCTL_HANDLER_ARGS)
return (sysctl_handle_long(oidp, &val, 0, req));
}
SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_ULONG | CTLFLAG_RD,
- 0, 0, sysctl_hw_usermem, "LU", "");
+ 0, 0, sysctl_hw_usermem, "LU",
+ "Amount of memory (in bytes) which is not wired");
-SYSCTL_LONG(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0, "");
+SYSCTL_LONG(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0,
+ "Amount of physical memory (in pages)");
u_long pagesizes[MAXPAGESIZES] = { PAGE_SIZE };
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:06:00 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 541E6DC187;
Tue, 3 Sep 2019 14:06:00 +0000 (UTC)
(envelope-from yuripv@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 46N7yv5h6Dz4P4t;
Tue, 3 Sep 2019 14:05:59 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id 944B819F40; Tue, 3 Sep 2019 14:05:53 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 5BF251902B;
Sun, 31 Mar 2019 11:31:10 +0000 (UTC)
(envelope-from owner-src-committers@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 53150756B0;
Sun, 31 Mar 2019 11:31:09 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 195FE19029; Sun, 31 Mar 2019 11:31:05 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id EF4D818F3E
for ;
Sun, 31 Mar 2019 11:31: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 A6BC3755D7;
Sun, 31 Mar 2019 11:31: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 8361726115;
Sun, 31 Mar 2019 11:31: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 x2VBV10f095488;
Sun, 31 Mar 2019 11:31:01 GMT (envelope-from avos@FreeBSD.org)
Received: (from avos@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2VBV1Fd095487;
Sun, 31 Mar 2019 11:31:01 GMT (envelope-from avos@FreeBSD.org)
Message-Id: <201903311131.x2VBV1Fd095487@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avos set sender to
avos@FreeBSD.org using -f
From: Andriy Voskoboinyk
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345752 - in stable: 11/sys/dev/usb/wlan
12/sys/dev/usb/wlan
X-SVN-Group: stable-11
X-SVN-Commit-Author: avos
X-SVN-Commit-Paths: in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan
X-SVN-Commit-Revision: 345752
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 53150756B0
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
local_wl_from(0.00)[freebsd.org];
NEURAL_HAM_MEDIUM(-1.00)[-0.997,0];
NEURAL_HAM_SHORT(-0.97)[-0.965,0];
ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:06:00 -0000
X-Original-Date: Sun, 31 Mar 2019 11:31:01 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:06:00 -0000
Author: avos
Date: Sun Mar 31 11:31:01 2019
New Revision: 345752
URL: https://svnweb.freebsd.org/changeset/base/345752
Log:
MFC r345493:
run(4): merge some common TSF-related code into run_disable_tsf()
No functional change intended.
Modified:
stable/11/sys/dev/usb/wlan/if_run.c
Directory Properties:
stable/11/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/12/sys/dev/usb/wlan/if_run.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/11/sys/dev/usb/wlan/if_run.c
==============================================================================
--- stable/11/sys/dev/usb/wlan/if_run.c Sun Mar 31 09:52:36 2019 (r345751)
+++ stable/11/sys/dev/usb/wlan/if_run.c Sun Mar 31 11:31:01 2019 (r345752)
@@ -431,6 +431,7 @@ static void run_usb_timeout_cb(void *);
static void run_reset_livelock(struct run_softc *);
static void run_enable_tsf_sync(struct run_softc *);
static void run_enable_tsf(struct run_softc *);
+static void run_disable_tsf(struct run_softc *);
static void run_get_tsf(struct run_softc *, uint64_t *);
static void run_enable_mrr(struct run_softc *);
static void run_set_txpreamble(struct run_softc *);
@@ -2042,7 +2043,6 @@ run_newstate(struct ieee80211vap *vap, enum ieee80211_
struct run_vap *rvp = RUN_VAP(vap);
enum ieee80211_state ostate;
uint32_t sta[3];
- uint32_t tmp;
uint8_t ratectl;
uint8_t restart_ratectl = 0;
uint8_t bid = 1 << rvp->rvp_id;
@@ -2075,12 +2075,8 @@ run_newstate(struct ieee80211vap *vap, enum ieee80211_
sc->runbmap &= ~bid;
/* abort TSF synchronization if there is no vap running */
- if (--sc->running == 0) {
- run_read(sc, RT2860_BCN_TIME_CFG, &tmp);
- run_write(sc, RT2860_BCN_TIME_CFG,
- tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
- RT2860_TBTT_TIMER_EN));
- }
+ if (--sc->running == 0)
+ run_disable_tsf(sc);
break;
case IEEE80211_S_RUN:
@@ -4816,15 +4812,11 @@ static void
run_scan_start(struct ieee80211com *ic)
{
struct run_softc *sc = ic->ic_softc;
- uint32_t tmp;
RUN_LOCK(sc);
/* abort TSF synchronization */
- run_read(sc, RT2860_BCN_TIME_CFG, &tmp);
- run_write(sc, RT2860_BCN_TIME_CFG,
- tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
- RT2860_TBTT_TIMER_EN));
+ run_disable_tsf(sc);
run_set_bssid(sc, ieee80211broadcastaddr);
RUN_UNLOCK(sc);
@@ -5107,6 +5099,18 @@ run_enable_tsf(struct run_softc *sc)
}
static void
+run_disable_tsf(struct run_softc *sc)
+{
+ uint32_t tmp;
+
+ if (run_read(sc, RT2860_BCN_TIME_CFG, &tmp) == 0) {
+ tmp &= ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
+ RT2860_TBTT_TIMER_EN);
+ run_write(sc, RT2860_BCN_TIME_CFG, tmp);
+ }
+}
+
+static void
run_get_tsf(struct run_softc *sc, uint64_t *buf)
{
run_read_region_1(sc, RT2860_TSF_TIMER_DW0, (uint8_t *)buf,
@@ -6057,10 +6061,7 @@ run_init_locked(struct run_softc *sc)
}
/* abort TSF synchronization */
- run_read(sc, RT2860_BCN_TIME_CFG, &tmp);
- tmp &= ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
- RT2860_TBTT_TIMER_EN);
- run_write(sc, RT2860_BCN_TIME_CFG, tmp);
+ run_disable_tsf(sc);
/* clear RX WCID search table */
run_set_region_4(sc, RT2860_WCID_ENTRY(0), 0, 512);
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:06:04 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B366DC2CB;
Tue, 3 Sep 2019 14:06:04 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 46N7yz4nYWz4P8M;
Tue, 3 Sep 2019 14:06:03 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id A7C6E1A070; Tue, 3 Sep 2019 14:05:56 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 0300F1E9A1;
Tue, 2 Apr 2019 09:33:34 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4442384007;
Tue, 2 Apr 2019 09:33:34 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 1AA141E93A; Tue, 2 Apr 2019 09:33:34 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 83FBB1E936
for ;
Tue, 2 Apr 2019 09:33:31 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
[IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4EA5383FFD;
Tue, 2 Apr 2019 09:33:31 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
[IPv6:2610:1c1:1:6068::e6a:0])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 26FD5241E7;
Tue, 2 Apr 2019 09:33:31 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x329XVKf054339;
Tue, 2 Apr 2019 09:33:31 GMT (envelope-from ae@FreeBSD.org)
Received: (from ae@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x329XVxV054337;
Tue, 2 Apr 2019 09:33:31 GMT (envelope-from ae@FreeBSD.org)
Message-Id: <201904020933.x329XVxV054337@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org
using -f
From: "Andrey V. Elsukov"
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345795 - stable/11/sys/net
X-SVN-Group: stable-11
X-SVN-Commit-Author: ae
X-SVN-Commit-Paths: stable/11/sys/net
X-SVN-Commit-Revision: 345795
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 4442384007
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.953,0];
ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:06:04 -0000
X-Original-Date: Tue, 2 Apr 2019 09:33:31 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:06:04 -0000
Author: ae
Date: Tue Apr 2 09:33:30 2019
New Revision: 345795
URL: https://svnweb.freebsd.org/changeset/base/345795
Log:
MFC r345292:
Convert allocation of bpf_if in bpfattach2 from M_NOWAIT to M_WAITOK
and remove possible panic condition.
It is already allowed to sleep in bpfattach[2], since BPF_LOCK was
converted to SX lock in r332388. Also move KASSERT() to the top of
function and make full initialization before bpf_if will be linked
to BPF's list of interfaces.
Modified:
stable/11/sys/net/bpf.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/net/bpf.c
==============================================================================
--- stable/11/sys/net/bpf.c Tue Apr 2 09:31:38 2019 (r345794)
+++ stable/11/sys/net/bpf.c Tue Apr 2 09:33:30 2019 (r345795)
@@ -2561,24 +2561,22 @@ bpfattach2(struct ifnet *ifp, u_int dlt, u_int hdrlen,
{
struct bpf_if *bp;
- bp = malloc(sizeof(*bp), M_BPF, M_NOWAIT | M_ZERO);
- if (bp == NULL)
- panic("bpfattach");
+ KASSERT(*driverp == NULL, ("bpfattach2: driverp already initialized"));
+ bp = malloc(sizeof(*bp), M_BPF, M_WAITOK | M_ZERO);
+
+ rw_init(&bp->bif_lock, "bpf interface lock");
LIST_INIT(&bp->bif_dlist);
LIST_INIT(&bp->bif_wlist);
bp->bif_ifp = ifp;
bp->bif_dlt = dlt;
- rw_init(&bp->bif_lock, "bpf interface lock");
- KASSERT(*driverp == NULL, ("bpfattach2: driverp already initialized"));
+ bp->bif_hdrlen = hdrlen;
bp->bif_bpf = driverp;
*driverp = bp;
BPF_LOCK();
LIST_INSERT_HEAD(&bpf_iflist, bp, bif_next);
BPF_UNLOCK();
-
- bp->bif_hdrlen = hdrlen;
if (bootverbose && IS_DEFAULT_VNET(curvnet))
if_printf(ifp, "bpf attached\n");
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:06:01 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0AA27DC1C7;
Tue, 3 Sep 2019 14:06:01 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 46N7yw1wnvz4P5L;
Tue, 3 Sep 2019 14:06:00 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id 0F9DB19F6F; Tue, 3 Sep 2019 14:05:54 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 1CF6879CD;
Mon, 1 Apr 2019 07:54:42 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id BFF768A816;
Mon, 1 Apr 2019 07:54:41 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 0B44279C2; Mon, 1 Apr 2019 07:54:31 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 53D4077F2
for ;
Mon, 1 Apr 2019 07:54:28 +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 2276E8A64F;
Mon, 1 Apr 2019 07:54: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 ECA87B658;
Mon, 1 Apr 2019 07:54:27 +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 x317sRhe041380;
Mon, 1 Apr 2019 07:54:27 GMT (envelope-from avos@FreeBSD.org)
Received: (from avos@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x317sRA9041379;
Mon, 1 Apr 2019 07:54:27 GMT (envelope-from avos@FreeBSD.org)
Message-Id: <201904010754.x317sRA9041379@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avos set sender to
avos@FreeBSD.org using -f
From: Andriy Voskoboinyk
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345761 - in stable: 10/sys/net80211 11/sys/net80211
12/sys/net80211
X-SVN-Group: stable-11
X-SVN-Commit-Author: avos
X-SVN-Commit-Paths: in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211
X-SVN-Commit-Revision: 345761
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: BFF768A816
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.965,0];
ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:06:01 -0000
X-Original-Date: Mon, 1 Apr 2019 07:54:27 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:06:01 -0000
Author: avos
Date: Mon Apr 1 07:54:27 2019
New Revision: 345761
URL: https://svnweb.freebsd.org/changeset/base/345761
Log:
MFC r345252:
net80211: correct check for SMPS node flags updates
Update node flags when driver supports SMPS, not when it is disabled or
in dynamic mode ((iv_htcaps & HTCAP_SMPS) != 0).
Was checked with RTL8188EE (1T1R), STA mode - 'smps' word should disappear
from 'ifconfig wlan0' output.
Modified:
stable/11/sys/net80211/ieee80211_ht.c
Directory Properties:
stable/11/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/10/sys/net80211/ieee80211_ht.c
stable/12/sys/net80211/ieee80211_ht.c
Directory Properties:
stable/10/ (props changed)
stable/12/ (props changed)
Modified: stable/11/sys/net80211/ieee80211_ht.c
==============================================================================
--- stable/11/sys/net80211/ieee80211_ht.c Mon Apr 1 07:46:41 2019 (r345760)
+++ stable/11/sys/net80211/ieee80211_ht.c Mon Apr 1 07:54:27 2019 (r345761)
@@ -1567,7 +1567,7 @@ ieee80211_ht_updateparams(struct ieee80211_node *ni,
int ret = 0;
ieee80211_parse_htcap(ni, htcapie);
- if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS)
+ if (vap->iv_htcaps & IEEE80211_HTC_SMPS)
htcap_update_mimo_ps(ni);
htcap_update_shortgi(ni);
@@ -1609,7 +1609,7 @@ ieee80211_ht_updatehtcap(struct ieee80211_node *ni, co
int htflags;
ieee80211_parse_htcap(ni, htcapie);
- if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS)
+ if (vap->iv_htcaps & IEEE80211_HTC_SMPS)
htcap_update_mimo_ps(ni);
htcap_update_shortgi(ni);
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:06:04 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 750FEDC2D5;
Tue, 3 Sep 2019 14:06:04 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 46N7yz55yLz4P8T;
Tue, 3 Sep 2019 14:06:03 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id 9C46D1A06C; Tue, 3 Sep 2019 14:05:56 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 58C4F1DF81;
Tue, 2 Apr 2019 08:43:23 +0000 (UTC)
(envelope-from owner-src-committers@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 25DF282606;
Tue, 2 Apr 2019 08:43:23 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 143871DF80; Tue, 2 Apr 2019 08:43:23 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id 48FC31DF7A
for ;
Tue, 2 Apr 2019 08:43:20 +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 172DC825FD;
Tue, 2 Apr 2019 08:43:20 +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 E3DC423983;
Tue, 2 Apr 2019 08:43:19 +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 x328hJRo027599;
Tue, 2 Apr 2019 08:43:19 GMT (envelope-from mw@FreeBSD.org)
Received: (from mw@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x328hJ66027598;
Tue, 2 Apr 2019 08:43:19 GMT (envelope-from mw@FreeBSD.org)
Message-Id: <201904020843.x328hJ66027598@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org
using -f
From: Marcin Wojtas
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345793 - stable/11/sys/kern
X-SVN-Group: stable-11
X-SVN-Commit-Author: mw
X-SVN-Commit-Paths: stable/11/sys/kern
X-SVN-Commit-Revision: 345793
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 25DF282606
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.937,0];
ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US];
NEURAL_HAM_LONG(-1.00)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:06:05 -0000
X-Original-Date: Tue, 2 Apr 2019 08:43:19 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:06:05 -0000
Author: mw
Date: Tue Apr 2 08:43:19 2019
New Revision: 345793
URL: https://svnweb.freebsd.org/changeset/base/345793
Log:
MFC r344676: Prevent detaching driver if the attach is not finished
Submitted by: Rafal Kozik
Obtained from: Semihalf
Sponsored by: Amazon, Inc.
Modified:
stable/11/sys/kern/subr_bus.c
Modified: stable/11/sys/kern/subr_bus.c
==============================================================================
--- stable/11/sys/kern/subr_bus.c Tue Apr 2 08:35:24 2019 (r345792)
+++ stable/11/sys/kern/subr_bus.c Tue Apr 2 08:43:19 2019 (r345793)
@@ -2964,6 +2964,10 @@ device_detach(device_t dev)
PDEBUG(("%s", DEVICENAME(dev)));
if (dev->state == DS_BUSY)
return (EBUSY);
+ if (dev->state == DS_ATTACHING) {
+ device_printf(dev, "device in attaching state! Deferring detach.\n");
+ return (EBUSY);
+ }
if (dev->state != DS_ATTACHED)
return (0);
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:06:07 2019
Return-Path:
Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5ABB9DC391;
Tue, 3 Sep 2019 14:06:07 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 46N7z26brLz4PCb;
Tue, 3 Sep 2019 14:06:06 +0000 (UTC)
(envelope-from yuripv@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1452)
id 524241A155; Tue, 3 Sep 2019 14:05:58 +0000 (UTC)
X-Original-To: yuripv@localmail.freebsd.org
Delivered-To: yuripv@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id AFCDD136D9;
Wed, 3 Apr 2019 06:37:07 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
[IPv6:2610:1c1:1:6074::16:84])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "freefall.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4B50D952B6;
Wed, 3 Apr 2019 06:37:07 +0000 (UTC)
(envelope-from owner-src-committers@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 538)
id 18E1E136A2; Wed, 3 Apr 2019 06:37:07 +0000 (UTC)
Delivered-To: src-committers@localmail.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mx1.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by freefall.freebsd.org (Postfix) with ESMTPS id AFF4E136A0
for ;
Wed, 3 Apr 2019 06:37:04 +0000 (UTC)
(envelope-from rpokala@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
[IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
server-signature RSA-PSS (4096 bits)
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org",
Issuer "Let's Encrypt Authority X3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 63C12952A6;
Wed, 3 Apr 2019 06:37:04 +0000 (UTC)
(envelope-from rpokala@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
[IPv6:2610:1c1:1:6068::e6a:0])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 24F07A01D;
Wed, 3 Apr 2019 06:37:04 +0000 (UTC)
(envelope-from rpokala@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x336b4K9022445;
Wed, 3 Apr 2019 06:37:04 GMT (envelope-from rpokala@FreeBSD.org)
Received: (from rpokala@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x336b4eY022444;
Wed, 3 Apr 2019 06:37:04 GMT (envelope-from rpokala@FreeBSD.org)
Message-Id: <201904030637.x336b4eY022444@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: rpokala set sender to
rpokala@FreeBSD.org using -f
From: Ravi Pokala
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r345837 - stable/11/sys/dev/jedec_dimm
X-SVN-Group: stable-11
X-SVN-Commit-Author: rpokala
X-SVN-Commit-Paths: stable/11/sys/dev/jedec_dimm
X-SVN-Commit-Revision: 345837
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Loop: FreeBSD.org
Sender: owner-src-committers@freebsd.org
X-Rspamd-Queue-Id: 4B50D952B6
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)[-1.000,0]
Status: O
X-BeenThere: svn-src-stable-11@freebsd.org
X-Mailman-Version: 2.1.29
List-Id: SVN commit messages for only the 11-stable src tree
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Date: Tue, 03 Sep 2019 14:06:07 -0000
X-Original-Date: Wed, 3 Apr 2019 06:37:04 +0000 (UTC)
X-List-Received-Date: Tue, 03 Sep 2019 14:06:07 -0000
Author: rpokala
Date: Wed Apr 3 06:37:03 2019
New Revision: 345837
URL: https://svnweb.freebsd.org/changeset/base/345837
Log:
MFC r345611:
Teach jedec_dimm(4) to be more forgiving of non-fatal errors.
It looks like some DIMMs claim to have a TSOD, but actually don't. Some
claim they weren't able to change the SPD page, but they did. Neither of
those should be fatal errors.
Modified:
stable/11/sys/dev/jedec_dimm/jedec_dimm.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/jedec_dimm/jedec_dimm.c
==============================================================================
--- stable/11/sys/dev/jedec_dimm/jedec_dimm.c Wed Apr 3 06:36:41 2019 (r345836)
+++ stable/11/sys/dev/jedec_dimm/jedec_dimm.c Wed Apr 3 06:37:03 2019 (r345837)
@@ -271,12 +271,16 @@ jedec_dimm_attach(device_t dev)
}
/* The MSBit of the TSOD-presence byte reports whether or not the TSOD
- * is in fact present. If it is, read manufacturer and device info from
- * it to confirm that it's a valid TSOD device. It's an error if any of
- * those bytes are unreadable; it's not an error if the device is simply
- * not known to us (tsod_match == NULL).
- * While DDR3 and DDR4 don't explicitly require a TSOD, essentially all
- * DDR3 and DDR4 DIMMs include one.
+ * is in fact present. (While DDR3 and DDR4 don't explicitly require a
+ * TSOD, essentially all DDR3 and DDR4 DIMMs include one.) But, as
+ * discussed in [PR 235944], it turns out that some DIMMs claim to have
+ * a TSOD when they actually don't. (Or maybe the firmware blocks it?)
+ *
+ * If the SPD data says the TSOD is present, try to read manufacturer
+ * and device info from it to confirm that it's a valid TSOD device.
+ * If the data is unreadable, just continue as if the TSOD isn't there.
+ * If the data was read successfully, see if it is a known TSOD device;
+ * it's okay if it isn't (tsod_match == NULL).
*/
rc = smbus_readb(sc->smbus, sc->spd_addr, tsod_present_offset, &byte);
if (rc != 0) {
@@ -290,12 +294,14 @@ jedec_dimm_attach(device_t dev)
if (rc != 0) {
device_printf(dev,
"failed to read TSOD Manufacturer ID\n");
- goto out;
+ rc = 0;
+ goto no_tsod;
}
rc = jedec_dimm_readw_be(sc, TSOD_REG_DEV_REV, &devid);
if (rc != 0) {
device_printf(dev, "failed to read TSOD Device ID\n");
- goto out;
+ rc = 0;
+ goto no_tsod;
}
tsod_match = jedec_dimm_tsod_match(vendorid, devid);
@@ -310,6 +316,7 @@ jedec_dimm_attach(device_t dev)
}
}
} else {
+no_tsod:
tsod_match = NULL;
tsod_present = false;
}
@@ -622,9 +629,12 @@ jedec_dimm_dump(struct jedec_dimm_softc *sc, enum dram
rc = smbus_writeb(sc->smbus,
(JEDEC_DTI_PAGE | JEDEC_LSA_PAGE_SET1), 0, 0);
if (rc != 0) {
+ /* Some SPD devices (or SMBus controllers?) claim the
+ * page-change command failed when it actually
+ * succeeded. Log a message but soldier on.
+ */
device_printf(sc->dev, "unable to change page: %d\n",
rc);
- goto out;
}
/* Add 256 to the store location, because we're in the second
* page.
From owner-svn-src-stable-11@freebsd.org Tue Sep 3 14:06:09 2019
Return-Path: