From owner-dev-commits-src-branches@freebsd.org Mon Apr 12 01:30:33 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 704725E5253; Mon, 12 Apr 2021 01:30:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FJWQK1VVTz4r7Y; Mon, 12 Apr 2021 01:30:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1650B679F; Mon, 12 Apr 2021 01:30:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13C1UWiH067852; Mon, 12 Apr 2021 01:30:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13C1UWF6067851; Mon, 12 Apr 2021 01:30:32 GMT (envelope-from git) Date: Mon, 12 Apr 2021 01:30:32 GMT Message-Id: <202104120130.13C1UWF6067851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 968a4d11b881 - stable/13 - nfsv4.1/4.2 client: fix handling of delegations for "oneopenown" mnt option MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 968a4d11b881bba34f1a090f7e46f7e844f6ad3f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2021 01:30:33 -0000 The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=968a4d11b881bba34f1a090f7e46f7e844f6ad3f commit 968a4d11b881bba34f1a090f7e46f7e844f6ad3f Author: Rick Macklem AuthorDate: 2021-03-29 19:09:19 +0000 Commit: Rick Macklem CommitDate: 2021-04-12 01:27:15 +0000 nfsv4.1/4.2 client: fix handling of delegations for "oneopenown" mnt option If a delegation for a file has been acquired, the "oneopenown" option was ignored when the local open was issued. This could result in multiple openowners/opens for a file, that would be transferred to the server when the delegation was recalled. This would not be serious, but could result in more than one openowner. Since the Amazon/EFS does not issue delegations, this probably never occurs in practice. Spotted during code inspection. This small patch fixes the code so that it checks for "oneopenown" when doing client local opens on a delegation. (cherry picked from commit e61b29ab5d2d9afd41d9fa06bb1f4cad4e9d0650) --- sys/fs/nfsclient/nfs_clstate.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 4e3abf82c96a..1e4625191bfe 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -267,17 +267,15 @@ nfscl_open(vnode_t vp, u_int8_t *nfhp, int fhlen, u_int32_t amode, int usedeleg, } } - if (dp != NULL) { + /* For NFSv4.1/4.2 and this option, use a single open_owner. */ + if (NFSHASONEOPENOWN(VFSTONFS(vp->v_mount))) + nfscl_filllockowner(NULL, own, F_POSIX); + else nfscl_filllockowner(p->td_proc, own, F_POSIX); + if (dp != NULL) ohp = &dp->nfsdl_owner; - } else { - /* For NFSv4.1 and this option, use a single open_owner. */ - if (NFSHASONEOPENOWN(VFSTONFS(vp->v_mount))) - nfscl_filllockowner(NULL, own, F_POSIX); - else - nfscl_filllockowner(p->td_proc, own, F_POSIX); + else ohp = &clp->nfsc_owner; - } /* Now, search for an openowner */ LIST_FOREACH(owp, ohp, nfsow_list) { if (!NFSBCMP(owp->nfsow_owner, own, NFSV4CL_LOCKNAMELEN)) From owner-dev-commits-src-branches@freebsd.org Mon Apr 12 01:34:39 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 C56885E5554; Mon, 12 Apr 2021 01:34:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FJWW35889z4rVW; Mon, 12 Apr 2021 01:34:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A378265C0; Mon, 12 Apr 2021 01:34:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13C1YdHc072203; Mon, 12 Apr 2021 01:34:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13C1Yd6W072202; Mon, 12 Apr 2021 01:34:39 GMT (envelope-from git) Date: Mon, 12 Apr 2021 01:34:39 GMT Message-Id: <202104120134.13C1Yd6W072202@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 659d71186597 - stable/13 - nfsv4 client: replace while loops with LIST_FOREACH() loops MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 659d71186597adaf146033f269b3ab101a6bbfd5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2021 01:34:39 -0000 The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=659d71186597adaf146033f269b3ab101a6bbfd5 commit 659d71186597adaf146033f269b3ab101a6bbfd5 Author: Rick Macklem AuthorDate: 2021-03-29 21:14:51 +0000 Commit: Rick Macklem CommitDate: 2021-04-12 01:30:00 +0000 nfsv4 client: replace while loops with LIST_FOREACH() loops This patch replaces a couple of while() loops with LIST_FOREACH() loops. While here, declare a couple of variables "bool". I think LIST_FOREACH() is preferred and makes the code more readable. This also prepares the code for future changes to use a hash table of lists for open searches via file handle. This patch should not result in a semantics change. (cherry picked from commit fdc9b2d50fe905b54afd773a2fc7fb9947508ddf) --- sys/fs/nfsclient/nfs_clstate.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 1e4625191bfe..6cb737606525 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -507,7 +507,8 @@ nfscl_getstateid(vnode_t vp, u_int8_t *nfhp, int fhlen, u_int32_t mode, struct nfsnode *np; struct nfsmount *nmp; u_int8_t own[NFSV4CL_LOCKNAMELEN]; - int error, done; + int error; + bool done; *lckpp = NULL; /* @@ -596,9 +597,8 @@ nfscl_getstateid(vnode_t vp, u_int8_t *nfhp, int fhlen, u_int32_t mode, if (op == NULL) { /* If not found, just look for any OpenOwner that will work. */ top = NULL; - done = 0; - owp = LIST_FIRST(&clp->nfsc_owner); - while (!done && owp != NULL) { + done = false; + LIST_FOREACH(owp, &clp->nfsc_owner, nfsow_list) { LIST_FOREACH(op, &owp->nfsow_open, nfso_list) { if (op->nfso_fhlen == fhlen && !NFSBCMP(op->nfso_fh, nfhp, fhlen)) { @@ -607,13 +607,13 @@ nfscl_getstateid(vnode_t vp, u_int8_t *nfhp, int fhlen, u_int32_t mode, (mode & NFSV4OPEN_ACCESSREAD) != 0) top = op; if ((mode & op->nfso_mode) == mode) { - done = 1; + done = true; break; } } } - if (!done) - owp = LIST_NEXT(owp, nfsow_list); + if (done) + break; } if (!done) { NFSCL_DEBUG(2, "openmode top=%p\n", top); @@ -653,7 +653,7 @@ nfscl_getopen(struct nfsclownerhead *ohp, u_int8_t *nfhp, int fhlen, struct nfsclowner *owp; struct nfsclopen *op, *rop, *rop2; struct nfscllockowner *lp; - int keep_looping; + bool keep_looping; if (lpp != NULL) *lpp = NULL; @@ -669,13 +669,11 @@ nfscl_getopen(struct nfsclownerhead *ohp, u_int8_t *nfhp, int fhlen, */ rop = NULL; rop2 = NULL; - keep_looping = 1; + keep_looping = true; /* Search the client list */ - owp = LIST_FIRST(ohp); - while (owp != NULL && keep_looping != 0) { + LIST_FOREACH(owp, ohp, nfsow_list) { /* and look for the correct open */ - op = LIST_FIRST(&owp->nfsow_open); - while (op != NULL && keep_looping != 0) { + LIST_FOREACH(op, &owp->nfsow_open, nfso_list) { if (op->nfso_fhlen == fhlen && !NFSBCMP(op->nfso_fh, nfhp, fhlen) && (op->nfso_mode & mode) == mode) { @@ -688,7 +686,7 @@ nfscl_getopen(struct nfsclownerhead *ohp, u_int8_t *nfhp, int fhlen, NFSV4CL_LOCKNAMELEN)) { *lpp = lp; rop = op; - keep_looping = 0; + keep_looping = false; break; } } @@ -697,14 +695,16 @@ nfscl_getopen(struct nfsclownerhead *ohp, u_int8_t *nfhp, int fhlen, openown, NFSV4CL_LOCKNAMELEN)) { rop = op; if (lpp == NULL) - keep_looping = 0; + keep_looping = false; } if (rop2 == NULL) rop2 = op; } - op = LIST_NEXT(op, nfso_list); + if (!keep_looping) + break; } - owp = LIST_NEXT(owp, nfsow_list); + if (!keep_looping) + break; } if (rop == NULL) rop = rop2; From owner-dev-commits-src-branches@freebsd.org Mon Apr 12 12:22:58 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 6E2235CECF2; Mon, 12 Apr 2021 12:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FJnv62hMvz3w51; Mon, 12 Apr 2021 12:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4F32F17442; Mon, 12 Apr 2021 12:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13CCMwvV035847; Mon, 12 Apr 2021 12:22:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13CCMw6X035846; Mon, 12 Apr 2021 12:22:58 GMT (envelope-from git) Date: Mon, 12 Apr 2021 12:22:58 GMT Message-Id: <202104121222.13CCMw6X035846@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 507c46474841 - stable/13 - qat: Make prototypes consistent with the implementation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 507c46474841c5549b910157b08436d1c2c7b657 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2021 12:22:58 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=507c46474841c5549b910157b08436d1c2c7b657 commit 507c46474841c5549b910157b08436d1c2c7b657 Author: Mark Johnston AuthorDate: 2021-04-05 20:23:22 +0000 Commit: Mark Johnston CommitDate: 2021-04-12 12:22:42 +0000 qat: Make prototypes consistent with the implementation Sponsored by: The FreeBSD Foundation (cherry picked from commit 843d16436d3388c1b46d37fca4e86885612d0e64) --- sys/dev/qat/qat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/qat/qat.c b/sys/dev/qat/qat.c index acfe0c6a1e07..49cb408fd702 100644 --- a/sys/dev/qat/qat.c +++ b/sys/dev/qat/qat.c @@ -276,8 +276,8 @@ static const struct qat_sym_hash_def qat_sym_hash_defs[] = { static const struct qat_product *qat_lookup(device_t); static int qat_probe(device_t); static int qat_attach(device_t); -static int qat_init(struct device *); -static int qat_start(struct device *); +static int qat_init(device_t); +static int qat_start(device_t); static int qat_detach(device_t); static int qat_newsession(device_t dev, crypto_session_t cses, From owner-dev-commits-src-branches@freebsd.org Mon Apr 12 12:22:59 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 8769D5CEE34; Mon, 12 Apr 2021 12:22:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FJnv73QQRz3vvV; Mon, 12 Apr 2021 12:22:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 686D317618; Mon, 12 Apr 2021 12:22:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13CCMxLm035868; Mon, 12 Apr 2021 12:22:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13CCMxLK035867; Mon, 12 Apr 2021 12:22:59 GMT (envelope-from git) Date: Mon, 12 Apr 2021 12:22:59 GMT Message-Id: <202104121222.13CCMxLK035867@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: e712521e3511 - stable/13 - libc: Fix the WITH_HESIOD build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e712521e35118b35417c93d39b6ed1c1aca77db4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2021 12:22:59 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e712521e35118b35417c93d39b6ed1c1aca77db4 commit e712521e35118b35417c93d39b6ed1c1aca77db4 Author: Mark Johnston AuthorDate: 2021-04-05 20:23:18 +0000 Commit: Mark Johnston CommitDate: 2021-04-12 12:22:53 +0000 libc: Fix the WITH_HESIOD build Reported by: Daniel Braniss (cherry picked from commit 3b666932d409ad79c527c026abacd4d327df5b46) --- lib/libc/gen/getgrent.c | 2 +- lib/libc/gen/getpwent.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c index afb89cab308b..5832cb8c6799 100644 --- a/lib/libc/gen/getgrent.c +++ b/lib/libc/gen/getgrent.c @@ -971,7 +971,7 @@ dns_group(void *retval, void *mdata, va_list ap) hes = NULL; name = NULL; gid = (gid_t)-1; - how = (enum nss_lookup_type)mdata; + how = (enum nss_lookup_type)(uintptr_t)mdata; switch (how) { case nss_lt_name: name = va_arg(ap, const char *); diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index a07ee109e2df..bc1d341fd3ad 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -1108,7 +1108,7 @@ dns_passwd(void *retval, void *mdata, va_list ap) hes = NULL; name = NULL; uid = (uid_t)-1; - how = (enum nss_lookup_type)mdata; + how = (enum nss_lookup_type)(uintptr_t)mdata; switch (how) { case nss_lt_name: name = va_arg(ap, const char *); From owner-dev-commits-src-branches@freebsd.org Mon Apr 12 14:00:38 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 117855D224E; Mon, 12 Apr 2021 14:00:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FJr3n72W2z4WBy; Mon, 12 Apr 2021 14:00:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E4C45183D9; Mon, 12 Apr 2021 14:00:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13CE0beL064143; Mon, 12 Apr 2021 14:00:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13CE0bZr064142; Mon, 12 Apr 2021 14:00:37 GMT (envelope-from git) Date: Mon, 12 Apr 2021 14:00:37 GMT Message-Id: <202104121400.13CE0bZr064142@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Nathan Whitehorn Subject: git: e37df024e090 - stable/13 - Clarify that scripted installations don't require specification of boot partitions, as there seems to be widespread confusion on this point. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nwhitehorn X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e37df024e090daa1c3bf450b406cff4995f2401f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2021 14:00:38 -0000 The branch stable/13 has been updated by nwhitehorn: URL: https://cgit.FreeBSD.org/src/commit/?id=e37df024e090daa1c3bf450b406cff4995f2401f commit e37df024e090daa1c3bf450b406cff4995f2401f Author: Nathan Whitehorn AuthorDate: 2021-03-19 13:44:30 +0000 Commit: Nathan Whitehorn CommitDate: 2021-04-12 13:58:43 +0000 Clarify that scripted installations don't require specification of boot partitions, as there seems to be widespread confusion on this point. MFC after: 1 day (cherry picked from commit e8b4c5a6226b6bde304380de51c347851680b7ed) --- usr.sbin/bsdinstall/bsdinstall.8 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index 8048e41669ee..ba261ce7301d 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -199,6 +199,10 @@ As an example, a typical invocation looks like: .Pp bsdinstall scriptedpart ada0 { 20G freebsd-ufs /, 4G freebsd-swap, 20G freebsd-ufs /var, auto freebsd-ufs /usr } .Pp +Note that the list of partitions should +.Em not +include boot partitions (e.g. EFI system partitions), which will be created automatically on whatever disk includes /. +.Pp A shorter invocation to use the default partitioning (as .Cm autopart would have used) on the same disk: From owner-dev-commits-src-branches@freebsd.org Mon Apr 12 14:00:39 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 2AC725D1C79; Mon, 12 Apr 2021 14:00:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FJr3q0YJdz4W1p; Mon, 12 Apr 2021 14:00:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 059B518829; Mon, 12 Apr 2021 14:00:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13CE0cp1064171; Mon, 12 Apr 2021 14:00:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13CE0cnZ064170; Mon, 12 Apr 2021 14:00:38 GMT (envelope-from git) Date: Mon, 12 Apr 2021 14:00:38 GMT Message-Id: <202104121400.13CE0cnZ064170@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Nathan Whitehorn Subject: git: c87050f027a4 - stable/13 - Improve example install scripts, making them simpler and more robust. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nwhitehorn X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c87050f027a4e1ebad365222ab3eb4969806a7db Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2021 14:00:39 -0000 The branch stable/13 has been updated by nwhitehorn: URL: https://cgit.FreeBSD.org/src/commit/?id=c87050f027a4e1ebad365222ab3eb4969806a7db commit c87050f027a4e1ebad365222ab3eb4969806a7db Author: Nathan Whitehorn AuthorDate: 2021-03-22 14:08:55 +0000 Commit: Nathan Whitehorn CommitDate: 2021-04-12 13:58:49 +0000 Improve example install scripts, making them simpler and more robust. In particular: - There is no need to do anything with gpart (the installer does that for you). - There is no need to specify the network interface, since we have an option for defaults. (cherry picked from commit f91026bf462f9a636735cafafd29a1232b2a525b) --- usr.sbin/bsdinstall/bsdinstall.8 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index ba261ce7301d..53bf25b3b070 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -458,8 +458,7 @@ PARTITIONS=ada0 DISTRIBUTIONS="kernel.txz base.txz" #!/bin/sh -gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0 -sysrc ifconfig_em0=DHCP +sysrc ifconfig_DEFAULT=DHCP sysrc sshd_enable=YES pkg install puppet .Ed @@ -472,7 +471,7 @@ export ZFSBOOT_DISKS=ada0 export nonInteractive="YES" #!/bin/sh -echo "ifconfig_em0=DHCP" >> /etc/rc.conf +echo "ifconfig_DEFAULT=DHCP" >> /etc/rc.conf echo "sshd_enable=YES" >> /etc/rc.conf pkg install puppet .Ed From owner-dev-commits-src-branches@freebsd.org Mon Apr 12 14:00:40 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 47BCB5D2065; Mon, 12 Apr 2021 14:00:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FJr3r1NQ2z4WH9; Mon, 12 Apr 2021 14:00:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1EE2218944; Mon, 12 Apr 2021 14:00:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13CE0e9N064193; Mon, 12 Apr 2021 14:00:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13CE0e7Y064192; Mon, 12 Apr 2021 14:00:40 GMT (envelope-from git) Date: Mon, 12 Apr 2021 14:00:40 GMT Message-Id: <202104121400.13CE0e7Y064192@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Nathan Whitehorn Subject: git: 63a9b1641a67 - stable/13 - Include examples of how to build script-install media. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nwhitehorn X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 63a9b1641a67bf3c054f230c11d7a1f8ca5b23e3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2021 14:00:40 -0000 The branch stable/13 has been updated by nwhitehorn: URL: https://cgit.FreeBSD.org/src/commit/?id=63a9b1641a67bf3c054f230c11d7a1f8ca5b23e3 commit 63a9b1641a67bf3c054f230c11d7a1f8ca5b23e3 Author: Nathan Whitehorn AuthorDate: 2021-03-22 14:20:29 +0000 Commit: Nathan Whitehorn CommitDate: 2021-04-12 14:00:02 +0000 Include examples of how to build script-install media. (cherry picked from commit c8923d191dd3e56b8e1113b4a94da3193600c110) (cherry picked from commit 9f88bee14659c9e5920372c53106e666b502b3cd) --- usr.sbin/bsdinstall/bsdinstall.8 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index 53bf25b3b070..c58f6636493a 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 6, 2020 +.Dd March 22, 2021 .Dt BSDINSTALL 8 .Os .Sh NAME @@ -583,6 +583,20 @@ The first column if the dataset to be created on the top of the and the rest of the columns are the options to be set on each dataset. The options must be written on a coma or space separated list, or both. And everything behind a pound/hash character is ignored as a comment. +.Ss BUILDING AUTOMATIC INSTALL MEDIA +If building automatic install media, use tar to extract a release ISO: +.Dl mkdir release-media +.Dl tar xvf -C release-media FreeBSD-13.0-RELEASE-amd64-disc1.iso +.Pp +Then place a script as above in +.Pa etc/installerconfig +.Pp +This directory can then be used directly as an NFS root for +.Xr diskless 8 +installations or it can be rebuilt into an ISO image using the release scripts in +.Pa /usr/src/release . +For example, on amd64: +.Dl sh /usr/src/release/amd64/mkisoimages.sh -b '13_0_RELEASE_AMD64_CD' output.iso release-media .Sh HISTORY This version of .Nm From owner-dev-commits-src-branches@freebsd.org Mon Apr 12 14:00:42 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 D03DC5D20D4; Mon, 12 Apr 2021 14:00:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FJr3t4fYbz4W47; Mon, 12 Apr 2021 14:00:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6CC6218945; Mon, 12 Apr 2021 14:00:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13CE0gbU064244; Mon, 12 Apr 2021 14:00:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13CE0g8V064243; Mon, 12 Apr 2021 14:00:42 GMT (envelope-from git) Date: Mon, 12 Apr 2021 14:00:42 GMT Message-Id: <202104121400.13CE0g8V064243@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Nathan Whitehorn Subject: git: d6dfcb6b27b5 - stable/13 - Tweak language involving ZFS installation; no content changes. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nwhitehorn X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d6dfcb6b27b50dcc216a78d655fcb7e6c8561b19 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2021 14:00:43 -0000 The branch stable/13 has been updated by nwhitehorn: URL: https://cgit.FreeBSD.org/src/commit/?id=d6dfcb6b27b50dcc216a78d655fcb7e6c8561b19 commit d6dfcb6b27b50dcc216a78d655fcb7e6c8561b19 Author: Nathan Whitehorn AuthorDate: 2021-04-05 14:23:00 +0000 Commit: Nathan Whitehorn CommitDate: 2021-04-12 14:00:10 +0000 Tweak language involving ZFS installation; no content changes. (cherry picked from commit b8639a1098a70e8ca8ec5880d2337fed04e4243a) --- usr.sbin/bsdinstall/bsdinstall.8 | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index 854b4775883d..781660bf5ef1 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -465,7 +465,8 @@ exits. The two parts are separated by the usual script header (#!), which also sets the interpreter for the setup script. .Pp -A typical bsdinstall script looks like this: +A typical bsdinstall script, using the default filesystem layout and the UFS +filesystem, looks like this: .Bd -literal -offset indent PARTITIONS=ada0 DISTRIBUTIONS="kernel.txz base.txz" @@ -476,11 +477,12 @@ sysrc sshd_enable=YES pkg install puppet .Ed .Pp -For a ZFS scripted installation, the script looks like this: +For a scripted installation involving a ZFS pool spanning multiple disks, +the script instead looks like this: .Bd -literal -offset indent DISTRIBUTIONS="kernel.txz base.txz" export ZFSBOOT_VDEV_TYPE=stripe -export ZFSBOOT_DISKS=ada0 +export ZFSBOOT_DISKS="ada0 ada1" export nonInteractive="YES" #!/bin/sh @@ -517,6 +519,7 @@ the preamble can contain a variable which is passed to the .Cm scriptedpart target to control disk setup. +.Pp Alternatively, to use .Cm zfsboot @@ -525,12 +528,13 @@ instead of the preamble can contain the variable .Ev ZFSBOOT_DATASETS instead of -.Ev PARTITIONS , -and setting the variables +.Ev PARTITIONS +(see below). +If using .Cm zfsboot, the variables .Ev ZFSBOOT_DISKS and .Ev ZFSBOOT_VDEV_TYPE -to create the pool of disks for the base system. +must be set to create the pool of disks for the base system. Usually, for a mirrored booting disk, this two variables looks like this: .Bd -literal -offset indent ZFSBOOT_DISKS="ada0 ada1" @@ -539,7 +543,7 @@ ZFSBOOT_VDEV_TYPE=mirror .Pp Remember to export all the variables for the .Cm zfsboot -command, otherwise it will not get set. +command, otherwise installation will fail. .Ss SETUP SCRIPT Following the preamble is an optional shell script, beginning with a #! declaration. @@ -551,15 +555,17 @@ Note that newly configured system services, e.g., networking have not been started in the installed system at this time and only installation host services are available. .Ss ZFS DATASETS -The +If using +.Cm zfsboot +in an installation script, the .Cm zfsboot -partitioning takes the +partitioning tool takes the .Ev ZFSBOOT_DATASETS -variable to create the datasets on the base system. -This variable can get pretty huge if the pool contains a lot of datasets. +variable to create the ZFS datasets on the base system. +This variable definition can become large if the pool contains many datasets. The default value of the .Ev ZFSBOOT_DATASETS -looks like this: +is: .Bd -literal -offset indent # DATASET OPTIONS (comma or space separated; or both) @@ -591,11 +597,11 @@ looks like this: /var/tmp setuid=off .Ed .Pp -The first column if the dataset to be created on the top of the +The first column is the name of the dataset to be created as part of the .Ev ZFSBOOT_POOL_NAME -and the rest of the columns are the options to be set on each dataset. -The options must be written on a coma or space separated list, or both. -And everything behind a pound/hash character is ignored as a comment. +pool and the remainder of each line contains the options to be set on each dataset. +If multiple options are given, they can be separated by either commas or whitespace; +everything following a pound/hash character is ignored as a comment. .Ss BUILDING AUTOMATIC INSTALL MEDIA If building automatic install media, use tar to extract a release ISO: .Dl mkdir release-media @@ -617,3 +623,5 @@ first appeared in .Fx 9.0 . .Sh AUTHORS .An Nathan Whitehorn Aq Mt nwhitehorn@FreeBSD.org +.An Devin Teske Aq Mt dteske@FreeBSD.org +.An Allan Jude Aq Mt allanjude@FreeBSD.org From owner-dev-commits-src-branches@freebsd.org Mon Apr 12 14:00:41 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 C65C45D20CE; Mon, 12 Apr 2021 14:00:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FJr3s2HBJz4W23; Mon, 12 Apr 2021 14:00:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 37D99187F9; Mon, 12 Apr 2021 14:00:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13CE0fJI064223; Mon, 12 Apr 2021 14:00:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13CE0fS0064222; Mon, 12 Apr 2021 14:00:41 GMT (envelope-from git) Date: Mon, 12 Apr 2021 14:00:41 GMT Message-Id: <202104121400.13CE0fS0064222@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Nathan Whitehorn Subject: git: 7bcb10d21079 - stable/13 - Add some general notes about scripted installations. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nwhitehorn X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7bcb10d210794bffe252ab885d7ec7bb4aee4d41 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2021 14:00:42 -0000 The branch stable/13 has been updated by nwhitehorn: URL: https://cgit.FreeBSD.org/src/commit/?id=7bcb10d210794bffe252ab885d7ec7bb4aee4d41 commit 7bcb10d210794bffe252ab885d7ec7bb4aee4d41 Author: Nathan Whitehorn AuthorDate: 2021-04-05 14:10:34 +0000 Commit: Nathan Whitehorn CommitDate: 2021-04-12 14:00:09 +0000 Add some general notes about scripted installations. (cherry picked from commit 3b20b988e0f14740eb135ad5d56520b8cb94f429) --- usr.sbin/bsdinstall/bsdinstall.8 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index c58f6636493a..854b4775883d 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -438,6 +438,19 @@ Default: .El .Sh SCRIPTING .Nm +supports unattended, or minimally-attended, installations using scripting. +This can be used with either modified physical installation media or with +.Xr diskless 8 +installations over the network; information on preparing such media can be +found in +.Sx BUILDING AUTOMATIC INSTALL MEDIA +.Pp +Scripted installations follow an essentially identical path to interactive +installations, though with some minor feature differences (for example, +scripted installations do not support fetching of remote distribution files +since scripted installations normally install the same files and the distributions +can be added directly to the installation media). +.Nm scripts consist of two parts: a .Em preamble and a From owner-dev-commits-src-branches@freebsd.org Mon Apr 12 22:18:52 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 781A45E04E8; Mon, 12 Apr 2021 22:18:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FK36h304zz3DrL; Mon, 12 Apr 2021 22:18:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 597821F4B5; Mon, 12 Apr 2021 22:18:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13CMIqrP024011; Mon, 12 Apr 2021 22:18:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13CMIqZa024010; Mon, 12 Apr 2021 22:18:52 GMT (envelope-from git) Date: Mon, 12 Apr 2021 22:18:52 GMT Message-Id: <202104122218.13CMIqZa024010@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 9abc85d17d05 - stable/13 - Fix vlan creation for the older ifconfig(8) binaries. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9abc85d17d0538704641fe2c4d9da1b666f86e4e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2021 22:18:52 -0000 The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=9abc85d17d0538704641fe2c4d9da1b666f86e4e commit 9abc85d17d0538704641fe2c4d9da1b666f86e4e Author: Alexander V. Chernikov AuthorDate: 2021-04-11 16:47:03 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-04-12 22:18:33 +0000 Fix vlan creation for the older ifconfig(8) binaries. Reported by: allanjude MFC after: immediately (cherry picked from commit afbb64f1d85b7d8c2938031c3567946b5d10da4f) --- sys/net/if_vlan.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 2f48a5aa2f56..40b042b56248 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1012,6 +1012,10 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) vid = vlr.vlr_tag; proto = vlr.vlr_proto; +#ifdef COMPAT_FREEBSD12 + if (proto == 0) + proto = ETHERTYPE_VLAN; +#endif p = ifunit_ref(vlr.vlr_parent); if (p == NULL) return (ENXIO); @@ -1942,6 +1946,10 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) error = ENOENT; break; } +#ifdef COMPAT_FREEBSD12 + if (vlr.vlr_proto == 0) + vlr.vlr_proto = ETHERTYPE_VLAN; +#endif oldmtu = ifp->if_mtu; error = vlan_config(ifv, p, vlr.vlr_tag, vlr.vlr_proto); if_rele(p); From owner-dev-commits-src-branches@freebsd.org Tue Apr 13 04:36:50 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 3F5945D15AC; Tue, 13 Apr 2021 04:36:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FKCVp1MV1z3mtJ; Tue, 13 Apr 2021 04:36:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D51B24455; Tue, 13 Apr 2021 04:36:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13D4anhR029473; Tue, 13 Apr 2021 04:36:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13D4anpd029472; Tue, 13 Apr 2021 04:36:49 GMT (envelope-from git) Date: Tue, 13 Apr 2021 04:36:49 GMT Message-Id: <202104130436.13D4anpd029472@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: d33c99d27da2 - stable/13 - sysctl.conf(5): Mention sysctl.conf.local in the sysctl.conf(5) manual page MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d33c99d27da24ca23d8e7d6b2b933eef6f9bfce9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2021 04:36:50 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=d33c99d27da24ca23d8e7d6b2b933eef6f9bfce9 commit d33c99d27da24ca23d8e7d6b2b933eef6f9bfce9 Author: Gordon Bergling AuthorDate: 2021-04-09 15:28:18 +0000 Commit: Gordon Bergling CommitDate: 2021-04-13 04:36:32 +0000 sysctl.conf(5): Mention sysctl.conf.local in the sysctl.conf(5) manual page The possibility of using a sysctl.conf.local on a machine that has a shared sysctl.conf(5) isn't documented. So mention the sysctl.conf.local in the manual page. PR: 254901 Submitted by: Jose Luis Duran Reported by: Jose Luis Duran Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D29673 (cherry picked from commit 46c99528078ad478f50910110a933abef0b89cde) --- share/man/man5/sysctl.conf.5 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/share/man/man5/sysctl.conf.5 b/share/man/man5/sysctl.conf.5 index 664eee8080fc..99df8b794d83 100644 --- a/share/man/man5/sysctl.conf.5 +++ b/share/man/man5/sysctl.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 21, 2018 +.Dd April 8, 2021 .Dt SYSCTL.CONF 5 .Os .Sh NAME @@ -52,10 +52,13 @@ as seen in the .Sx EXAMPLES section, below. .Sh FILES -.Bl -tag -width /etc/sysctl.conf -compact +.Bl -tag -width /etc/sysctl.conf.local -compact .It Pa /etc/sysctl.conf Initial settings for .Xr sysctl 8 . +.It Pa /etc/sysctl.conf.local +Machine-specific settings for sites with a common +.Pa /etc/sysctl.conf . .El .Sh EXAMPLES To turn off logging of programs that exit due to fatal signals you may use From owner-dev-commits-src-branches@freebsd.org Tue Apr 13 04:38:14 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 4BF745D1852; Tue, 13 Apr 2021 04:38:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FKCXQ1hpTz3mxF; Tue, 13 Apr 2021 04:38:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D80F24716; Tue, 13 Apr 2021 04:38:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13D4cELf029678; Tue, 13 Apr 2021 04:38:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13D4cEDb029677; Tue, 13 Apr 2021 04:38:14 GMT (envelope-from git) Date: Tue, 13 Apr 2021 04:38:14 GMT Message-Id: <202104130438.13D4cEDb029677@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: fa5210b55a35 - stable/12 - sysctl.conf(5): Mention sysctl.conf.local in the sysctl.conf(5) manual page MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: fa5210b55a35ff217dec68b3cd25678447ad4f09 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2021 04:38:14 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=fa5210b55a35ff217dec68b3cd25678447ad4f09 commit fa5210b55a35ff217dec68b3cd25678447ad4f09 Author: Gordon Bergling AuthorDate: 2021-04-09 15:28:18 +0000 Commit: Gordon Bergling CommitDate: 2021-04-13 04:37:54 +0000 sysctl.conf(5): Mention sysctl.conf.local in the sysctl.conf(5) manual page The possibility of using a sysctl.conf.local on a machine that has a shared sysctl.conf(5) isn't documented. So mention the sysctl.conf.local in the manual page. PR: 254901 Submitted by: Jose Luis Duran Reported by: Jose Luis Duran Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D29673 (cherry picked from commit 46c99528078ad478f50910110a933abef0b89cde) --- share/man/man5/sysctl.conf.5 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/share/man/man5/sysctl.conf.5 b/share/man/man5/sysctl.conf.5 index 664eee8080fc..99df8b794d83 100644 --- a/share/man/man5/sysctl.conf.5 +++ b/share/man/man5/sysctl.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 21, 2018 +.Dd April 8, 2021 .Dt SYSCTL.CONF 5 .Os .Sh NAME @@ -52,10 +52,13 @@ as seen in the .Sx EXAMPLES section, below. .Sh FILES -.Bl -tag -width /etc/sysctl.conf -compact +.Bl -tag -width /etc/sysctl.conf.local -compact .It Pa /etc/sysctl.conf Initial settings for .Xr sysctl 8 . +.It Pa /etc/sysctl.conf.local +Machine-specific settings for sites with a common +.Pa /etc/sysctl.conf . .El .Sh EXAMPLES To turn off logging of programs that exit due to fatal signals you may use From owner-dev-commits-src-branches@freebsd.org Tue Apr 13 07:38:42 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 BE7185D55F2; Tue, 13 Apr 2021 07:38:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FKHXf4lm9z3vMt; Tue, 13 Apr 2021 07:38:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95D9426CA6; Tue, 13 Apr 2021 07:38:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13D7cguE068196; Tue, 13 Apr 2021 07:38:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13D7cgNO068195; Tue, 13 Apr 2021 07:38:42 GMT (envelope-from git) Date: Tue, 13 Apr 2021 07:38:42 GMT Message-Id: <202104130738.13D7cgNO068195@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Xin LI Subject: git: 5d02b30ebd88 - stable/13 - usr.sbin/services_mkdb: plug memory leak when line was blank. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5d02b30ebd8837f7bed0a38d1ceb09635fc59538 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2021 07:38:42 -0000 The branch stable/13 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=5d02b30ebd8837f7bed0a38d1ceb09635fc59538 commit 5d02b30ebd8837f7bed0a38d1ceb09635fc59538 Author: Xin LI AuthorDate: 2021-03-30 22:21:37 +0000 Commit: Xin LI CommitDate: 2021-04-13 07:38:34 +0000 usr.sbin/services_mkdb: plug memory leak when line was blank. Reviewed by: bapt MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D29370 (cherry picked from commit 18f3c5fe9207fbd19360b8ddb23ba10a5ad3df68) --- usr.sbin/services_mkdb/uniq.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/usr.sbin/services_mkdb/uniq.c b/usr.sbin/services_mkdb/uniq.c index 74984468cbb5..43e66b95979d 100644 --- a/usr.sbin/services_mkdb/uniq.c +++ b/usr.sbin/services_mkdb/uniq.c @@ -119,12 +119,13 @@ comp(const char *origline, char **compline, size_t *len) for (p = (const unsigned char *)origline; l && *p && isspace(*p); p++, l--) continue; + if (*p == '\0' || l == 0) + return 0; + if ((cline = malloc(l + 1)) == NULL) err(1, "Cannot allocate %zu bytes", l + 1); (void)memcpy(cline, p, l); cline[l] = '\0'; - if (*cline == '\0') - return 0; complen = 0; hasalnum = 0; @@ -154,6 +155,11 @@ comp(const char *origline, char **compline, size_t *len) --complen; } *q = '\0'; + if (!hasalnum) { + free(cline); + cline = NULL; + complen = 0; + } *compline = cline; *len = complen; return hasalnum; From owner-dev-commits-src-branches@freebsd.org Tue Apr 13 18:42:36 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 EA6C05E7A47; Tue, 13 Apr 2021 18:42:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FKZGh5rckz3F4L; Tue, 13 Apr 2021 18:42:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BB9CF7E0F; Tue, 13 Apr 2021 18:42:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13DIga0P057665; Tue, 13 Apr 2021 18:42:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13DIga4l057664; Tue, 13 Apr 2021 18:42:36 GMT (envelope-from git) Date: Tue, 13 Apr 2021 18:42:36 GMT Message-Id: <202104131842.13DIga4l057664@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 81a1e3f1f755 - stable/13 - freebsd-update: improve mandoc db generation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 81a1e3f1f755aea5c3c09f2ad65c420fea97552f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2021 18:42:37 -0000 The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=81a1e3f1f755aea5c3c09f2ad65c420fea97552f commit 81a1e3f1f755aea5c3c09f2ad65c420fea97552f Author: Ed Maste AuthorDate: 2021-04-04 00:57:26 +0000 Commit: Ed Maste CommitDate: 2021-04-13 18:42:17 +0000 freebsd-update: improve mandoc db generation freebsd-update compares the dates on man pages with mandoc.db, and if any newer pages are found it regenerates mandoc.db. Previously, if mandoc.db did not already exist the check failed and freebsd-update then failed to create one. Now, check that mandoc.db exists before performing the check for newer pages. Reported by: bdrewery (in D10482) Reviewed by: gordon Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29575 (cherry picked from commit 741223a65cd1752360c44341b762295f633e21cf) --- usr.sbin/freebsd-update/freebsd-update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 004515bb8bf8..7f9b06f0221f 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -2958,7 +2958,8 @@ Kernel updates have been installed. Please reboot and run if [ ! -d ${BASEDIR}/$D ]; then continue fi - if [ -z "$(find ${BASEDIR}/$D -type f -newer ${BASEDIR}/$D/mandoc.db)" ]; then + if [ -f ${BASEDIR}/$D/mandoc.db ] && \ + [ -z "$(find ${BASEDIR}/$D -type f -newer ${BASEDIR}/$D/mandoc.db)" ]; then continue; fi makewhatis ${BASEDIR}/$D From owner-dev-commits-src-branches@freebsd.org Tue Apr 13 18:43:09 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 0C3165E7BE6; Tue, 13 Apr 2021 18:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FKZHJ70WZz3FCW; Tue, 13 Apr 2021 18:43:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E323C76E4; Tue, 13 Apr 2021 18:43:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13DIh8cR057825; Tue, 13 Apr 2021 18:43:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13DIh8ob057824; Tue, 13 Apr 2021 18:43:08 GMT (envelope-from git) Date: Tue, 13 Apr 2021 18:43:08 GMT Message-Id: <202104131843.13DIh8ob057824@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 113f92b13ec6 - stable/12 - freebsd-update: improve mandoc db generation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 113f92b13ec65a1a298630c06a680997e46a155b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2021 18:43:09 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=113f92b13ec65a1a298630c06a680997e46a155b commit 113f92b13ec65a1a298630c06a680997e46a155b Author: Ed Maste AuthorDate: 2021-04-04 00:57:26 +0000 Commit: Ed Maste CommitDate: 2021-04-13 18:42:57 +0000 freebsd-update: improve mandoc db generation freebsd-update compares the dates on man pages with mandoc.db, and if any newer pages are found it regenerates mandoc.db. Previously, if mandoc.db did not already exist the check failed and freebsd-update then failed to create one. Now, check that mandoc.db exists before performing the check for newer pages. Reported by: bdrewery (in D10482) Reviewed by: gordon Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29575 (cherry picked from commit 741223a65cd1752360c44341b762295f633e21cf) --- usr.sbin/freebsd-update/freebsd-update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 004515bb8bf8..7f9b06f0221f 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -2958,7 +2958,8 @@ Kernel updates have been installed. Please reboot and run if [ ! -d ${BASEDIR}/$D ]; then continue fi - if [ -z "$(find ${BASEDIR}/$D -type f -newer ${BASEDIR}/$D/mandoc.db)" ]; then + if [ -f ${BASEDIR}/$D/mandoc.db ] && \ + [ -z "$(find ${BASEDIR}/$D -type f -newer ${BASEDIR}/$D/mandoc.db)" ]; then continue; fi makewhatis ${BASEDIR}/$D From owner-dev-commits-src-branches@freebsd.org Tue Apr 13 18:46:38 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 F3A945E8028; Tue, 13 Apr 2021 18:46:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FKZML6bx7z3FKm; Tue, 13 Apr 2021 18:46:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C724C7E11; Tue, 13 Apr 2021 18:46:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13DIkcdr058324; Tue, 13 Apr 2021 18:46:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13DIkcAK058323; Tue, 13 Apr 2021 18:46:38 GMT (envelope-from git) Date: Tue, 13 Apr 2021 18:46:38 GMT Message-Id: <202104131846.13DIkcAK058323@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 14b0c8e7687e - stable/12 - readelf: return error in case of invalid file MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 14b0c8e7687e0f5917b4d272bd16a6816cab3d12 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2021 18:46:39 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=14b0c8e7687e0f5917b4d272bd16a6816cab3d12 commit 14b0c8e7687e0f5917b4d272bd16a6816cab3d12 Author: Ed Maste AuthorDate: 2021-04-05 01:01:28 +0000 Commit: Ed Maste CommitDate: 2021-04-13 18:44:59 +0000 readelf: return error in case of invalid file GNU readelf exits with an error for a number of invalid file cases. Previously ELF Tool Chain readelf always exited with 0. Now we exit 1 upon detecting an error with one or more input files, but in any case all of them are processed. This should catch common failure cases. We still do not report an error for some types of malformed ELF files, but this is consistent with GNU readelf. PR: 252727 Reviewed by: jkoshy, markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29377 (cherry picked from commit ea444392bb5b351c930f28a02a4e68f51b25ba69) --- contrib/elftoolchain/readelf/readelf.c | 36 +++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/contrib/elftoolchain/readelf/readelf.c b/contrib/elftoolchain/readelf/readelf.c index d1c3c0a4b714..a3b7e7a6bcac 100644 --- a/contrib/elftoolchain/readelf/readelf.c +++ b/contrib/elftoolchain/readelf/readelf.c @@ -280,7 +280,7 @@ static const char *elf_osabi(unsigned int abi); static const char *elf_type(unsigned int type); static const char *elf_ver(unsigned int ver); static const char *dt_type(unsigned int mach, unsigned int dtype); -static void dump_ar(struct readelf *re, int); +static bool dump_ar(struct readelf *re, int); static void dump_arm_attributes(struct readelf *re, uint8_t *p, uint8_t *pe); static void dump_attributes(struct readelf *re); static uint8_t *dump_compatibility_tag(uint8_t *p, uint8_t *pe); @@ -310,7 +310,7 @@ static void dump_dwarf_ranges_foreach(struct readelf *re, Dwarf_Die die, Dwarf_Addr base); static void dump_dwarf_str(struct readelf *re); static void dump_eflags(struct readelf *re, uint64_t e_flags); -static void dump_elf(struct readelf *re); +static bool dump_elf(struct readelf *re); static void dump_flags(struct flag_desc *fd, uint64_t flags); static void dump_dyn_val(struct readelf *re, GElf_Dyn *dyn, uint32_t stab); static void dump_dynamic(struct readelf *re); @@ -7203,18 +7203,18 @@ unload_sections(struct readelf *re) } } -static void +static bool dump_elf(struct readelf *re) { /* Fetch ELF header. No need to continue if it fails. */ if (gelf_getehdr(re->elf, &re->ehdr) == NULL) { warnx("gelf_getehdr failed: %s", elf_errmsg(-1)); - return; + return (false); } if ((re->ec = gelf_getclass(re->elf)) == ELFCLASSNONE) { warnx("gelf_getclass failed: %s", elf_errmsg(-1)); - return; + return (false); } if (re->ehdr.e_ident[EI_DATA] == ELFDATA2MSB) { re->dw_read = _read_msb; @@ -7258,6 +7258,7 @@ dump_elf(struct readelf *re) dump_dwarf(re); if (re->options & ~RE_H) unload_sections(re); + return (true); } static void @@ -7303,7 +7304,7 @@ dump_dwarf(struct readelf *re) dwarf_finish(re->dbg, &de); } -static void +static bool dump_ar(struct readelf *re, int fd) { Elf_Arsym *arsym; @@ -7354,14 +7355,14 @@ dump_ar(struct readelf *re, int fd) } if (elf_rand(re->ar, SARMAG) != SARMAG) { warnx("elf_rand() failed: %s", elf_errmsg(-1)); - return; + return (false); } } process_members: if ((re->options & ~RE_C) == 0) - return; + return (true); cmd = ELF_C_READ; while ((re->elf = elf_begin(fd, cmd, re->ar)) != NULL) { @@ -7381,11 +7382,14 @@ process_members: elf_end(re->elf); } re->elf = re->ar; + return (true); } -static void +static bool dump_object(struct readelf *re, int fd) { + bool rv = false; + if ((re->flags & DISPLAY_FILENAME) != 0) printf("\nFile: %s\n", re->filename); @@ -7399,10 +7403,10 @@ dump_object(struct readelf *re, int fd) warnx("Not an ELF file."); goto done; case ELF_K_ELF: - dump_elf(re); + rv = dump_elf(re); break; case ELF_K_AR: - dump_ar(re, fd); + rv = dump_ar(re, fd); break; default: warnx("Internal: libelf returned unknown elf kind."); @@ -7410,6 +7414,7 @@ dump_object(struct readelf *re, int fd) done: elf_end(re->elf); + return (rv); } static void @@ -7755,7 +7760,7 @@ main(int argc, char **argv) { struct readelf *re, re_storage; unsigned long si; - int fd, opt, i; + int fd, opt, i, exit_code; char *ep; re = &re_storage; @@ -7881,16 +7886,19 @@ main(int argc, char **argv) errx(EXIT_FAILURE, "ELF library initialization failed: %s", elf_errmsg(-1)); + exit_code = EXIT_SUCCESS; for (i = 0; i < argc; i++) { re->filename = argv[i]; fd = open(re->filename, O_RDONLY); if (fd < 0) { warn("open %s failed", re->filename); + exit_code = EXIT_FAILURE; } else { - dump_object(re, fd); + if (!dump_object(re, fd)) + exit_code = EXIT_FAILURE; close(fd); } } - exit(EXIT_SUCCESS); + exit(exit_code); } From owner-dev-commits-src-branches@freebsd.org Wed Apr 14 00:47:15 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 7088D5F36F1; Wed, 14 Apr 2021 00:47:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FKkMR2prpz3rDw; Wed, 14 Apr 2021 00:47:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4F1A01436C; Wed, 14 Apr 2021 00:47:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13E0lFDQ038478; Wed, 14 Apr 2021 00:47:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13E0lFr3038477; Wed, 14 Apr 2021 00:47:15 GMT (envelope-from git) Date: Wed, 14 Apr 2021 00:47:15 GMT Message-Id: <202104140047.13E0lFr3038477@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: bc6d368bb8a3 - stable/12 - pms: handle maximum size IO with any alignment MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: bc6d368bb8a359c557af200a93f2862f0571d6ea Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2021 00:47:15 -0000 The branch stable/12 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=bc6d368bb8a359c557af200a93f2862f0571d6ea commit bc6d368bb8a359c557af200a93f2862f0571d6ea Author: Ryan Libby AuthorDate: 2021-01-20 21:59:49 +0000 Commit: Alexander Motin CommitDate: 2021-04-14 00:46:19 +0000 pms: handle maximum size IO with any alignment Define the maximum numbers of segments to allow for non-page alignment at the beginning and end of a maxphys size transfer. Also set ccb_pathinq.maxio consistent with maxphys. Reviewed by: imp Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28043 (cherry picked from commit e54a1d5751805714bf6ea5e2e99887388110f9f0) --- sys/dev/pms/freebsd/driver/ini/src/agdef.h | 2 +- sys/dev/pms/freebsd/driver/ini/src/agtiapi.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/pms/freebsd/driver/ini/src/agdef.h b/sys/dev/pms/freebsd/driver/ini/src/agdef.h index a07d97357fd3..fea7563c8b04 100644 --- a/sys/dev/pms/freebsd/driver/ini/src/agdef.h +++ b/sys/dev/pms/freebsd/driver/ini/src/agdef.h @@ -62,7 +62,7 @@ EW 09-17-2004 1.0.0 Constant definitions #define AGTIAPI_MAX_DEVICE_7H 256 /*Max devices per channel in 7H */ #define AGTIAPI_MAX_DEVICE_8H 512 /*Max devices per channel in 8H*/ #define AGTIAPI_MAX_CAM_Q_DEPTH 1024 -#define AGTIAPI_NSEGS (MAXPHYS / PAGE_SIZE) +#define AGTIAPI_NSEGS (btoc(MAXPHYS) + 1) /* ** Adapter specific defines */ diff --git a/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c b/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c index ef7dc19c05ce..8a6865bbccc9 100644 --- a/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c +++ b/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c @@ -1833,7 +1833,8 @@ static void agtiapi_cam_action( struct cam_sim *sim, union ccb * ccb ) cpi->hba_eng_cnt = 0; cpi->max_target = maxTargets - 1; cpi->max_lun = AGTIAPI_MAX_LUN; - cpi->maxio = 1024 *1024; /* Max supported I/O size, in bytes. */ + /* Max supported I/O size, in bytes. */ + cpi->maxio = ulmin(1024 * 1024, MAXPHYS); cpi->initiator_id = 255; strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); strlcpy(cpi->hba_vid, "PMC", HBA_IDLEN); From owner-dev-commits-src-branches@freebsd.org Wed Apr 14 01:03:02 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 883E25F4653; Wed, 14 Apr 2021 01:03:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FKkjf3VYmz3sQX; Wed, 14 Apr 2021 01:03:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B06D14DA4; Wed, 14 Apr 2021 01:03:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13E132vX064856; Wed, 14 Apr 2021 01:03:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13E132pZ064855; Wed, 14 Apr 2021 01:03:02 GMT (envelope-from git) Date: Wed, 14 Apr 2021 01:03:02 GMT Message-Id: <202104140103.13E132pZ064855@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 3bec9180c9e7 - stable/13 - Add IDs for ASMedia ASM116x PCIe 3.0 AHCI controllers. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3bec9180c9e70852a8ad0a56461a7ad0dd1abd92 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2021 01:03:02 -0000 The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=3bec9180c9e70852a8ad0a56461a7ad0dd1abd92 commit 3bec9180c9e70852a8ad0a56461a7ad0dd1abd92 Author: Alexander Motin AuthorDate: 2021-04-07 19:03:36 +0000 Commit: Alexander Motin CommitDate: 2021-04-14 01:02:58 +0000 Add IDs for ASMedia ASM116x PCIe 3.0 AHCI controllers. MFC after: 1 week (cherry picked from commit 5a8d32b53b919d82d6a3aa9f155bd2a00fb51dc2) --- sys/dev/ahci/ahci_pci.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/ahci/ahci_pci.c b/sys/dev/ahci/ahci_pci.c index 85dc3bf272be..ccc107a14bc8 100644 --- a/sys/dev/ahci/ahci_pci.c +++ b/sys/dev/ahci/ahci_pci.c @@ -94,6 +94,11 @@ static const struct { {0x06221b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS|AHCI_Q_NOAUX}, {0x06241b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS|AHCI_Q_NOAUX}, {0x06251b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS|AHCI_Q_NOAUX}, + {0x10621b21, 0x00, "ASMedia ASM116x", 0}, + {0x10641b21, 0x00, "ASMedia ASM116x", 0}, + {0x11641b21, 0x00, "ASMedia ASM116x", 0}, + {0x11651b21, 0x00, "ASMedia ASM116x", 0}, + {0x11661b21, 0x00, "ASMedia ASM116x", 0}, {0x79011d94, 0x00, "Hygon KERNCZ", 0}, {0x26528086, 0x00, "Intel ICH6", AHCI_Q_NOFORCE}, {0x26538086, 0x00, "Intel ICH6M", AHCI_Q_NOFORCE}, From owner-dev-commits-src-branches@freebsd.org Wed Apr 14 01:03:17 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 4048A5F4916; Wed, 14 Apr 2021 01:03:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FKkjx1Pjgz3sBl; Wed, 14 Apr 2021 01:03:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2324014D3C; Wed, 14 Apr 2021 01:03:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13E13H1t064980; Wed, 14 Apr 2021 01:03:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13E13HCW064979; Wed, 14 Apr 2021 01:03:17 GMT (envelope-from git) Date: Wed, 14 Apr 2021 01:03:17 GMT Message-Id: <202104140103.13E13HCW064979@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 6c4ea5bb59ac - stable/12 - Add IDs for ASMedia ASM116x PCIe 3.0 AHCI controllers. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 6c4ea5bb59ac83aed1bb9ea75ef230d34cba2c24 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2021 01:03:17 -0000 The branch stable/12 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=6c4ea5bb59ac83aed1bb9ea75ef230d34cba2c24 commit 6c4ea5bb59ac83aed1bb9ea75ef230d34cba2c24 Author: Alexander Motin AuthorDate: 2021-04-07 19:03:36 +0000 Commit: Alexander Motin CommitDate: 2021-04-14 01:03:12 +0000 Add IDs for ASMedia ASM116x PCIe 3.0 AHCI controllers. MFC after: 1 week (cherry picked from commit 5a8d32b53b919d82d6a3aa9f155bd2a00fb51dc2) --- sys/dev/ahci/ahci_pci.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/ahci/ahci_pci.c b/sys/dev/ahci/ahci_pci.c index ab440e0c8522..590da7b50050 100644 --- a/sys/dev/ahci/ahci_pci.c +++ b/sys/dev/ahci/ahci_pci.c @@ -90,6 +90,11 @@ static const struct { {0x06221b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS|AHCI_Q_NOAUX}, {0x06241b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS|AHCI_Q_NOAUX}, {0x06251b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS|AHCI_Q_NOAUX}, + {0x10621b21, 0x00, "ASMedia ASM116x", 0}, + {0x10641b21, 0x00, "ASMedia ASM116x", 0}, + {0x11641b21, 0x00, "ASMedia ASM116x", 0}, + {0x11651b21, 0x00, "ASMedia ASM116x", 0}, + {0x11661b21, 0x00, "ASMedia ASM116x", 0}, {0x79011d94, 0x00, "Hygon KERNCZ", 0}, {0x26528086, 0x00, "Intel ICH6", AHCI_Q_NOFORCE}, {0x26538086, 0x00, "Intel ICH6M", AHCI_Q_NOFORCE}, From owner-dev-commits-src-branches@freebsd.org Wed Apr 14 13:08:13 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 49A6B5D8364; Wed, 14 Apr 2021 13:08:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FL2pP1fhKz3FcP; Wed, 14 Apr 2021 13:08:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 215181E36F; Wed, 14 Apr 2021 13:08:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13ED8DZv019204; Wed, 14 Apr 2021 13:08:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13ED8DXf019203; Wed, 14 Apr 2021 13:08:13 GMT (envelope-from git) Date: Wed, 14 Apr 2021 13:08:13 GMT Message-Id: <202104141308.13ED8DXf019203@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 0050d0e9281f - stable/13 - pf tests: make synproxy and nat work correctly even if inetd is running MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0050d0e9281f051ee37cd24bc0dff4da1df8e930 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2021 13:08:13 -0000 The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0050d0e9281f051ee37cd24bc0dff4da1df8e930 commit 0050d0e9281f051ee37cd24bc0dff4da1df8e930 Author: Kurosawa Takahiro AuthorDate: 2021-04-07 06:17:51 +0000 Commit: Kristof Provost CommitDate: 2021-04-14 08:16:06 +0000 pf tests: make synproxy and nat work correctly even if inetd is running tests/sys/netfil/pf/synproxy fails if inetd has been running outside of the jail because pidfile_open() fails with EEXIST. tests/sys/netfil/pf/nat has the same problem but the test succeeds because whether inetd is running is not so important. Fix the problem by changing the pidfile path from the default location. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D29622 (cherry picked from commit 5a5623397c73e46b206289d32d1d6b9de420da9c) --- tests/sys/netpfil/pf/nat.sh | 3 ++- tests/sys/netpfil/pf/synproxy.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/sys/netpfil/pf/nat.sh b/tests/sys/netpfil/pf/nat.sh index 499c137eee9c..3fabb32db80f 100644 --- a/tests/sys/netpfil/pf/nat.sh +++ b/tests/sys/netpfil/pf/nat.sh @@ -52,7 +52,7 @@ exhaust_body() jexec nat sysctl net.inet.ip.forwarding=1 jexec echo ifconfig ${epair_echo}b 198.51.100.2/24 up - jexec echo /usr/sbin/inetd $(atf_get_srcdir)/echo_inetd.conf + jexec echo /usr/sbin/inetd -p inetd-echo.pid $(atf_get_srcdir)/echo_inetd.conf # Enable pf! jexec nat pfctl -e @@ -80,6 +80,7 @@ exhaust_body() exhaust_cleanup() { + rm -f inetd-echo.pid pft_cleanup } diff --git a/tests/sys/netpfil/pf/synproxy.sh b/tests/sys/netpfil/pf/synproxy.sh index f4d6df46fa78..aedbb8885129 100644 --- a/tests/sys/netpfil/pf/synproxy.sh +++ b/tests/sys/netpfil/pf/synproxy.sh @@ -53,7 +53,7 @@ synproxy_body() jexec singsing ifconfig ${link}b 198.51.100.2/24 up jexec singsing route add default 198.51.100.1 - jexec singsing /usr/sbin/inetd $(atf_get_srcdir)/echo_inetd.conf + jexec singsing /usr/sbin/inetd -p inetd-singsing.pid $(atf_get_srcdir)/echo_inetd.conf jexec alcatraz pfctl -e pft_set_rules alcatraz "set fail-policy return" \ @@ -75,6 +75,7 @@ synproxy_body() synproxy_cleanup() { + rm -f inetd-singsing.pid pft_cleanup } From owner-dev-commits-src-branches@freebsd.org Wed Apr 14 13:08:14 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 8C30D5D8722; Wed, 14 Apr 2021 13:08:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FL2pQ2rHNz3FTG; Wed, 14 Apr 2021 13:08:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E9E21E17F; Wed, 14 Apr 2021 13:08:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13ED8EVl019225; Wed, 14 Apr 2021 13:08:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13ED8EUb019224; Wed, 14 Apr 2021 13:08:14 GMT (envelope-from git) Date: Wed, 14 Apr 2021 13:08:14 GMT Message-Id: <202104141308.13ED8EUb019224@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 4f784d330d3f - stable/13 - libnv: Allow use in non-sleepable contexts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4f784d330d3f664d35eaaa45024d442b776a0458 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2021 13:08:14 -0000 The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4f784d330d3f664d35eaaa45024d442b776a0458 commit 4f784d330d3f664d35eaaa45024d442b776a0458 Author: Kristof Provost AuthorDate: 2021-03-25 12:59:14 +0000 Commit: Kristof Provost CommitDate: 2021-04-14 08:16:27 +0000 libnv: Allow use in non-sleepable contexts 44c125c4cebc2fd87c6260b90eddae11201f5232 switched the nvlist allocations to be M_WAITOK, but this precludes the use in non-sleepable contexts. (E.g. with a nonsleepable lock held). All callers for these allocation functions already cope with memory alloation failures, so there's no reason to allow sleeping during allocations. Reviewed by: melifaro, oshogbo MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29556 (cherry picked from commit ab8d25880ebc9ddca1ae6af938680036349edf3f) --- sys/contrib/libnv/nv_impl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/contrib/libnv/nv_impl.h b/sys/contrib/libnv/nv_impl.h index 14f2fb8f2c11..1875c739beee 100644 --- a/sys/contrib/libnv/nv_impl.h +++ b/sys/contrib/libnv/nv_impl.h @@ -52,13 +52,13 @@ typedef struct nvpair nvpair_t; #define NV_FLAG_IN_ARRAY 0x100 #ifdef _KERNEL -#define nv_malloc(size) malloc((size), M_NVLIST, M_WAITOK) +#define nv_malloc(size) malloc((size), M_NVLIST, M_NOWAIT) #define nv_calloc(n, size) mallocarray((n), (size), M_NVLIST, \ - M_WAITOK | M_ZERO) + M_NOWAIT | M_ZERO) #define nv_realloc(buf, size) realloc((buf), (size), M_NVLIST, \ - M_WAITOK) + M_NOWAIT) #define nv_free(buf) free((buf), M_NVLIST) -#define nv_strdup(buf) strdup((buf), M_NVLIST) +#define nv_strdup(buf) strdup_flags((buf), M_NVLIST, M_NOWAIT) #define nv_vasprintf(ptr, ...) vasprintf(ptr, M_NVLIST, __VA_ARGS__) #define ERRNO_SET(var) do { } while (0) From owner-dev-commits-src-branches@freebsd.org Wed Apr 14 13:08:30 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 CB3FB5D8706; Wed, 14 Apr 2021 13:08:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FL2pk5NKzz3FTZ; Wed, 14 Apr 2021 13:08:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AC1121DEEE; Wed, 14 Apr 2021 13:08:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13ED8UjP019385; Wed, 14 Apr 2021 13:08:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13ED8Uv2019384; Wed, 14 Apr 2021 13:08:30 GMT (envelope-from git) Date: Wed, 14 Apr 2021 13:08:30 GMT Message-Id: <202104141308.13ED8Uv2019384@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 38b25dade179 - stable/12 - pf tests: make synproxy and nat work correctly even if inetd is running MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 38b25dade179bec0eeccff95a5ae354e7304e474 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2021 13:08:30 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=38b25dade179bec0eeccff95a5ae354e7304e474 commit 38b25dade179bec0eeccff95a5ae354e7304e474 Author: Kurosawa Takahiro AuthorDate: 2021-04-07 06:17:51 +0000 Commit: Kristof Provost CommitDate: 2021-04-14 08:17:14 +0000 pf tests: make synproxy and nat work correctly even if inetd is running tests/sys/netfil/pf/synproxy fails if inetd has been running outside of the jail because pidfile_open() fails with EEXIST. tests/sys/netfil/pf/nat has the same problem but the test succeeds because whether inetd is running is not so important. Fix the problem by changing the pidfile path from the default location. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D29622 (cherry picked from commit 5a5623397c73e46b206289d32d1d6b9de420da9c) --- tests/sys/netpfil/pf/nat.sh | 3 ++- tests/sys/netpfil/pf/synproxy.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/sys/netpfil/pf/nat.sh b/tests/sys/netpfil/pf/nat.sh index 6ce84310ce84..99a0ca870c85 100755 --- a/tests/sys/netpfil/pf/nat.sh +++ b/tests/sys/netpfil/pf/nat.sh @@ -27,7 +27,7 @@ exhaust_body() jexec nat sysctl net.inet.ip.forwarding=1 jexec echo ifconfig ${epair_echo}b 198.51.100.2/24 up - jexec echo /usr/sbin/inetd $(atf_get_srcdir)/echo_inetd.conf + jexec echo /usr/sbin/inetd -p inetd-echo.pid $(atf_get_srcdir)/echo_inetd.conf # Enable pf! jexec nat pfctl -e @@ -55,6 +55,7 @@ exhaust_body() exhaust_cleanup() { + rm -f inetd-echo.pid pft_cleanup } diff --git a/tests/sys/netpfil/pf/synproxy.sh b/tests/sys/netpfil/pf/synproxy.sh index bb4161f58d42..6203723adbe8 100755 --- a/tests/sys/netpfil/pf/synproxy.sh +++ b/tests/sys/netpfil/pf/synproxy.sh @@ -28,7 +28,7 @@ synproxy_body() jexec singsing ifconfig ${link}b 198.51.100.2/24 up jexec singsing route add default 198.51.100.1 - jexec singsing /usr/sbin/inetd $(atf_get_srcdir)/echo_inetd.conf + jexec singsing /usr/sbin/inetd -p inetd-singsing.pid $(atf_get_srcdir)/echo_inetd.conf jexec alcatraz pfctl -e pft_set_rules alcatraz "set fail-policy return" \ @@ -50,6 +50,7 @@ synproxy_body() synproxy_cleanup() { + rm -f inetd-singsing.pid pft_cleanup } From owner-dev-commits-src-branches@freebsd.org Wed Apr 14 13:08:32 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 077C05D8741; Wed, 14 Apr 2021 13:08:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FL2pl6Zqqz3Fg8; Wed, 14 Apr 2021 13:08:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D19331E370; Wed, 14 Apr 2021 13:08:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13ED8V2N019406; Wed, 14 Apr 2021 13:08:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13ED8VnS019405; Wed, 14 Apr 2021 13:08:31 GMT (envelope-from git) Date: Wed, 14 Apr 2021 13:08:31 GMT Message-Id: <202104141308.13ED8VnS019405@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: e1d7503d6cf7 - stable/12 - libnv: Allow use in non-sleepable contexts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: e1d7503d6cf7ff18f29e7b3b0a8a3525b43414b8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2021 13:08:32 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e1d7503d6cf7ff18f29e7b3b0a8a3525b43414b8 commit e1d7503d6cf7ff18f29e7b3b0a8a3525b43414b8 Author: Kristof Provost AuthorDate: 2021-03-25 12:59:14 +0000 Commit: Kristof Provost CommitDate: 2021-04-14 08:17:25 +0000 libnv: Allow use in non-sleepable contexts 44c125c4cebc2fd87c6260b90eddae11201f5232 switched the nvlist allocations to be M_WAITOK, but this precludes the use in non-sleepable contexts. (E.g. with a nonsleepable lock held). All callers for these allocation functions already cope with memory alloation failures, so there's no reason to allow sleeping during allocations. Reviewed by: melifaro, oshogbo MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29556 (cherry picked from commit ab8d25880ebc9ddca1ae6af938680036349edf3f) --- sys/contrib/libnv/nv_impl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/contrib/libnv/nv_impl.h b/sys/contrib/libnv/nv_impl.h index 56e01a2bfb31..a67cc2ca0883 100644 --- a/sys/contrib/libnv/nv_impl.h +++ b/sys/contrib/libnv/nv_impl.h @@ -52,13 +52,13 @@ typedef struct nvpair nvpair_t; #define NV_FLAG_IN_ARRAY 0x100 #ifdef _KERNEL -#define nv_malloc(size) malloc((size), M_NVLIST, M_WAITOK) +#define nv_malloc(size) malloc((size), M_NVLIST, M_NOWAIT) #define nv_calloc(n, size) mallocarray((n), (size), M_NVLIST, \ - M_WAITOK | M_ZERO) + M_NOWAIT | M_ZERO) #define nv_realloc(buf, size) realloc((buf), (size), M_NVLIST, \ - M_WAITOK) + M_NOWAIT) #define nv_free(buf) free((buf), M_NVLIST) -#define nv_strdup(buf) strdup((buf), M_NVLIST) +#define nv_strdup(buf) strdup_flags((buf), M_NVLIST, M_NOWAIT) #define nv_vasprintf(ptr, ...) vasprintf(ptr, M_NVLIST, __VA_ARGS__) #define ERRNO_SET(var) do { } while (0) From owner-dev-commits-src-branches@freebsd.org Wed Apr 14 13:21:04 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 F00A75D8A66; Wed, 14 Apr 2021 13:21:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FL35D6XPxz3FZw; Wed, 14 Apr 2021 13:21:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D33BC1E983; Wed, 14 Apr 2021 13:21:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13EDL4EQ043077; Wed, 14 Apr 2021 13:21:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13EDL4H7043076; Wed, 14 Apr 2021 13:21:04 GMT (envelope-from git) Date: Wed, 14 Apr 2021 13:21:04 GMT Message-Id: <202104141321.13EDL4H7043076@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: f28241ca1341 - stable/13 - Remove more remnants of sio(4) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f28241ca1341aba66ef31cce82f1c8451300026d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2021 13:21:05 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f28241ca1341aba66ef31cce82f1c8451300026d commit f28241ca1341aba66ef31cce82f1c8451300026d Author: Mark Johnston AuthorDate: 2021-04-07 18:21:07 +0000 Commit: Mark Johnston CommitDate: 2021-04-14 13:19:49 +0000 Remove more remnants of sio(4) Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29626 (cherry picked from commit 0f07c234ca1d3ccce158bb68c03829a266942c6e) --- sys/amd64/amd64/machdep.c | 22 ---------------------- sys/isa/isavar.h | 1 - sys/kern/subr_witness.c | 1 - sys/x86/isa/atpic.c | 15 --------------- 4 files changed, 39 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index a21a93610e51..458d700a21e0 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -959,28 +959,6 @@ ssdtosyssd(ssd, sd) sd->sd_gran = ssd->ssd_gran; } -#if !defined(DEV_ATPIC) && defined(DEV_ISA) -#include -#include -/* - * Return a bitmap of the current interrupt requests. This is 8259-specific - * and is only suitable for use at probe time. - * This is only here to pacify sio. It is NOT FATAL if this doesn't work. - * It shouldn't be here. There should probably be an APIC centric - * implementation in the apic driver code, if at all. - */ -intrmask_t -isa_irq_pending(void) -{ - u_char irr1; - u_char irr2; - - irr1 = inb(IO_ICU1); - irr2 = inb(IO_ICU2); - return ((irr2 << 8) | irr1); -} -#endif - u_int basemem; static int diff --git a/sys/isa/isavar.h b/sys/isa/isavar.h index d95a9c1ab3f2..81ba280da457 100644 --- a/sys/isa/isavar.h +++ b/sys/isa/isavar.h @@ -168,7 +168,6 @@ ISA_ACCESSOR(pnpbios_handle, PNPBIOS_HANDLE, int) /* Device class for ISA bridges. */ extern devclass_t isab_devclass; -extern intrmask_t isa_irq_pending(void); extern void isa_probe_children(device_t dev); void isa_dmacascade(int chan); diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index 7e21db5d7c91..c849a191bf16 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -664,7 +664,6 @@ static struct witness_order_list_entry order_lists[] = { { "ap boot", &lock_class_mtx_spin }, #endif { "rm.mutex_mtx", &lock_class_mtx_spin }, - { "sio", &lock_class_mtx_spin }, #ifdef __i386__ { "cy", &lock_class_mtx_spin }, #endif diff --git a/sys/x86/isa/atpic.c b/sys/x86/isa/atpic.c index bb902610b0f4..07d63b041d0b 100644 --- a/sys/x86/isa/atpic.c +++ b/sys/x86/isa/atpic.c @@ -591,21 +591,6 @@ atpic_attach(device_t dev) return (0); } -/* - * Return a bitmap of the current interrupt requests. This is 8259-specific - * and is only suitable for use at probe time. - */ -intrmask_t -isa_irq_pending(void) -{ - u_char irr1; - u_char irr2; - - irr1 = inb(IO_ICU1); - irr2 = inb(IO_ICU2); - return ((irr2 << 8) | irr1); -} - static device_method_t atpic_methods[] = { /* Device interface */ DEVMETHOD(device_probe, atpic_probe), From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 12:43:30 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 018545EE630; Thu, 15 Apr 2021 12:43:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLfCP6c7Sz3qZQ; Thu, 15 Apr 2021 12:43:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D5C2B11735; Thu, 15 Apr 2021 12:43:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FChThf007078; Thu, 15 Apr 2021 12:43:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FChT0S007077; Thu, 15 Apr 2021 12:43:29 GMT (envelope-from git) Date: Thu, 15 Apr 2021 12:43:29 GMT Message-Id: <202104151243.13FChT0S007077@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 1d51d41519f3 - stable/13 - sed(1): Add a reference for a 4.4BSD manual document MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1d51d41519f3fce786c2fe64e55cf95c39475c70 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 12:43:30 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1d51d41519f3fce786c2fe64e55cf95c39475c70 commit 1d51d41519f3fce786c2fe64e55cf95c39475c70 Author: Gordon Bergling AuthorDate: 2021-04-08 18:57:14 +0000 Commit: Gordon Bergling CommitDate: 2021-04-15 12:43:10 +0000 sed(1): Add a reference for a 4.4BSD manual document Obtained from: OpenBSD (cherry picked from commit 9048d9a933f57991ee042618ab89dd49d8cbad89) --- share/man/man9/mbuf.9 | 11 ++++++++++- usr.bin/sed/sed.1 | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/share/man/man9/mbuf.9 b/share/man/man9/mbuf.9 index 9089ab56d58c..f6361cdc7c06 100644 --- a/share/man/man9/mbuf.9 +++ b/share/man/man9/mbuf.9 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 28, 2021 +.Dd April 8, 2021 .Dt MBUF 9 .Os .\" @@ -1216,6 +1216,15 @@ See above. .Sh SEE ALSO .Xr ifnet 9 , .Xr mbuf_tags 9 +.Rs +.\" 4.4BSD SMM:18 +.%A S. J. Leffler +.%A W. N. Joy +.%A R. S. Fabry +.%A M. J. Karels +.%T Networking Implementation Notes +.%B 4.4BSD System Manager's Manual (SMM) +.Re .Sh HISTORY .\" Please correct me if I'm wrong .Vt Mbufs diff --git a/usr.bin/sed/sed.1 b/usr.bin/sed/sed.1 index 10a625825c6a..04c1b46fc5b4 100644 --- a/usr.bin/sed/sed.1 +++ b/usr.bin/sed/sed.1 @@ -31,7 +31,7 @@ .\" @(#)sed.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd June 10, 2020 +.Dd April 8, 2021 .Dt SED 1 .Os .Sh NAME @@ -629,6 +629,15 @@ sed -i '' -e 's/foo/bar/g' test.txt .Xr grep 1 , .Xr regex 3 , .Xr re_format 7 +.Rs +.\" 4.4BSD USD:15 +.%A Lee E. McMahon +.%I AT&T Bell Laboratories +.%T SED \(em A Non-interactive Text Editor +.%R Computing Science Technical Report +.%N 77 +.%D January 1979 +.Re .Sh STANDARDS The .Nm From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 12:43:57 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 DCFEF5EE5A7; Thu, 15 Apr 2021 12:43:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLfCx5y4fz3qrC; Thu, 15 Apr 2021 12:43:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF37211A9F; Thu, 15 Apr 2021 12:43:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FChvh6007230; Thu, 15 Apr 2021 12:43:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FChvAu007229; Thu, 15 Apr 2021 12:43:57 GMT (envelope-from git) Date: Thu, 15 Apr 2021 12:43:57 GMT Message-Id: <202104151243.13FChvAu007229@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: f2950759b88d - stable/13 - m4(1): Add a SEE ALSO section and reference an AT&T manual MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f2950759b88dbbd252a184978e9060ec06841c5e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 12:43:57 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=f2950759b88dbbd252a184978e9060ec06841c5e commit f2950759b88dbbd252a184978e9060ec06841c5e Author: Gordon Bergling AuthorDate: 2021-04-08 19:16:54 +0000 Commit: Gordon Bergling CommitDate: 2021-04-15 12:43:43 +0000 m4(1): Add a SEE ALSO section and reference an AT&T manual Obtained from: OpenBSD (cherry picked from commit 97fa288a663dfae192c471ec5cbfdf0d2f45367e) --- usr.bin/m4/m4.1 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/usr.bin/m4/m4.1 b/usr.bin/m4/m4.1 index 6b5dbd99331c..83f124dd3dfc 100644 --- a/usr.bin/m4/m4.1 +++ b/usr.bin/m4/m4.1 @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd $Mdocdate: June 15 2017 $ +.Dd April 8, 2021 .Dt M4 1 .Os .Sh NAME @@ -455,6 +455,17 @@ But note that the macro can modify the exit status, as can the .Fl E flag. +.Sh SEE ALSO +.Rs +.\" 4.4BSD PSD:17 +.%A B. W. Kernighan +.%A D. M. Ritchie +.%I AT&T Bell Laboratories +.%T The M4 Macro Processor +.%R Computing Science Technical Report +.%N 59 +.%D July 1977 +.Re .Sh STANDARDS The .Nm From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 12:45:41 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 542625EE566; Thu, 15 Apr 2021 12:45:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLfFx1VhKz3qvG; Thu, 15 Apr 2021 12:45:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A555113EB; Thu, 15 Apr 2021 12:45:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FCjerA007465; Thu, 15 Apr 2021 12:45:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FCjei1007464; Thu, 15 Apr 2021 12:45:40 GMT (envelope-from git) Date: Thu, 15 Apr 2021 12:45:40 GMT Message-Id: <202104151245.13FCjei1007464@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 732f3191b4af - stable/12 - m4(1): Add a SEE ALSO section and reference an AT&T manual MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 732f3191b4af23b71cb9c1f27002651bb79b846c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 12:45:41 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=732f3191b4af23b71cb9c1f27002651bb79b846c commit 732f3191b4af23b71cb9c1f27002651bb79b846c Author: Gordon Bergling AuthorDate: 2021-04-08 19:16:54 +0000 Commit: Gordon Bergling CommitDate: 2021-04-15 12:45:23 +0000 m4(1): Add a SEE ALSO section and reference an AT&T manual Obtained from: OpenBSD (cherry picked from commit 97fa288a663dfae192c471ec5cbfdf0d2f45367e) --- usr.bin/m4/m4.1 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/usr.bin/m4/m4.1 b/usr.bin/m4/m4.1 index 6b5dbd99331c..83f124dd3dfc 100644 --- a/usr.bin/m4/m4.1 +++ b/usr.bin/m4/m4.1 @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd $Mdocdate: June 15 2017 $ +.Dd April 8, 2021 .Dt M4 1 .Os .Sh NAME @@ -455,6 +455,17 @@ But note that the macro can modify the exit status, as can the .Fl E flag. +.Sh SEE ALSO +.Rs +.\" 4.4BSD PSD:17 +.%A B. W. Kernighan +.%A D. M. Ritchie +.%I AT&T Bell Laboratories +.%T The M4 Macro Processor +.%R Computing Science Technical Report +.%N 59 +.%D July 1977 +.Re .Sh STANDARDS The .Nm From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 13:28:09 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 695855EFF1D; Thu, 15 Apr 2021 13:28:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLgBx2b0tz3t18; Thu, 15 Apr 2021 13:28:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4BCAE11DFF; Thu, 15 Apr 2021 13:28:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FDS9Ki060975; Thu, 15 Apr 2021 13:28:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FDS9hZ060974; Thu, 15 Apr 2021 13:28:09 GMT (envelope-from git) Date: Thu, 15 Apr 2021 13:28:09 GMT Message-Id: <202104151328.13FDS9hZ060974@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Nathan Whitehorn Subject: git: a93b45d61516 - stable/13 - Delete memstick images for PowerPC. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nwhitehorn X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a93b45d6151675d2c03fb2e42c5fff57d7bbf308 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 13:28:09 -0000 The branch stable/13 has been updated by nwhitehorn: URL: https://cgit.FreeBSD.org/src/commit/?id=a93b45d6151675d2c03fb2e42c5fff57d7bbf308 commit a93b45d6151675d2c03fb2e42c5fff57d7bbf308 Author: Nathan Whitehorn AuthorDate: 2021-02-24 03:17:20 +0000 Commit: Nathan Whitehorn CommitDate: 2021-04-15 13:27:21 +0000 Delete memstick images for PowerPC. These images only ever worked on Apple Powermacs, which are now a very old platform, and did so only for a very loose definition of "worked" (they booted on a small subset of supported machines). Moreover, all the machines they *did* boot on also would boot from a memstick made by dd'ing an CD image to a flash drive. Since a flash drive prepared in this way would also boot all the newer systems we support, the memstick images were strictly less functional than the CD images, even for booting from memory sticks. Reviewed by: jhibbits MFC after: 1 week (cherry picked from commit 1af48800c20fadb07acca2ab930bb3bccd363edb) --- release/powerpc/make-memstick.sh | 50 ---------------------------------------- 1 file changed, 50 deletions(-) diff --git a/release/powerpc/make-memstick.sh b/release/powerpc/make-memstick.sh deleted file mode 100755 index 75a86a73e206..000000000000 --- a/release/powerpc/make-memstick.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -# -# This script generates a "memstick image" (image that can be copied to a -# USB memory stick) from a directory tree. Note that the script does not -# clean up after itself very well for error conditions on purpose so the -# problem can be diagnosed (full filesystem most likely but ...). -# -# Usage: make-memstick.sh -# -# $FreeBSD$ -# - -set -e - -PATH=/bin:/usr/bin:/sbin:/usr/sbin -export PATH - -BLOCKSIZE=10240 - -if [ $# -ne 2 ]; then - echo "make-memstick.sh /path/to/directory /path/to/image/file" - exit 1 -fi - -tempfile="${2}.$$" - -if [ ! -d ${1} ]; then - echo "${1} must be a directory" - exit 1 -fi - -if [ -e ${2} ]; then - echo "won't overwrite ${2}" - exit 1 -fi - -echo '/dev/da0s3 / ufs ro,noatime 1 1' > ${1}/etc/fstab -echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local -rm -f ${tempfile} -makefs -B big -o version=2 ${tempfile} ${1} -rm ${1}/etc/fstab -rm ${1}/etc/rc.conf.local - -mkimg -s apm \ - -p freebsd-boot:=${1}/boot/boot1.hfs \ - -p freebsd-ufs/FreeBSD_Install:=${tempfile} \ - -o ${2} - -rm -f ${tempfile} - From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 13:28:10 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 91EF45EFF86; Thu, 15 Apr 2021 13:28:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLgBy3LZNz3sh2; Thu, 15 Apr 2021 13:28:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 602401204B; Thu, 15 Apr 2021 13:28:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FDSAuA060996; Thu, 15 Apr 2021 13:28:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FDSA0X060995; Thu, 15 Apr 2021 13:28:10 GMT (envelope-from git) Date: Thu, 15 Apr 2021 13:28:10 GMT Message-Id: <202104151328.13FDSA0X060995@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Nathan Whitehorn Subject: git: ccaa830e1720 - stable/13 - Add GPT PREP-boot type to mkimg(1) from geom_gpt. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nwhitehorn X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ccaa830e1720b05a1c6c306ff3a8724d15dfd485 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 13:28:10 -0000 The branch stable/13 has been updated by nwhitehorn: URL: https://cgit.FreeBSD.org/src/commit/?id=ccaa830e1720b05a1c6c306ff3a8724d15dfd485 commit ccaa830e1720b05a1c6c306ff3a8724d15dfd485 Author: Nathan Whitehorn AuthorDate: 2021-02-24 15:31:44 +0000 Commit: Nathan Whitehorn CommitDate: 2021-04-15 13:27:41 +0000 Add GPT PREP-boot type to mkimg(1) from geom_gpt. This partition type can be used to boot some PowerKVM VMs. We don't support it well because of some limitations in SLOF, but it's worth at least have feature parity in geom and mkimg. (cherry picked from commit f7aebfbe5c0ab63dbb3d134d143ccff2c2b278bb) --- usr.bin/mkimg/gpt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/mkimg/gpt.c b/usr.bin/mkimg/gpt.c index b386ef6bc208..a071fbfac272 100644 --- a/usr.bin/mkimg/gpt.c +++ b/usr.bin/mkimg/gpt.c @@ -51,6 +51,7 @@ static mkimg_uuid_t gpt_uuid_freebsd_vinum = GPT_ENT_TYPE_FREEBSD_VINUM; static mkimg_uuid_t gpt_uuid_freebsd_zfs = GPT_ENT_TYPE_FREEBSD_ZFS; static mkimg_uuid_t gpt_uuid_mbr = GPT_ENT_TYPE_MBR; static mkimg_uuid_t gpt_uuid_ms_basic_data = GPT_ENT_TYPE_MS_BASIC_DATA; +static mkimg_uuid_t gpt_uuid_prep_boot = GPT_ENT_TYPE_PREP_BOOT; static struct mkimg_alias gpt_aliases[] = { { ALIAS_EFI, ALIAS_PTR2TYPE(&gpt_uuid_efi) }, @@ -63,6 +64,7 @@ static struct mkimg_alias gpt_aliases[] = { { ALIAS_FREEBSD_ZFS, ALIAS_PTR2TYPE(&gpt_uuid_freebsd_zfs) }, { ALIAS_MBR, ALIAS_PTR2TYPE(&gpt_uuid_mbr) }, { ALIAS_NTFS, ALIAS_PTR2TYPE(&gpt_uuid_ms_basic_data) }, + { ALIAS_PPCBOOT, ALIAS_PTR2TYPE(&gpt_uuid_prep_boot) }, { ALIAS_NONE, 0 } /* Keep last! */ }; From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 13:48:27 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 218935F0966; Thu, 15 Apr 2021 13:48:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLgfM0TW1z3txy; Thu, 15 Apr 2021 13:48:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0388F12633; Thu, 15 Apr 2021 13:48:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FDmQUE087898; Thu, 15 Apr 2021 13:48:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FDmQCF087897; Thu, 15 Apr 2021 13:48:26 GMT (envelope-from git) Date: Thu, 15 Apr 2021 13:48:26 GMT Message-Id: <202104151348.13FDmQCF087897@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 6f19077eaf50 - stable/13 - powernv: Include NUMA locality information in the CPU topology MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6f19077eaf5087ca1a8f755a30ccf30804bf59b7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 13:48:27 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6f19077eaf5087ca1a8f755a30ccf30804bf59b7 commit 6f19077eaf5087ca1a8f755a30ccf30804bf59b7 Author: Mark Johnston AuthorDate: 2021-04-01 14:25:57 +0000 Commit: Mark Johnston CommitDate: 2021-04-15 13:44:03 +0000 powernv: Include NUMA locality information in the CPU topology ULE uses this topology to try and preserve locality when migrating threads between CPUs and when performing work stealing. Ensure that on NUMA systems it will at least take the NUMA topology into account. Reviewed by: bdragon, jhibbits (previous version) Tested by: bdragon Differential Revision: https://reviews.freebsd.org/D28580 (cherry picked from commit cb5f8694a522ab9a80f9f0bd321d8f3ed818dd9b) --- sys/powerpc/powernv/platform_powernv.c | 66 +++++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 8 deletions(-) diff --git a/sys/powerpc/powernv/platform_powernv.c b/sys/powerpc/powernv/platform_powernv.c index d7acc544c2ed..8c7da5c257ee 100644 --- a/sys/powerpc/powernv/platform_powernv.c +++ b/sys/powerpc/powernv/platform_powernv.c @@ -480,22 +480,72 @@ powernv_smp_probe_threads(platform_t plat) mp_ncores = mp_ncpus / nthreads; } +static struct cpu_group * +cpu_group_init(struct cpu_group *group, struct cpu_group *parent, + const cpuset_t *cpus, int children, int level, int flags) +{ + struct cpu_group *child; + + child = children != 0 ? smp_topo_alloc(children) : NULL; + + group->cg_parent = parent; + group->cg_child = child; + CPU_COPY(cpus, &group->cg_mask); + group->cg_count = CPU_COUNT(cpus); + group->cg_children = children; + group->cg_level = level; + group->cg_flags = flags; + + return (child); +} + static struct cpu_group * powernv_smp_topo(platform_t plat) { + struct cpu_group *core, *dom, *root; + cpuset_t corecpus, domcpus; + int cpuid, i, j, k, ncores; + if (mp_ncpus % smp_threads_per_core != 0) { - printf("WARNING: Irregular SMP topology. Performance may be " - "suboptimal (%d threads, %d on first core)\n", - mp_ncpus, smp_threads_per_core); + printf("%s: irregular SMP topology (%d threads, %d per core)\n", + __func__, mp_ncpus, smp_threads_per_core); return (smp_topo_none()); } - /* Don't do anything fancier for non-threaded SMP */ - if (smp_threads_per_core == 1) - return (smp_topo_none()); + root = smp_topo_alloc(1); + dom = cpu_group_init(root, NULL, &all_cpus, vm_ndomains, CG_SHARE_NONE, + 0); + + /* + * Redundant layers will be collapsed by the caller so we don't need a + * special case for a single domain. + */ + for (i = 0; i < vm_ndomains; i++, dom++) { + CPU_COPY(&cpuset_domain[i], &domcpus); + ncores = CPU_COUNT(&domcpus) / smp_threads_per_core; + KASSERT(CPU_COUNT(&domcpus) % smp_threads_per_core == 0, + ("%s: domain %d core count not divisible by thread count", + __func__, i)); + + core = cpu_group_init(dom, root, &domcpus, ncores, CG_SHARE_L3, + 0); + for (j = 0; j < ncores; j++, core++) { + /* + * Assume that consecutive CPU IDs correspond to sibling + * threads. + */ + CPU_ZERO(&corecpus); + for (k = 0; k < smp_threads_per_core; k++) { + cpuid = CPU_FFS(&domcpus) - 1; + CPU_CLR(cpuid, &domcpus); + CPU_SET(cpuid, &corecpus); + } + (void)cpu_group_init(core, dom, &corecpus, 0, + CG_SHARE_L1, CG_FLAG_SMT); + } + } - return (smp_topo_1level(CG_SHARE_L1, smp_threads_per_core, - CG_FLAG_SMT)); + return (root); } #endif From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 17:25:18 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 8BC785F79CF; Thu, 15 Apr 2021 17:25:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLmSZ3WxRz4d3R; Thu, 15 Apr 2021 17:25:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6BC5C1562B; Thu, 15 Apr 2021 17:25:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FHPInu083222; Thu, 15 Apr 2021 17:25:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FHPIQt083221; Thu, 15 Apr 2021 17:25:18 GMT (envelope-from git) Date: Thu, 15 Apr 2021 17:25:18 GMT Message-Id: <202104151725.13FHPIQt083221@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 7abb639572d8 - stable/13 - Avoid -pedantic warnings about using _Generic in __fp_type_select MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7abb639572d847d4c5ff134f4441cb39447b3c9c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 17:25:18 -0000 The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=7abb639572d847d4c5ff134f4441cb39447b3c9c commit 7abb639572d847d4c5ff134f4441cb39447b3c9c Author: Dimitry Andric AuthorDate: 2021-04-08 11:13:15 +0000 Commit: Dimitry Andric CommitDate: 2021-04-15 16:51:08 +0000 Avoid -pedantic warnings about using _Generic in __fp_type_select When compiling parts of math.h with clang using a C standard before C11, and using -pedantic, it will result in warnings similar to: bug254714.c:5:11: warning: '_Generic' is a C11 extension [-Wc11-extensions] return !isfinite(1.0); ^ /usr/include/math.h:111:21: note: expanded from macro 'isfinite' ^ /usr/include/math.h:82:39: note: expanded from macro '__fp_type_select' ^ This is because the block that enables use of _Generic is conditional not only on C11, but also on whether the compiler advertises support for C generic selections via __has_extension(c_generic_selections). To work around the warning without having to pessimize the code, use the __extension__ keyword, which is supported by both clang and gcc. While here, remove the check for __clang__, as _Generic has been supported for a long time by gcc too now. Reported by: yuri PR: 254714 --- lib/msun/src/math.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/msun/src/math.h b/lib/msun/src/math.h index fee69498708a..8156094313e4 100644 --- a/lib/msun/src/math.h +++ b/lib/msun/src/math.h @@ -77,9 +77,8 @@ extern const union __nan_un { #define FP_SUBNORMAL 0x08 #define FP_ZERO 0x10 -#if (__STDC_VERSION__ >= 201112L && defined(__clang__)) || \ - __has_extension(c_generic_selections) -#define __fp_type_select(x, f, d, ld) _Generic((x), \ +#if __STDC_VERSION__ >= 201112L || __has_extension(c_generic_selections) +#define __fp_type_select(x, f, d, ld) __extension__ _Generic((x), \ float: f(x), \ double: d(x), \ long double: ld(x), \ From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 17:25:43 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 41EED5F767F; Thu, 15 Apr 2021 17:25:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLmT2757Kz4d83; Thu, 15 Apr 2021 17:25:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E6A1D155EA; Thu, 15 Apr 2021 17:25:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FHPgOw083369; Thu, 15 Apr 2021 17:25:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FHPghH083368; Thu, 15 Apr 2021 17:25:42 GMT (envelope-from git) Date: Thu, 15 Apr 2021 17:25:42 GMT Message-Id: <202104151725.13FHPghH083368@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 81c5f1451c4e - stable/12 - Avoid -pedantic warnings about using _Generic in __fp_type_select MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 81c5f1451c4e2221413a9b05aadcfd74a1182848 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 17:25:43 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=81c5f1451c4e2221413a9b05aadcfd74a1182848 commit 81c5f1451c4e2221413a9b05aadcfd74a1182848 Author: Dimitry Andric AuthorDate: 2021-04-08 11:13:15 +0000 Commit: Dimitry Andric CommitDate: 2021-04-15 16:50:56 +0000 Avoid -pedantic warnings about using _Generic in __fp_type_select When compiling parts of math.h with clang using a C standard before C11, and using -pedantic, it will result in warnings similar to: bug254714.c:5:11: warning: '_Generic' is a C11 extension [-Wc11-extensions] return !isfinite(1.0); ^ /usr/include/math.h:111:21: note: expanded from macro 'isfinite' ^ /usr/include/math.h:82:39: note: expanded from macro '__fp_type_select' ^ This is because the block that enables use of _Generic is conditional not only on C11, but also on whether the compiler advertises support for C generic selections via __has_extension(c_generic_selections). To work around the warning without having to pessimize the code, use the __extension__ keyword, which is supported by both clang and gcc. While here, remove the check for __clang__, as _Generic has been supported for a long time by gcc too now. Reported by: yuri PR: 254714 --- lib/msun/src/math.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/msun/src/math.h b/lib/msun/src/math.h index 6ce45cbb5280..2a42c14c6cc2 100644 --- a/lib/msun/src/math.h +++ b/lib/msun/src/math.h @@ -77,9 +77,8 @@ extern const union __nan_un { #define FP_SUBNORMAL 0x08 #define FP_ZERO 0x10 -#if (__STDC_VERSION__ >= 201112L && defined(__clang__)) || \ - __has_extension(c_generic_selections) -#define __fp_type_select(x, f, d, ld) _Generic((x), \ +#if __STDC_VERSION__ >= 201112L || __has_extension(c_generic_selections) +#define __fp_type_select(x, f, d, ld) __extension__ _Generic((x), \ float: f(x), \ double: d(x), \ long double: ld(x), \ From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 17:26:38 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 A82EB5F7A64; Thu, 15 Apr 2021 17:26:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLmV64Pzwz4dHj; Thu, 15 Apr 2021 17:26:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 89E3C1580A; Thu, 15 Apr 2021 17:26:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FHQcRB083686; Thu, 15 Apr 2021 17:26:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FHQc1f083685; Thu, 15 Apr 2021 17:26:38 GMT (envelope-from git) Date: Thu, 15 Apr 2021 17:26:38 GMT Message-Id: <202104151726.13FHQc1f083685@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: b582d1422b4d - stable/11 - Avoid -pedantic warnings about using _Generic in __fp_type_select MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: b582d1422b4db6c22ff061a32257a83405d06cc9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 17:26:38 -0000 The branch stable/11 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=b582d1422b4db6c22ff061a32257a83405d06cc9 commit b582d1422b4db6c22ff061a32257a83405d06cc9 Author: Dimitry Andric AuthorDate: 2021-04-08 11:13:15 +0000 Commit: Dimitry Andric CommitDate: 2021-04-15 10:24:28 +0000 Avoid -pedantic warnings about using _Generic in __fp_type_select When compiling parts of math.h with clang using a C standard before C11, and using -pedantic, it will result in warnings similar to: bug254714.c:5:11: warning: '_Generic' is a C11 extension [-Wc11-extensions] return !isfinite(1.0); ^ /usr/include/math.h:111:21: note: expanded from macro 'isfinite' ^ /usr/include/math.h:82:39: note: expanded from macro '__fp_type_select' ^ This is because the block that enables use of _Generic is conditional not only on C11, but also on whether the compiler advertises support for C generic selections via __has_extension(c_generic_selections). To work around the warning without having to pessimize the code, use the __extension__ keyword, which is supported by both clang and gcc. While here, remove the check for __clang__, as _Generic has been supported for a long time by gcc too now. Reported by: yuri PR: 254714 --- lib/msun/src/math.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/msun/src/math.h b/lib/msun/src/math.h index 6ce45cbb5280..2a42c14c6cc2 100644 --- a/lib/msun/src/math.h +++ b/lib/msun/src/math.h @@ -77,9 +77,8 @@ extern const union __nan_un { #define FP_SUBNORMAL 0x08 #define FP_ZERO 0x10 -#if (__STDC_VERSION__ >= 201112L && defined(__clang__)) || \ - __has_extension(c_generic_selections) -#define __fp_type_select(x, f, d, ld) _Generic((x), \ +#if __STDC_VERSION__ >= 201112L || __has_extension(c_generic_selections) +#define __fp_type_select(x, f, d, ld) __extension__ _Generic((x), \ float: f(x), \ double: d(x), \ long double: ld(x), \ From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 17:27:14 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 D71975F7BD6; Thu, 15 Apr 2021 17:27:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLmVp5mJ3z4dGf; Thu, 15 Apr 2021 17:27:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8F74156BB; Thu, 15 Apr 2021 17:27:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FHREm1084004; Thu, 15 Apr 2021 17:27:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FHREks084003; Thu, 15 Apr 2021 17:27:14 GMT (envelope-from git) Date: Thu, 15 Apr 2021 17:27:14 GMT Message-Id: <202104151727.13FHREks084003@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 74b123c0a5ec - stable/10 - Avoid -pedantic warnings about using _Generic in __fp_type_select MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/10 X-Git-Reftype: branch X-Git-Commit: 74b123c0a5ecfe2081c47de98820cdfabb64024d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 17:27:14 -0000 The branch stable/10 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=74b123c0a5ecfe2081c47de98820cdfabb64024d commit 74b123c0a5ecfe2081c47de98820cdfabb64024d Author: Dimitry Andric AuthorDate: 2021-04-08 11:13:15 +0000 Commit: Dimitry Andric CommitDate: 2021-04-15 10:26:48 +0000 Avoid -pedantic warnings about using _Generic in __fp_type_select When compiling parts of math.h with clang using a C standard before C11, and using -pedantic, it will result in warnings similar to: bug254714.c:5:11: warning: '_Generic' is a C11 extension [-Wc11-extensions] return !isfinite(1.0); ^ /usr/include/math.h:111:21: note: expanded from macro 'isfinite' ^ /usr/include/math.h:82:39: note: expanded from macro '__fp_type_select' ^ This is because the block that enables use of _Generic is conditional not only on C11, but also on whether the compiler advertises support for C generic selections via __has_extension(c_generic_selections). To work around the warning without having to pessimize the code, use the __extension__ keyword, which is supported by both clang and gcc. While here, remove the check for __clang__, as _Generic has been supported for a long time by gcc too now. Reported by: yuri PR: 254714 --- lib/msun/src/math.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/msun/src/math.h b/lib/msun/src/math.h index ae5286717146..a7a8994e6fb6 100644 --- a/lib/msun/src/math.h +++ b/lib/msun/src/math.h @@ -81,9 +81,8 @@ extern const union __nan_un { #define FP_SUBNORMAL 0x08 #define FP_ZERO 0x10 -#if (__STDC_VERSION__ >= 201112L && defined(__clang__)) || \ - __has_extension(c_generic_selections) -#define __fp_type_select(x, f, d, ld) _Generic((x), \ +#if __STDC_VERSION__ >= 201112L || __has_extension(c_generic_selections) +#define __fp_type_select(x, f, d, ld) __extension__ _Generic((x), \ float: f(x), \ double: d(x), \ long double: ld(x), \ From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 18:44:53 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 82EDF5D2565; Thu, 15 Apr 2021 18:44:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLpDP3HWTz4j1m; Thu, 15 Apr 2021 18:44:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 63BE21689F; Thu, 15 Apr 2021 18:44:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FIirNn090522; Thu, 15 Apr 2021 18:44:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FIiruL090521; Thu, 15 Apr 2021 18:44:53 GMT (envelope-from git) Date: Thu, 15 Apr 2021 18:44:53 GMT Message-Id: <202104151844.13FIiruL090521@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: bda3bf09d82d - stable/13 - Avoid raising unexpected floating point exceptions in libm MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bda3bf09d82daf4352691a7b3a5b0e1cff66a5fd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 18:44:53 -0000 The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=bda3bf09d82daf4352691a7b3a5b0e1cff66a5fd commit bda3bf09d82daf4352691a7b3a5b0e1cff66a5fd Author: Dimitry Andric AuthorDate: 2021-04-09 23:07:54 +0000 Commit: Dimitry Andric CommitDate: 2021-04-15 18:33:54 +0000 Avoid raising unexpected floating point exceptions in libm When using clang with x86_64 CPUs that support AVX, some floating point transformations may raise exceptions that would not have been raised by the original code. To avoid this, use the -fp-exception-behavior=maytrap flag, introduced in clang 10.0.0. In particular, this fixes a number of test failures with ctanhf(3) and ctanf(3), when libm is compiled with -mavx. An unexpected FE_INVALID exception is then raised, because clang emits vdivps instructions to perform certain divides. (The vdivps instruction operates on multiple single-precision float operands simultaneously, but the exceptions may be influenced by unused parts of the XMM registers. In this particular case, it was calculating 0 / 0, which results in FE_INVALID.) If -fp-exception-behavior=maytrap is specified however, clang uses vdivss instructions instead, which work on one operand, and should not raise unexpected exceptions. Reported by: olivier Reviewed by: arichardson PR: 254911 Differential Revision: https://reviews.freebsd.org/D29686 (cherry picked from commit 3b00222f156dca5700c839d73e36daf479fa640c) Only use -fp-exception-behavior=maytrap on x86, for now After 3b00222f156d, it turns out that clang only supports strict floating point semantics for SystemZ and x86 at the moment, while for other architectures it is still experimental. Therefore, only use -fp-exception-behavior=maytrap on x86 for now, otherwise this option results in "error: overriding currently unsupported use of floating point exceptions on this target [-Werror,-Wunsupported-floating-point-opt]" on other architectures. Fixes: 3b00222f156d PR: 254911 (cherry picked from commit bae9fd0b33462e9506c3ac3400089c6dbc4aee8f) --- lib/msun/Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/msun/Makefile b/lib/msun/Makefile index 4491bc216a4c..0a486bb5a086 100644 --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -34,6 +34,17 @@ CFLAGS+= -I${.CURDIR}/ld128 CFLAGS+= -I${.CURDIR}/${ARCH_SUBDIR} +.include +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 100000 && \ + (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386") +# When using clang with x86_64 CPUs that support AVX, some floating point +# transformations may raise exceptions that would not have been raised by the +# original code. To avoid this, use the -fp-exception-behavior=maytrap flag, +# introduced in clang 10.0.0. +# See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254911 +CFLAGS+= -ffp-exception-behavior=maytrap +.endif + .PATH: ${.CURDIR}/bsdsrc .PATH: ${.CURDIR}/src .PATH: ${.CURDIR}/man @@ -113,7 +124,6 @@ COMMON_SRCS+= catrigl.c \ # 'long double' [-Werror=overflow] # if( y >= LDBL_MAX ) # See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=130067 -.include .if ${COMPILER_TYPE} == "gcc" CFLAGS.e_powl.c+= -Wno-error=overflow .endif From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 18:45:43 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 AF8055D278F; Thu, 15 Apr 2021 18:45:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLpFM4bTkz4j5L; Thu, 15 Apr 2021 18:45:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 903431645F; Thu, 15 Apr 2021 18:45:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FIjhUt090712; Thu, 15 Apr 2021 18:45:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FIjhAT090711; Thu, 15 Apr 2021 18:45:43 GMT (envelope-from git) Date: Thu, 15 Apr 2021 18:45:43 GMT Message-Id: <202104151845.13FIjhAT090711@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: f2e38602de89 - stable/12 - Avoid raising unexpected floating point exceptions in libm MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f2e38602de89608b46a3b920fc222fdcf50864dd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 18:45:43 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f2e38602de89608b46a3b920fc222fdcf50864dd commit f2e38602de89608b46a3b920fc222fdcf50864dd Author: Dimitry Andric AuthorDate: 2021-04-09 23:07:54 +0000 Commit: Dimitry Andric CommitDate: 2021-04-15 18:38:49 +0000 Avoid raising unexpected floating point exceptions in libm When using clang with x86_64 CPUs that support AVX, some floating point transformations may raise exceptions that would not have been raised by the original code. To avoid this, use the -fp-exception-behavior=maytrap flag, introduced in clang 10.0.0. In particular, this fixes a number of test failures with ctanhf(3) and ctanf(3), when libm is compiled with -mavx. An unexpected FE_INVALID exception is then raised, because clang emits vdivps instructions to perform certain divides. (The vdivps instruction operates on multiple single-precision float operands simultaneously, but the exceptions may be influenced by unused parts of the XMM registers. In this particular case, it was calculating 0 / 0, which results in FE_INVALID.) If -fp-exception-behavior=maytrap is specified however, clang uses vdivss instructions instead, which work on one operand, and should not raise unexpected exceptions. Reported by: olivier Reviewed by: arichardson PR: 254911 Differential Revision: https://reviews.freebsd.org/D29686 (cherry picked from commit 3b00222f156dca5700c839d73e36daf479fa640c) Only use -fp-exception-behavior=maytrap on x86, for now After 3b00222f156d, it turns out that clang only supports strict floating point semantics for SystemZ and x86 at the moment, while for other architectures it is still experimental. Therefore, only use -fp-exception-behavior=maytrap on x86 for now, otherwise this option results in "error: overriding currently unsupported use of floating point exceptions on this target [-Werror,-Wunsupported-floating-point-opt]" on other architectures. Fixes: 3b00222f156d PR: 254911 (cherry picked from commit bae9fd0b33462e9506c3ac3400089c6dbc4aee8f) --- lib/msun/Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/msun/Makefile b/lib/msun/Makefile index 6c9af4c018c8..d56b33deabea 100644 --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -34,6 +34,17 @@ CFLAGS+= -I${.CURDIR}/ld128 CFLAGS+= -I${.CURDIR}/${ARCH_SUBDIR} +.include +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 100000 && \ + (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386") +# When using clang with x86_64 CPUs that support AVX, some floating point +# transformations may raise exceptions that would not have been raised by the +# original code. To avoid this, use the -fp-exception-behavior=maytrap flag, +# introduced in clang 10.0.0. +# See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254911 +CFLAGS+= -ffp-exception-behavior=maytrap +.endif + .PATH: ${.CURDIR}/bsdsrc .PATH: ${.CURDIR}/src .PATH: ${.CURDIR}/man @@ -113,7 +124,6 @@ COMMON_SRCS+= catrigl.c \ # 'long double' [-Werror=overflow] # if( y >= LDBL_MAX ) # See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=130067 -.include .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60000 CFLAGS.e_powl.c+= -Wno-error=overflow .endif From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 18:52:13 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 C63775D2C09; Thu, 15 Apr 2021 18:52:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLpNs5Jgyz4jWv; Thu, 15 Apr 2021 18:52:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A96641647D; Thu, 15 Apr 2021 18:52:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FIqDFk003663; Thu, 15 Apr 2021 18:52:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FIqDmw003662; Thu, 15 Apr 2021 18:52:13 GMT (envelope-from git) Date: Thu, 15 Apr 2021 18:52:13 GMT Message-Id: <202104151852.13FIqDmw003662@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: e7cc5cda88f0 - stable/11 - libm: squelch -Woverflow from gcc6 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: e7cc5cda88f079b80636aa7f71b0fc671701f77d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 18:52:13 -0000 The branch stable/11 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=e7cc5cda88f079b80636aa7f71b0fc671701f77d commit e7cc5cda88f079b80636aa7f71b0fc671701f77d Author: Eric van Gyzen AuthorDate: 2019-02-01 23:15:54 +0000 Commit: Dimitry Andric CommitDate: 2021-04-15 18:51:18 +0000 libm: squelch -Woverflow from gcc6 Sponsored by: Dell EMC Isilon (cherry picked from commit 50b06886a715d7be052e1742f7d11ce82928f134) --- lib/msun/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/msun/Makefile b/lib/msun/Makefile index 9b72bfa63a71..6ad0e0e5c428 100644 --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -108,6 +108,15 @@ COMMON_SRCS+= catrigl.c \ s_nextafterl.c s_nexttoward.c s_remquol.c s_rintl.c s_roundl.c \ s_scalbnl.c s_sinl.c s_sincosl.c \ s_tanhl.c s_tanl.c s_truncl.c w_cabsl.c +# Work around this warning from gcc 6: +# lib/msun/ld80/e_powl.c:275:1: error: floating constant exceeds range of +# 'long double' [-Werror=overflow] +# if( y >= LDBL_MAX ) +# See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=130067 +.include +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60000 +CFLAGS.e_powl.c+= -Wno-error=overflow +.endif .endif # C99 complex functions From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 18:53:28 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 BFAAE5D28E4; Thu, 15 Apr 2021 18:53:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLpQJ54XPz4jSF; Thu, 15 Apr 2021 18:53:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A0C7A16BA4; Thu, 15 Apr 2021 18:53:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FIrSd0003861; Thu, 15 Apr 2021 18:53:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FIrSH8003860; Thu, 15 Apr 2021 18:53:28 GMT (envelope-from git) Date: Thu, 15 Apr 2021 18:53:28 GMT Message-Id: <202104151853.13FIrSH8003860@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: cabc474b2dc9 - stable/11 - Avoid raising unexpected floating point exceptions in libm MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: cabc474b2dc9c6741b240e454da86a7ff2ff9f9c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 18:53:28 -0000 The branch stable/11 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=cabc474b2dc9c6741b240e454da86a7ff2ff9f9c commit cabc474b2dc9c6741b240e454da86a7ff2ff9f9c Author: Dimitry Andric AuthorDate: 2021-04-09 23:07:54 +0000 Commit: Dimitry Andric CommitDate: 2021-04-15 18:52:57 +0000 Avoid raising unexpected floating point exceptions in libm When using clang with x86_64 CPUs that support AVX, some floating point transformations may raise exceptions that would not have been raised by the original code. To avoid this, use the -fp-exception-behavior=maytrap flag, introduced in clang 10.0.0. In particular, this fixes a number of test failures with ctanhf(3) and ctanf(3), when libm is compiled with -mavx. An unexpected FE_INVALID exception is then raised, because clang emits vdivps instructions to perform certain divides. (The vdivps instruction operates on multiple single-precision float operands simultaneously, but the exceptions may be influenced by unused parts of the XMM registers. In this particular case, it was calculating 0 / 0, which results in FE_INVALID.) If -fp-exception-behavior=maytrap is specified however, clang uses vdivss instructions instead, which work on one operand, and should not raise unexpected exceptions. Reported by: olivier Reviewed by: arichardson PR: 254911 Differential Revision: https://reviews.freebsd.org/D29686 (cherry picked from commit 3b00222f156dca5700c839d73e36daf479fa640c) Only use -fp-exception-behavior=maytrap on x86, for now After 3b00222f156d, it turns out that clang only supports strict floating point semantics for SystemZ and x86 at the moment, while for other architectures it is still experimental. Therefore, only use -fp-exception-behavior=maytrap on x86 for now, otherwise this option results in "error: overriding currently unsupported use of floating point exceptions on this target [-Werror,-Wunsupported-floating-point-opt]" on other architectures. Fixes: 3b00222f156d PR: 254911 (cherry picked from commit bae9fd0b33462e9506c3ac3400089c6dbc4aee8f) --- lib/msun/Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/msun/Makefile b/lib/msun/Makefile index 6ad0e0e5c428..8852439d5b3c 100644 --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -34,6 +34,17 @@ CFLAGS+= -I${.CURDIR}/ld128 CFLAGS+= -I${.CURDIR}/${ARCH_SUBDIR} +.include +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 100000 && \ + (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386") +# When using clang with x86_64 CPUs that support AVX, some floating point +# transformations may raise exceptions that would not have been raised by the +# original code. To avoid this, use the -fp-exception-behavior=maytrap flag, +# introduced in clang 10.0.0. +# See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254911 +CFLAGS+= -ffp-exception-behavior=maytrap +.endif + .PATH: ${.CURDIR}/bsdsrc .PATH: ${.CURDIR}/src .PATH: ${.CURDIR}/man @@ -113,7 +124,6 @@ COMMON_SRCS+= catrigl.c \ # 'long double' [-Werror=overflow] # if( y >= LDBL_MAX ) # See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=130067 -.include .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60000 CFLAGS.e_powl.c+= -Wno-error=overflow .endif From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 19:18:29 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 A0AEF5D392B; Thu, 15 Apr 2021 19:18:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLpz94D4tz4ks1; Thu, 15 Apr 2021 19:18:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8464F16C56; Thu, 15 Apr 2021 19:18:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FJITH2031220; Thu, 15 Apr 2021 19:18:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FJITbv031219; Thu, 15 Apr 2021 19:18:29 GMT (envelope-from git) Date: Thu, 15 Apr 2021 19:18:29 GMT Message-Id: <202104151918.13FJITbv031219@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Yuri Pankov Subject: git: c6dcae2dfa3b - stable/13 - setclassenvironment: trim leading spaces in variable names MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuripv X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c6dcae2dfa3b96edc1fd8bbb6254c48fafbc8cd3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 19:18:29 -0000 The branch stable/13 has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=c6dcae2dfa3b96edc1fd8bbb6254c48fafbc8cd3 commit c6dcae2dfa3b96edc1fd8bbb6254c48fafbc8cd3 Author: Yuri Pankov AuthorDate: 2021-04-11 22:02:12 +0000 Commit: Yuri Pankov CommitDate: 2021-04-15 19:15:51 +0000 setclassenvironment: trim leading spaces in variable names Trim leading spaces in variable names when the list is e.g. pretty-formatted in /etc/login.conf or ~/.login_conf. PR: 247947 Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D25649 (cherry picked from commit eeaf9d562fe137e0c52b8c346742dccfc8bde015) --- lib/libutil/login_class.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c index fd0b232d0a43..38666bc8e3d3 100644 --- a/lib/libutil/login_class.c +++ b/lib/libutil/login_class.c @@ -231,12 +231,17 @@ setclassenvironment(login_cap_t *lc, const struct passwd * pwd, int paths) while (*set_env != NULL) { char *p = strchr(*set_env, '='); - if (p != NULL) { /* Discard invalid entries */ + if (p != NULL && p != *set_env) { /* Discard invalid entries */ + const char *ep; char *np; *p++ = '\0'; + /* Strip leading spaces from variable name */ + ep = *set_env; + while (*ep == ' ' || *ep == '\t') + ep++; if ((np = substvar(p, pwd, hlen, pch, nlen)) != NULL) { - setenv(*set_env, np, 1); + setenv(ep, np, 1); free(np); } } From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 19:22:21 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 D9EAA5D3FD0; Thu, 15 Apr 2021 19:22:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLq3d5r4Sz4lbL; Thu, 15 Apr 2021 19:22:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BB67D172AA; Thu, 15 Apr 2021 19:22:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FJMLCJ043624; Thu, 15 Apr 2021 19:22:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FJMLP6043623; Thu, 15 Apr 2021 19:22:21 GMT (envelope-from git) Date: Thu, 15 Apr 2021 19:22:21 GMT Message-Id: <202104151922.13FJMLP6043623@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Yuri Pankov Subject: git: 913a9cc33ea5 - stable/12 - setclassenvironment: trim leading spaces in variable names MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuripv X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 913a9cc33ea55538f2c3366016f79f4b2a79e3d0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 19:22:21 -0000 The branch stable/12 has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=913a9cc33ea55538f2c3366016f79f4b2a79e3d0 commit 913a9cc33ea55538f2c3366016f79f4b2a79e3d0 Author: Yuri Pankov AuthorDate: 2021-04-11 22:02:12 +0000 Commit: Yuri Pankov CommitDate: 2021-04-15 19:19:43 +0000 setclassenvironment: trim leading spaces in variable names Trim leading spaces in variable names when the list is e.g. pretty-formatted in /etc/login.conf or ~/.login_conf. PR: 247947 Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D25649 (cherry picked from commit eeaf9d562fe137e0c52b8c346742dccfc8bde015) --- lib/libutil/login_class.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c index bd1ddff90111..4925c7a04664 100644 --- a/lib/libutil/login_class.c +++ b/lib/libutil/login_class.c @@ -232,12 +232,17 @@ setclassenvironment(login_cap_t *lc, const struct passwd * pwd, int paths) while (*set_env != NULL) { char *p = strchr(*set_env, '='); - if (p != NULL) { /* Discard invalid entries */ + if (p != NULL && p != *set_env) { /* Discard invalid entries */ + const char *ep; char *np; *p++ = '\0'; + /* Strip leading spaces from variable name */ + ep = *set_env; + while (*ep == ' ' || *ep == '\t') + ep++; if ((np = substvar(p, pwd, hlen, pch, nlen)) != NULL) { - setenv(*set_env, np, 1); + setenv(ep, np, 1); free(np); } } From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 21:38:11 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 C10D05D9495; Thu, 15 Apr 2021 21:38:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLt4M52d5z4tdF; Thu, 15 Apr 2021 21:38:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 955E619004; Thu, 15 Apr 2021 21:38:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FLcBpY017593; Thu, 15 Apr 2021 21:38:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FLcBqd017592; Thu, 15 Apr 2021 21:38:11 GMT (envelope-from git) Date: Thu, 15 Apr 2021 21:38:11 GMT Message-Id: <202104152138.13FLcBqd017592@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 33c839b6f679 - stable/13 - nfsd: silence rpcb_unset noise for NFSv4 only servers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 33c839b6f6798011d87ad26b43c66f4ce04cdc2c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 21:38:11 -0000 The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=33c839b6f6798011d87ad26b43c66f4ce04cdc2c commit 33c839b6f6798011d87ad26b43c66f4ce04cdc2c Author: Rick Macklem AuthorDate: 2021-04-01 22:09:03 +0000 Commit: Rick Macklem CommitDate: 2021-04-15 21:34:24 +0000 nfsd: silence rpcb_unset noise for NFSv4 only servers An NFSv4 only configuration does not register with rpcbind(). Without this patch a failure to rpcb_unset() is reported when the daemon is terminated for this case. This is harmless noise, but this patch avoids calling rpcb_unset() for the NFSv4 only case, avoiding the noise. When called with "-d", it still does the rpcb_unset(), assuming that the configuration might have been changed to NFSv4 only and unregistering with rpcbind() might still be needed. (cherry picked from commit b43fe9eb4b3365156016ae3477747a46fc094bb8) --- usr.sbin/nfsd/nfsd.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/usr.sbin/nfsd/nfsd.c b/usr.sbin/nfsd/nfsd.c index 0eb9c2560cf1..0222d23f2312 100644 --- a/usr.sbin/nfsd/nfsd.c +++ b/usr.sbin/nfsd/nfsd.c @@ -101,6 +101,7 @@ static int stablefd = -1; /* Fd for the stable restart file */ static int backupfd; /* Fd for the backup stable restart file */ static const char *getopt_shortopts; static const char *getopt_usage; +static int nfs_minvers = NFS_VER2; static int minthreads_set; static int maxthreads_set; @@ -170,7 +171,6 @@ main(int argc, char **argv) int bindhostc, bindanyflag, rpcbreg, rpcbregcnt; int nfssvc_addsock; int longindex = 0; - int nfs_minvers = NFS_VER2; size_t nfs_minvers_size; const char *lopt; char **bindhost = NULL; @@ -307,6 +307,16 @@ main(int argc, char **argv) errx(1, "Out of memory"); } + if (unregister) { + /* + * Unregister before setting nfs_minvers, in case the + * value of vfs.nfsd.server_min_nfsvers has changed + * since registering with rpcbind. + */ + unregistration(); + exit (0); + } + nfs_minvers_size = sizeof(nfs_minvers); error = sysctlbyname("vfs.nfsd.server_min_nfsvers", &nfs_minvers, &nfs_minvers_size, NULL, 0); @@ -316,10 +326,6 @@ main(int argc, char **argv) nfs_minvers = NFS_VER2; } - if (unregister) { - unregistration(); - exit (0); - } if (reregister) { if (udpflag) { memset(&hints, 0, sizeof hints); @@ -935,8 +941,8 @@ reapchild(__unused int signo) static void unregistration(void) { - if ((!rpcb_unset(NFS_PROGRAM, 2, NULL)) || - (!rpcb_unset(NFS_PROGRAM, 3, NULL))) + if ((nfs_minvers == NFS_VER2 && !rpcb_unset(NFS_PROGRAM, 2, NULL)) || + (nfs_minvers <= NFS_VER3 && !rpcb_unset(NFS_PROGRAM, 3, NULL))) syslog(LOG_ERR, "rpcb_unset failed"); } From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 21:43:42 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 5D4595D968B; Thu, 15 Apr 2021 21:43:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLtBk27K1z4twx; Thu, 15 Apr 2021 21:43:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C3C918DC7; Thu, 15 Apr 2021 21:43:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FLhgmx030923; Thu, 15 Apr 2021 21:43:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FLhgGT030922; Thu, 15 Apr 2021 21:43:42 GMT (envelope-from git) Date: Thu, 15 Apr 2021 21:43:42 GMT Message-Id: <202104152143.13FLhgGT030922@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 19f21e0f29be - stable/13 - nfsv4 client: factor loop contents out into a separate function MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 19f21e0f29be6e87be06d6fe637a77f9668ebaf5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 21:43:42 -0000 The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=19f21e0f29be6e87be06d6fe637a77f9668ebaf5 commit 19f21e0f29be6e87be06d6fe637a77f9668ebaf5 Author: Rick Macklem AuthorDate: 2021-04-01 22:36:37 +0000 Commit: Rick Macklem CommitDate: 2021-04-15 21:40:40 +0000 nfsv4 client: factor loop contents out into a separate function Commit fdc9b2d50fe9 replaced a couple of while loops with LIST_FOREACH() loops. This patch factors the body of that loop out into a separate function called nfscl_checkown(). This prepares the code for future changes to use a hash table of lists for open searches via file handle. This patch should not result in a semantics change. (cherry picked from commit 4e6c2a1ee9af05bf42187e8201af1d03a617834f) --- sys/fs/nfsclient/nfs_clstate.c | 63 +++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 25 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 6cb737606525..e310deff6cf9 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -102,6 +102,9 @@ static int nfscl_delegcnt = 0; static int nfscl_layoutcnt = 0; static int nfscl_getopen(struct nfsclownerhead *, u_int8_t *, int, u_int8_t *, u_int8_t *, u_int32_t, struct nfscllockowner **, struct nfsclopen **); +static bool nfscl_checkown(struct nfsclowner *, struct nfsclopen *, uint8_t *, + uint8_t *, struct nfscllockowner **, struct nfsclopen **, + struct nfsclopen **); static void nfscl_clrelease(struct nfsclclient *); static void nfscl_cleanclient(struct nfsclclient *); static void nfscl_expireclient(struct nfsclclient *, struct nfsmount *, @@ -652,7 +655,6 @@ nfscl_getopen(struct nfsclownerhead *ohp, u_int8_t *nfhp, int fhlen, { struct nfsclowner *owp; struct nfsclopen *op, *rop, *rop2; - struct nfscllockowner *lp; bool keep_looping; if (lpp != NULL) @@ -676,30 +678,9 @@ nfscl_getopen(struct nfsclownerhead *ohp, u_int8_t *nfhp, int fhlen, LIST_FOREACH(op, &owp->nfsow_open, nfso_list) { if (op->nfso_fhlen == fhlen && !NFSBCMP(op->nfso_fh, nfhp, fhlen) - && (op->nfso_mode & mode) == mode) { - if (lpp != NULL) { - /* Now look for a matching lockowner. */ - LIST_FOREACH(lp, &op->nfso_lock, - nfsl_list) { - if (!NFSBCMP(lp->nfsl_owner, - lockown, - NFSV4CL_LOCKNAMELEN)) { - *lpp = lp; - rop = op; - keep_looping = false; - break; - } - } - } - if (rop == NULL && !NFSBCMP(owp->nfsow_owner, - openown, NFSV4CL_LOCKNAMELEN)) { - rop = op; - if (lpp == NULL) - keep_looping = false; - } - if (rop2 == NULL) - rop2 = op; - } + && (op->nfso_mode & mode) == mode) + keep_looping = nfscl_checkown(owp, op, openown, + lockown, lpp, &rop, &rop2); if (!keep_looping) break; } @@ -714,6 +695,38 @@ nfscl_getopen(struct nfsclownerhead *ohp, u_int8_t *nfhp, int fhlen, return (0); } +/* Check for an owner match. */ +static bool +nfscl_checkown(struct nfsclowner *owp, struct nfsclopen *op, uint8_t *openown, + uint8_t *lockown, struct nfscllockowner **lpp, struct nfsclopen **ropp, + struct nfsclopen **ropp2) +{ + struct nfscllockowner *lp; + bool keep_looping; + + keep_looping = true; + if (lpp != NULL) { + /* Now look for a matching lockowner. */ + LIST_FOREACH(lp, &op->nfso_lock, nfsl_list) { + if (!NFSBCMP(lp->nfsl_owner, lockown, + NFSV4CL_LOCKNAMELEN)) { + *lpp = lp; + *ropp = op; + return (false); + } + } + } + if (*ropp == NULL && !NFSBCMP(owp->nfsow_owner, openown, + NFSV4CL_LOCKNAMELEN)) { + *ropp = op; + if (lpp == NULL) + keep_looping = false; + } + if (*ropp2 == NULL) + *ropp2 = op; + return (keep_looping); +} + /* * Release use of an open owner. Called when open operations are done * with the open owner. From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 21:53:58 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 5B3AE5D9C4C; Thu, 15 Apr 2021 21:53:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLtQZ27mYz4vTb; Thu, 15 Apr 2021 21:53:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C35819385; Thu, 15 Apr 2021 21:53:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FLrwAU043987; Thu, 15 Apr 2021 21:53:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FLrwsF043986; Thu, 15 Apr 2021 21:53:58 GMT (envelope-from git) Date: Thu, 15 Apr 2021 21:53:58 GMT Message-Id: <202104152153.13FLrwsF043986@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: ed4f2fc6fdc2 - stable/12 - nfsd: silence rpcb_unset noise for NFSv4 only servers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: ed4f2fc6fdc232da96fd5795795d78c291810e9a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 21:53:58 -0000 The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=ed4f2fc6fdc232da96fd5795795d78c291810e9a commit ed4f2fc6fdc232da96fd5795795d78c291810e9a Author: Rick Macklem AuthorDate: 2021-04-01 22:09:03 +0000 Commit: Rick Macklem CommitDate: 2021-04-15 21:50:48 +0000 nfsd: silence rpcb_unset noise for NFSv4 only servers An NFSv4 only configuration does not register with rpcbind(). Without this patch a failure to rpcb_unset() is reported when the daemon is terminated for this case. This is harmless noise, but this patch avoids calling rpcb_unset() for the NFSv4 only case, avoiding the noise. When called with "-d", it still does the rpcb_unset(), assuming that the configuration might have been changed to NFSv4 only and unregistering with rpcbind() might still be needed. (cherry picked from commit b43fe9eb4b3365156016ae3477747a46fc094bb8) --- usr.sbin/nfsd/nfsd.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/usr.sbin/nfsd/nfsd.c b/usr.sbin/nfsd/nfsd.c index 2325a10f804d..571683c795fa 100644 --- a/usr.sbin/nfsd/nfsd.c +++ b/usr.sbin/nfsd/nfsd.c @@ -101,6 +101,7 @@ static int stablefd = -1; /* Fd for the stable restart file */ static int backupfd; /* Fd for the backup stable restart file */ static const char *getopt_shortopts; static const char *getopt_usage; +static int nfs_minvers = NFS_VER2; static int minthreads_set; static int maxthreads_set; @@ -170,7 +171,6 @@ main(int argc, char **argv) int bindhostc, bindanyflag, rpcbreg, rpcbregcnt; int nfssvc_addsock; int longindex = 0; - int nfs_minvers = NFS_VER2; size_t nfs_minvers_size; const char *lopt; char **bindhost = NULL; @@ -307,6 +307,16 @@ main(int argc, char **argv) errx(1, "Out of memory"); } + if (unregister) { + /* + * Unregister before setting nfs_minvers, in case the + * value of vfs.nfsd.server_min_nfsvers has changed + * since registering with rpcbind. + */ + unregistration(); + exit (0); + } + nfs_minvers_size = sizeof(nfs_minvers); error = sysctlbyname("vfs.nfsd.server_min_nfsvers", &nfs_minvers, &nfs_minvers_size, NULL, 0); @@ -316,10 +326,6 @@ main(int argc, char **argv) nfs_minvers = NFS_VER2; } - if (unregister) { - unregistration(); - exit (0); - } if (reregister) { if (udpflag) { memset(&hints, 0, sizeof hints); @@ -935,8 +941,8 @@ reapchild(__unused int signo) static void unregistration(void) { - if ((!rpcb_unset(NFS_PROGRAM, 2, NULL)) || - (!rpcb_unset(NFS_PROGRAM, 3, NULL))) + if ((nfs_minvers == NFS_VER2 && !rpcb_unset(NFS_PROGRAM, 2, NULL)) || + (nfs_minvers <= NFS_VER3 && !rpcb_unset(NFS_PROGRAM, 3, NULL))) syslog(LOG_ERR, "rpcb_unset failed"); } From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 23:02:47 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 398075DB93A; Thu, 15 Apr 2021 23:02:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLvxz194hz4yK7; Thu, 15 Apr 2021 23:02:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1AA2B19F32; Thu, 15 Apr 2021 23:02:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FN2lfr038019; Thu, 15 Apr 2021 23:02:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FN2k0A038018; Thu, 15 Apr 2021 23:02:46 GMT (envelope-from git) Date: Thu, 15 Apr 2021 23:02:46 GMT Message-Id: <202104152302.13FN2k0A038018@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: c3ee0b675928 - stable/13 - sys/ck.h: Add an include guard MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c3ee0b67592829e920964c2d5ca1adb611a08121 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 23:02:47 -0000 The branch stable/13 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c3ee0b67592829e920964c2d5ca1adb611a08121 commit c3ee0b67592829e920964c2d5ca1adb611a08121 Author: Kevin Bowling AuthorDate: 2021-03-21 18:50:30 +0000 Commit: Kevin Bowling CommitDate: 2021-04-15 23:01:49 +0000 sys/ck.h: Add an include guard Approved by: cognet MFC after: 1 week Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D29357 (cherry picked from commit 2595d78f3df2ca389aae259a291f93eb06ecad43) --- sys/sys/ck.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/sys/ck.h b/sys/sys/ck.h index 3bfce70c8d2c..b04fe67b476d 100644 --- a/sys/sys/ck.h +++ b/sys/sys/ck.h @@ -1,6 +1,9 @@ /* * $FreeBSD$ */ +#ifndef _SYS_CK_H_ +#define _SYS_CK_H_ + #ifdef _KERNEL #include #include @@ -11,3 +14,5 @@ #define CK_LIST_HEAD LIST_HEAD #define CK_LIST_ENTRY LIST_ENTRY #endif + +#endif /* !_SYS_CK_H_ */ From owner-dev-commits-src-branches@freebsd.org Thu Apr 15 23:03:57 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 6B6F95DB8F6; Thu, 15 Apr 2021 23:03:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLvzK2dX7z4yKL; Thu, 15 Apr 2021 23:03:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D4681A06C; Thu, 15 Apr 2021 23:03:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FN3vgL038211; Thu, 15 Apr 2021 23:03:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FN3vvE038210; Thu, 15 Apr 2021 23:03:57 GMT (envelope-from git) Date: Thu, 15 Apr 2021 23:03:57 GMT Message-Id: <202104152303.13FN3vvE038210@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: a1f4a2d6be36 - stable/12 - sys/ck.h: Add an include guard MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: a1f4a2d6be36392dbf477b8d287cc5145593cfb0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 23:03:57 -0000 The branch stable/12 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a1f4a2d6be36392dbf477b8d287cc5145593cfb0 commit a1f4a2d6be36392dbf477b8d287cc5145593cfb0 Author: Kevin Bowling AuthorDate: 2021-03-21 18:50:30 +0000 Commit: Kevin Bowling CommitDate: 2021-04-15 23:03:36 +0000 sys/ck.h: Add an include guard Approved by: cognet MFC after: 1 week Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D29357 (cherry picked from commit 2595d78f3df2ca389aae259a291f93eb06ecad43) --- sys/sys/ck.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/sys/ck.h b/sys/sys/ck.h index 3bfce70c8d2c..b04fe67b476d 100644 --- a/sys/sys/ck.h +++ b/sys/sys/ck.h @@ -1,6 +1,9 @@ /* * $FreeBSD$ */ +#ifndef _SYS_CK_H_ +#define _SYS_CK_H_ + #ifdef _KERNEL #include #include @@ -11,3 +14,5 @@ #define CK_LIST_HEAD LIST_HEAD #define CK_LIST_ENTRY LIST_ENTRY #endif + +#endif /* !_SYS_CK_H_ */ From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 01:27:35 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 D68195DFA5B; Fri, 16 Apr 2021 01:27:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLz935jy6z55MV; Fri, 16 Apr 2021 01:27:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B70C91BE3A; Fri, 16 Apr 2021 01:27:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13G1RZGJ023652; Fri, 16 Apr 2021 01:27:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13G1RZTg023651; Fri, 16 Apr 2021 01:27:35 GMT (envelope-from git) Date: Fri, 16 Apr 2021 01:27:35 GMT Message-Id: <202104160127.13G1RZTg023651@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 26b117bc6ad8 - stable/13 - fbt: Remove some handling for multiple CTF containers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 26b117bc6ad8acaeec8002494f9d4c53a822f0a2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 01:27:35 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=26b117bc6ad8acaeec8002494f9d4c53a822f0a2 commit 26b117bc6ad8acaeec8002494f9d4c53a822f0a2 Author: Mark Johnston AuthorDate: 2021-04-02 21:42:26 +0000 Commit: Mark Johnston CommitDate: 2021-04-16 01:27:24 +0000 fbt: Remove some handling for multiple CTF containers This was ported from illumos but not completely done. Currently we do not perform type deduplication between KLDs and the kernel, i.e., kernel modules have a complete type graph. So, remove it for now since it's not functional and complicates the task of modifying various CTF type definitions, and we are hitting some limits in the current format which necessitate an update. No functional change intended. (cherry picked from commit 4d221f59b851a9c844c84701bab7f4edb7026bd4) --- sys/cddl/dev/fbt/fbt.c | 44 +++++++++----------------------------------- 1 file changed, 9 insertions(+), 35 deletions(-) diff --git a/sys/cddl/dev/fbt/fbt.c b/sys/cddl/dev/fbt/fbt.c index a378ae0eb317..3bad4243c040 100644 --- a/sys/cddl/dev/fbt/fbt.c +++ b/sys/cddl/dev/fbt/fbt.c @@ -474,17 +474,18 @@ fbt_typoff_init(linker_ctf_t *lc) int ctf_typemax = 0; uint32_t *xp; ulong_t pop[CTF_K_MAX + 1] = { 0 }; + uint8_t version; /* Sanity check. */ if (hp->cth_magic != CTF_MAGIC) return (EINVAL); + version = hp->cth_version; + tbuf = (const ctf_type_t *) (ctfdata + hp->cth_typeoff); tend = (const ctf_type_t *) (ctfdata + hp->cth_stroff); - int child = hp->cth_parname != 0; - /* * We make two passes through the entire type section. In this first * pass, we count the number of each type and the total number of types. @@ -495,9 +496,8 @@ fbt_typoff_init(linker_ctf_t *lc) ssize_t size, increment; size_t vbytes; - uint_t n; - (void) fbt_get_ctt_size(hp->cth_version, tp, &size, &increment); + (void) fbt_get_ctt_size(version, tp, &size, &increment); switch (kind) { case CTF_K_INTEGER: @@ -512,22 +512,10 @@ fbt_typoff_init(linker_ctf_t *lc) break; case CTF_K_STRUCT: case CTF_K_UNION: - if (size < CTF_LSTRUCT_THRESH) { - ctf_member_t *mp = (ctf_member_t *) - ((uintptr_t)tp + increment); - + if (size < CTF_LSTRUCT_THRESH) vbytes = sizeof (ctf_member_t) * vlen; - for (n = vlen; n != 0; n--, mp++) - child |= CTF_TYPE_ISCHILD(mp->ctm_type); - } else { - ctf_lmember_t *lmp = (ctf_lmember_t *) - ((uintptr_t)tp + increment); - + else vbytes = sizeof (ctf_lmember_t) * vlen; - for (n = vlen; n != 0; n--, lmp++) - child |= - CTF_TYPE_ISCHILD(lmp->ctlm_type); - } break; case CTF_K_ENUM: vbytes = sizeof (ctf_enum_t) * vlen; @@ -552,7 +540,6 @@ fbt_typoff_init(linker_ctf_t *lc) case CTF_K_VOLATILE: case CTF_K_CONST: case CTF_K_RESTRICT: - child |= CTF_TYPE_ISCHILD(tp->ctt_type); vbytes = 0; break; default: @@ -584,9 +571,8 @@ fbt_typoff_init(linker_ctf_t *lc) ssize_t size, increment; size_t vbytes; - uint_t n; - (void) fbt_get_ctt_size(hp->cth_version, tp, &size, &increment); + (void) fbt_get_ctt_size(version, tp, &size, &increment); switch (kind) { case CTF_K_INTEGER: @@ -601,22 +587,10 @@ fbt_typoff_init(linker_ctf_t *lc) break; case CTF_K_STRUCT: case CTF_K_UNION: - if (size < CTF_LSTRUCT_THRESH) { - ctf_member_t *mp = (ctf_member_t *) - ((uintptr_t)tp + increment); - + if (size < CTF_LSTRUCT_THRESH) vbytes = sizeof (ctf_member_t) * vlen; - for (n = vlen; n != 0; n--, mp++) - child |= CTF_TYPE_ISCHILD(mp->ctm_type); - } else { - ctf_lmember_t *lmp = (ctf_lmember_t *) - ((uintptr_t)tp + increment); - + else vbytes = sizeof (ctf_lmember_t) * vlen; - for (n = vlen; n != 0; n--, lmp++) - child |= - CTF_TYPE_ISCHILD(lmp->ctlm_type); - } break; case CTF_K_ENUM: vbytes = sizeof (ctf_enum_t) * vlen; From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 02:43:02 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 9EB875E1909; Fri, 16 Apr 2021 02:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FM0r648jBz58fq; Fri, 16 Apr 2021 02:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 819E91D0AC; Fri, 16 Apr 2021 02:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13G2h2nX029099; Fri, 16 Apr 2021 02:43:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13G2h2DG029098; Fri, 16 Apr 2021 02:43:02 GMT (envelope-from git) Date: Fri, 16 Apr 2021 02:43:02 GMT Message-Id: <202104160243.13G2h2DG029098@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ryan Moeller Subject: git: 1310ff46bf39 - stable/13 - ifconfig: Reuse media state in ifmedia_getstate MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: freqlabs X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1310ff46bf39ee27873eba67fb4aeaf2917bab3d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 02:43:02 -0000 The branch stable/13 has been updated by freqlabs: URL: https://cgit.FreeBSD.org/src/commit/?id=1310ff46bf39ee27873eba67fb4aeaf2917bab3d commit 1310ff46bf39ee27873eba67fb4aeaf2917bab3d Author: Ryan Moeller AuthorDate: 2021-04-16 02:32:25 +0000 Commit: Ryan Moeller CommitDate: 2021-04-16 02:42:45 +0000 ifconfig: Reuse media state in ifmedia_getstate This restores behavior lost in code cleanup, fixing a regression after 2803fa471e77dc8f227fe00bbf075de7feb10022 where changing media options only applies some of the changes, not all. Reported by: np Reviewed by: donner Differential Revision: https://reviews.freebsd.org/D29741 (cherry picked from commit 407fb44c920a580a30dfe7d1add796a7b35a5ac7) --- sbin/ifconfig/ifmedia.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sbin/ifconfig/ifmedia.c b/sbin/ifconfig/ifmedia.c index 66eb40254889..aacf34a13248 100644 --- a/sbin/ifconfig/ifmedia.c +++ b/sbin/ifconfig/ifmedia.c @@ -159,7 +159,10 @@ free: struct ifmediareq * ifmedia_getstate(void) { - static struct ifmediareq *ifmr; + static struct ifmediareq *ifmr = NULL; + + if (ifmr != NULL) + return (ifmr); if (ifconfig_media_get_mediareq(lifh, name, &ifmr) == -1) errc(1, ifconfig_err_errno(lifh), From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 03:18:37 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 27DEA5E2546; Fri, 16 Apr 2021 03:18:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FM1d90hRMz3C9t; Fri, 16 Apr 2021 03:18:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A6F81D3C6; Fri, 16 Apr 2021 03:18:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13G3IaIK070868; Fri, 16 Apr 2021 03:18:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13G3IabI070867; Fri, 16 Apr 2021 03:18:36 GMT (envelope-from git) Date: Fri, 16 Apr 2021 03:18:36 GMT Message-Id: <202104160318.13G3IabI070867@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Nathan Whitehorn Subject: git: 5ec4eb443e81 - stable/13 - Add a new mode to the scripted partition editor for variant disk names. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nwhitehorn X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5ec4eb443e81c7793cec9b3f19350d3d1f9163c4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 03:18:37 -0000 The branch stable/13 has been updated by nwhitehorn: URL: https://cgit.FreeBSD.org/src/commit/?id=5ec4eb443e81c7793cec9b3f19350d3d1f9163c4 commit 5ec4eb443e81c7793cec9b3f19350d3d1f9163c4 Author: Nathan Whitehorn AuthorDate: 2021-03-26 15:39:12 +0000 Commit: Nathan Whitehorn CommitDate: 2021-04-16 03:18:02 +0000 Add a new mode to the scripted partition editor for variant disk names. If the disk parameter "DEFAULT" is set in place of an actual device name, or no disk is specified for the PARTITIONS parameter, the installer will follow the logic used in the automatic-partitioning mode, in which it will either provide a selection dialog for one of several disks if several are present or automatically select it if there is only one. This simplifies the creation of fully-automatic installation media for hardware or VMs with varying disk names. Suggested by: Egoitz Aurrekoetxea MFC after: 3 weeks Relnotes: yes (cherry picked from commit 5140034cc077c416690b4fdb79a96744fe0af0e6) --- usr.sbin/bsdinstall/bsdinstall.8 | 20 ++++++++++++++++---- usr.sbin/bsdinstall/partedit/part_wizard.c | 7 +++---- usr.sbin/bsdinstall/partedit/partedit.h | 1 + usr.sbin/bsdinstall/partedit/scripted.c | 10 +++++++--- 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index 781660bf5ef1..ee23fb4cecc4 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 22, 2021 +.Dd March 26, 2021 .Dt BSDINSTALL 8 .Os .Sh NAME @@ -158,7 +158,13 @@ Multiple disk setups are separated by semicolons. The .Ar disk argument specifies the disk on which to operate (which will be erased), -while the +or the special value +.Em DEFAULT , +which will result in either a selection window (as in +.Cm autopart ) +for the destination disk or, if there is only one possible disk, will +automatically select it. +The .Ar scheme argument specifies the .Xr gpart 8 @@ -208,6 +214,10 @@ A shorter invocation to use the default partitioning (as would have used) on the same disk: .Pp bsdinstall scriptedpart ada0 +.Pp +or, even shorter: +.Pp +bsdinstall scriptedpart DEFAULT .It Cm mount Mounts the file systems previously configured by .Cm autopart , @@ -279,7 +289,9 @@ See of the .Sx TARGETS -section for format details. +section for format details. If this variable is unset, the installer will +use the default partitioning as in +.Cm autopart . Default: unset .It Ev BSDINSTALL_DISTDIR The directory in which the distribution files can be found (or to which they @@ -468,7 +480,7 @@ the interpreter for the setup script. A typical bsdinstall script, using the default filesystem layout and the UFS filesystem, looks like this: .Bd -literal -offset indent -PARTITIONS=ada0 +PARTITIONS=DEFAULT DISTRIBUTIONS="kernel.txz base.txz" #!/bin/sh diff --git a/usr.sbin/bsdinstall/partedit/part_wizard.c b/usr.sbin/bsdinstall/partedit/part_wizard.c index 3160e1f049ea..9f7158a4801e 100644 --- a/usr.sbin/bsdinstall/partedit/part_wizard.c +++ b/usr.sbin/bsdinstall/partedit/part_wizard.c @@ -44,7 +44,6 @@ #define MIN_FREE_SPACE (1024*1024*1024) /* 1 GB */ #define SWAP_SIZE(available) MIN(available/20, 4*1024*1024*1024LL) -static char *boot_disk(struct gmesh *mesh); static char *wizard_partition(struct gmesh *mesh, const char *disk); int @@ -65,7 +64,7 @@ startwizard: dlg_put_backtitle(); error = geom_gettree(&mesh); - disk = boot_disk(&mesh); + disk = boot_disk_select(&mesh); if (disk == NULL) return (1); @@ -91,8 +90,8 @@ startwizard: return (0); } -static char * -boot_disk(struct gmesh *mesh) +char * +boot_disk_select(struct gmesh *mesh) { struct gclass *classp; struct gconfig *gc; diff --git a/usr.sbin/bsdinstall/partedit/partedit.h b/usr.sbin/bsdinstall/partedit/partedit.h index 1dccc653aea1..5c0405922d21 100644 --- a/usr.sbin/bsdinstall/partedit/partedit.h +++ b/usr.sbin/bsdinstall/partedit/partedit.h @@ -58,6 +58,7 @@ void delete_part_metadata(const char *name); int part_wizard(const char *fstype); int scripted_editor(int argc, const char **argv); +char *boot_disk_select(struct gmesh *mesh); int wizard_makeparts(struct gmesh *mesh, const char *disk, const char *fstype, int interactive); diff --git a/usr.sbin/bsdinstall/partedit/scripted.c b/usr.sbin/bsdinstall/partedit/scripted.c index 57dcbca816a3..37ac6de131b5 100644 --- a/usr.sbin/bsdinstall/partedit/scripted.c +++ b/usr.sbin/bsdinstall/partedit/scripted.c @@ -183,10 +183,14 @@ int parse_disk_config(char *input) } } while (input != NULL && *input != 0); - if (disk != NULL) - return (part_config(disk, scheme, partconfig)); + if (disk == NULL || strcmp(disk, "DEFAULT") == 0) { + struct gmesh mesh; + geom_gettree(&mesh); + disk = boot_disk_select(&mesh); + geom_deletetree(&mesh); + } - return (0); + return (part_config(disk, scheme, partconfig)); } int From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 08:31:57 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 65F095E9360; Fri, 16 Apr 2021 08:31:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FM8Zj2K49z3hQD; Fri, 16 Apr 2021 08:31:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 42CF221AE5; Fri, 16 Apr 2021 08:31:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13G8VvQN097122; Fri, 16 Apr 2021 08:31:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13G8VvJZ097121; Fri, 16 Apr 2021 08:31:57 GMT (envelope-from git) Date: Fri, 16 Apr 2021 08:31:57 GMT Message-Id: <202104160831.13G8VvJZ097121@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 796d1209fb4a - stable/13 - Removed the reference to the deprecated splx API from ifnet(9). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 796d1209fb4a5b599561e094f7ce01e0b0596ad4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 08:31:57 -0000 The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=796d1209fb4a5b599561e094f7ce01e0b0596ad4 commit 796d1209fb4a5b599561e094f7ce01e0b0596ad4 Author: Dmitry Chagin AuthorDate: 2021-04-09 14:22:12 +0000 Commit: Dmitry Chagin CommitDate: 2021-04-16 08:31:22 +0000 Removed the reference to the deprecated splx API from ifnet(9). Reviewed by: emaste, markj PR: 254880 Differential Revision: https://reviews.freebsd.org/D29666 (cherry picked from commit f2400e6e832d42ca72b0d04ecd070598f4a81eb7) --- share/man/man9/ifnet.9 | 9 --------- 1 file changed, 9 deletions(-) diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9 index 126fcb9bc671..90a95106b1d5 100644 --- a/share/man/man9/ifnet.9 +++ b/share/man/man9/ifnet.9 @@ -1393,15 +1393,6 @@ The socket's protocol control routine is called to implement the requested action. .El .El -.Pp -.Fn if_down , -.Fn ifioctl , -.Fn ifpromisc , -and -.Fn if_up -must be called at -.Fn splnet -or higher. .Ss "Interface Address Functions" Several functions exist to look up an interface address structure given an address. From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 08:33:53 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 090355E9B03; Fri, 16 Apr 2021 08:33:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FM8cw6xYrz3hHj; Fri, 16 Apr 2021 08:33:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E160121BF3; Fri, 16 Apr 2021 08:33:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13G8Xqmn098362; Fri, 16 Apr 2021 08:33:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13G8Xqge098361; Fri, 16 Apr 2021 08:33:52 GMT (envelope-from git) Date: Fri, 16 Apr 2021 08:33:52 GMT Message-Id: <202104160833.13G8Xqge098361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 02816ecfb935 - stable/13 - Partially revert r248770. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 02816ecfb93542705e73c108d4d8214450529059 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 08:33:53 -0000 The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=02816ecfb93542705e73c108d4d8214450529059 commit 02816ecfb93542705e73c108d4d8214450529059 Author: Dmitry Chagin AuthorDate: 2021-04-02 08:43:17 +0000 Commit: Dmitry Chagin CommitDate: 2021-04-16 08:33:32 +0000 Partially revert r248770. Under geom(4) nvme_ns_bio_process() is on the path where sleep is prohibited as g_io_shedule_down() calls THREAD_NO_SLEEPNG() before geom->start(). Reviewed By: imp Differential Revision: https://reviews.freebsd.org/D29539 (cherry picked from commit a78109d5db87b08785a822770e2e4fdb15f921b6) --- sys/dev/nvme/nvme_ns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/nvme/nvme_ns.c b/sys/dev/nvme/nvme_ns.c index f14a2f631387..82ab48efa826 100644 --- a/sys/dev/nvme/nvme_ns.c +++ b/sys/dev/nvme/nvme_ns.c @@ -473,7 +473,7 @@ nvme_ns_bio_process(struct nvme_namespace *ns, struct bio *bp, case BIO_DELETE: dsm_range = malloc(sizeof(struct nvme_dsm_range), M_NVME, - M_ZERO | M_WAITOK); + M_ZERO | M_NOWAIT); if (!dsm_range) { err = ENOMEM; break; From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 08:35:31 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 56EAF5E99C8; Fri, 16 Apr 2021 08:35:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FM8fq20BRz3hSn; Fri, 16 Apr 2021 08:35:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 37035219EE; Fri, 16 Apr 2021 08:35:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13G8ZV77098590; Fri, 16 Apr 2021 08:35:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13G8ZVBu098589; Fri, 16 Apr 2021 08:35:31 GMT (envelope-from git) Date: Fri, 16 Apr 2021 08:35:31 GMT Message-Id: <202104160835.13G8ZVBu098589@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: c91586dcfc9e - stable/12 - Removed the reference to the deprecated splx API from ifnet(9). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c91586dcfc9ed2cb94b672b6ac0a21aaace2dff1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 08:35:31 -0000 The branch stable/12 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=c91586dcfc9ed2cb94b672b6ac0a21aaace2dff1 commit c91586dcfc9ed2cb94b672b6ac0a21aaace2dff1 Author: Dmitry Chagin AuthorDate: 2021-04-09 14:22:12 +0000 Commit: Dmitry Chagin CommitDate: 2021-04-16 08:35:14 +0000 Removed the reference to the deprecated splx API from ifnet(9). Reviewed by: emaste, markj PR: 254880 Differential Revision: https://reviews.freebsd.org/D29666 (cherry picked from commit f2400e6e832d42ca72b0d04ecd070598f4a81eb7) --- share/man/man9/ifnet.9 | 9 --------- 1 file changed, 9 deletions(-) diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9 index 7508fada315a..ebe202079588 100644 --- a/share/man/man9/ifnet.9 +++ b/share/man/man9/ifnet.9 @@ -1358,15 +1358,6 @@ The socket's protocol control routine is called to implement the requested action. .El .El -.Pp -.Fn if_down , -.Fn ifioctl , -.Fn ifpromisc , -and -.Fn if_up -must be called at -.Fn splnet -or higher. .Ss "Interface Address Functions" Several functions exist to look up an interface address structure given an address. From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 08:36:24 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 0CFA85E9BB3; Fri, 16 Apr 2021 08:36:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FM8gq704qz3hZF; Fri, 16 Apr 2021 08:36:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E3167217D5; Fri, 16 Apr 2021 08:36:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13G8aNrj098767; Fri, 16 Apr 2021 08:36:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13G8aN8Q098766; Fri, 16 Apr 2021 08:36:23 GMT (envelope-from git) Date: Fri, 16 Apr 2021 08:36:23 GMT Message-Id: <202104160836.13G8aN8Q098766@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: a83c64a59cf5 - stable/12 - Partially revert r248770. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: a83c64a59cf5dd4c8eb86ce9dbdcf84c2c874fb8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 08:36:24 -0000 The branch stable/12 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=a83c64a59cf5dd4c8eb86ce9dbdcf84c2c874fb8 commit a83c64a59cf5dd4c8eb86ce9dbdcf84c2c874fb8 Author: Dmitry Chagin AuthorDate: 2021-04-02 08:43:17 +0000 Commit: Dmitry Chagin CommitDate: 2021-04-16 08:36:12 +0000 Partially revert r248770. Under geom(4) nvme_ns_bio_process() is on the path where sleep is prohibited as g_io_shedule_down() calls THREAD_NO_SLEEPNG() before geom->start(). Reviewed By: imp Differential Revision: https://reviews.freebsd.org/D29539 (cherry picked from commit a78109d5db87b08785a822770e2e4fdb15f921b6) --- sys/dev/nvme/nvme_ns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/nvme/nvme_ns.c b/sys/dev/nvme/nvme_ns.c index ef38c8dc7826..9452f6460973 100644 --- a/sys/dev/nvme/nvme_ns.c +++ b/sys/dev/nvme/nvme_ns.c @@ -473,7 +473,7 @@ nvme_ns_bio_process(struct nvme_namespace *ns, struct bio *bp, case BIO_DELETE: dsm_range = malloc(sizeof(struct nvme_dsm_range), M_NVME, - M_ZERO | M_WAITOK); + M_ZERO | M_NOWAIT); if (!dsm_range) { err = ENOMEM; break; From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 13:52:45 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 99AC65D2AB3; Fri, 16 Apr 2021 13:52:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMHhs3gyPz4ST7; Fri, 16 Apr 2021 13:52:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6362B25C43; Fri, 16 Apr 2021 13:52:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GDqj40021982; Fri, 16 Apr 2021 13:52:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GDqjSL021981; Fri, 16 Apr 2021 13:52:45 GMT (envelope-from git) Date: Fri, 16 Apr 2021 13:52:45 GMT Message-Id: <202104161352.13GDqjSL021981@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 6fa1d613a825 - stable/13 - rmlock(9): add an RM_DUPOK flag MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6fa1d613a82582e0da87169b994a5c0080258a82 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 13:52:45 -0000 The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=6fa1d613a82582e0da87169b994a5c0080258a82 commit 6fa1d613a82582e0da87169b994a5c0080258a82 Author: Mitchell Horne AuthorDate: 2021-04-08 17:41:19 +0000 Commit: Mitchell Horne CommitDate: 2021-04-16 13:48:02 +0000 rmlock(9): add an RM_DUPOK flag Allows for duplicate locks to be acquired without witness complaining. Similar flags exists already for rwlock(9) and sx(9). Reviewed by: markj Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. (cherry picked from commit 2816bd8442bc323d50434d0e64cb4b7c10a195e8) --- share/man/man9/rmlock.9 | 5 ++++- sys/kern/kern_rmlock.c | 2 ++ sys/sys/rmlock.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/share/man/man9/rmlock.9 b/share/man/man9/rmlock.9 index 53de7c73b79a..6d128f986968 100644 --- a/share/man/man9/rmlock.9 +++ b/share/man/man9/rmlock.9 @@ -26,7 +26,7 @@ .\" $FreeBSD$ .\" .\" Based on rwlock.9 man page -.Dd December 27, 2019 +.Dd April 12, 2021 .Dt RMLOCK 9 .Os .Sh NAME @@ -186,6 +186,9 @@ will assert that the has not been initialized multiple times without intervening calls to .Fn rm_destroy unless this option is specified. +.It Dv RM_DUPOK +.Xr witness 4 +should not log messages about duplicate locks being acquired. .El .It Fn rm_rlock "struct rmlock *rm" "struct rm_priotracker* tracker" Lock diff --git a/sys/kern/kern_rmlock.c b/sys/kern/kern_rmlock.c index f661e209b633..7230a00e357b 100644 --- a/sys/kern/kern_rmlock.c +++ b/sys/kern/kern_rmlock.c @@ -289,6 +289,8 @@ rm_init_flags(struct rmlock *rm, const char *name, int opts) liflags |= LO_RECURSABLE; if (opts & RM_NEW) liflags |= LO_NEW; + if (opts & RM_DUPOK) + liflags |= LO_DUPOK; rm->rm_writecpus = all_cpus; LIST_INIT(&rm->rm_activeReaders); if (opts & RM_SLEEPABLE) { diff --git a/sys/sys/rmlock.h b/sys/sys/rmlock.h index 3e4db5d853c6..5aaf8f039026 100644 --- a/sys/sys/rmlock.h +++ b/sys/sys/rmlock.h @@ -48,6 +48,7 @@ #define RM_RECURSE 0x00000002 #define RM_SLEEPABLE 0x00000004 #define RM_NEW 0x00000008 +#define RM_DUPOK 0x00000010 void rm_init(struct rmlock *rm, const char *name); void rm_init_flags(struct rmlock *rm, const char *name, int opts); From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 13:52:44 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 5AD7A5D2851; Fri, 16 Apr 2021 13:52:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMHhr25Zpz4S8r; Fri, 16 Apr 2021 13:52:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3AE4725F9B; Fri, 16 Apr 2021 13:52:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GDqiSp021961; Fri, 16 Apr 2021 13:52:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GDqi7q021960; Fri, 16 Apr 2021 13:52:44 GMT (envelope-from git) Date: Fri, 16 Apr 2021 13:52:44 GMT Message-Id: <202104161352.13GDqi7q021960@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 17b0a38d96fe - stable/13 - arm64: clear debug register state on fork MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 17b0a38d96feb77d4b019ab9108b2c5050273823 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 13:52:44 -0000 The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=17b0a38d96feb77d4b019ab9108b2c5050273823 commit 17b0a38d96feb77d4b019ab9108b2c5050273823 Author: Mitchell Horne AuthorDate: 2021-04-07 19:23:46 +0000 Commit: Mitchell Horne CommitDate: 2021-04-16 13:47:32 +0000 arm64: clear debug register state on fork Following the analogous change for amd64 and i386 in 8223717ce62c, ensure that new processes start with these registers inactive. PR: 254661 Reported by: Michał Górny Reviewed by: kib, emaste Sponsored by: The FreeBSD Foundation (cherry picked from commit 1fd001db9c330f133708f3c04c8852f8b07cfed9) --- sys/arm64/arm64/vm_machdep.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/arm64/arm64/vm_machdep.c b/sys/arm64/arm64/vm_machdep.c index ac2a47597a8c..b2ab8bb463b0 100644 --- a/sys/arm64/arm64/vm_machdep.c +++ b/sys/arm64/arm64/vm_machdep.c @@ -93,6 +93,9 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) td2->td_pcb = pcb2; bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); + /* Clear the debug register state. */ + bzero(&pcb2->pcb_dbg_regs, sizeof(pcb2->pcb_dbg_regs)); + tf = (struct trapframe *)STACKALIGN((struct trapframe *)pcb2 - 1); bcopy(td1->td_frame, tf, sizeof(*tf)); tf->tf_x[0] = 0; From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 13:52:46 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 CC99B5D27C0; Fri, 16 Apr 2021 13:52:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMHht4jVsz4SJX; Fri, 16 Apr 2021 13:52:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 756D025E18; Fri, 16 Apr 2021 13:52:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GDqk3u022009; Fri, 16 Apr 2021 13:52:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GDqklK022008; Fri, 16 Apr 2021 13:52:46 GMT (envelope-from git) Date: Fri, 16 Apr 2021 13:52:46 GMT Message-Id: <202104161352.13GDqklK022008@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: c0422e6c365e - stable/13 - arm64: clear debug registers after execve(2) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c0422e6c365eca801bde5b2f644e3a7e4803dbc8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 13:52:46 -0000 The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=c0422e6c365eca801bde5b2f644e3a7e4803dbc8 commit c0422e6c365eca801bde5b2f644e3a7e4803dbc8 Author: Mitchell Horne AuthorDate: 2021-04-09 14:13:21 +0000 Commit: Mitchell Horne CommitDate: 2021-04-16 13:48:39 +0000 arm64: clear debug registers after execve(2) This is both intuitive and required, as any previous breakpoint settings may not be applicable to the new process. Reported by: arichardson Reviewed by: kib Sponsored by: The FreeBSD Foundation (cherry picked from commit a2a8b582bdc1c8c1f4da3ae727349327f5fc9dd8) --- sys/arm64/arm64/elf32_machdep.c | 8 +++++++- sys/arm64/arm64/machdep.c | 5 ++++- sys/arm64/linux/linux_sysvec.c | 12 +++++++++--- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_machdep.c index 84b62caf8590..b9669616e1dd 100644 --- a/sys/arm64/arm64/elf32_machdep.c +++ b/sys/arm64/arm64/elf32_machdep.c @@ -239,6 +239,7 @@ freebsd32_setregs(struct thread *td, struct image_params *imgp, uintptr_t stack) { struct trapframe *tf = td->td_frame; + struct pcb *pcb = td->td_pcb; memset(tf, 0, sizeof(struct trapframe)); @@ -256,8 +257,13 @@ freebsd32_setregs(struct thread *td, struct image_params *imgp, tf->tf_spsr = PSR_M_32; #ifdef VFP - vfp_reset_state(td, td->td_pcb); + vfp_reset_state(td, pcb); #endif + + /* + * Clear debug register state. It is not applicable to the new process. + */ + bzero(&pcb->pcb_dbg_regs, sizeof(pcb->pcb_dbg_regs)); } void diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 8a1e7520aacb..5cc17d2a4612 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -569,7 +569,10 @@ exec_setregs(struct thread *td, struct image_params *imgp, uintptr_t stack) vfp_reset_state(td, pcb); #endif - /* TODO: Shouldn't we also reset pcb_dbg_regs? */ + /* + * Clear debug register state. It is not applicable to the new process. + */ + bzero(&pcb->pcb_dbg_regs, sizeof(pcb->pcb_dbg_regs)); } /* Sanity check these are the same size, they will be memcpy'd to and fro */ diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index df16db4040a7..e20e0fd32b91 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -351,6 +351,7 @@ linux_exec_setregs(struct thread *td, struct image_params *imgp, uintptr_t stack) { struct trapframe *regs = td->td_frame; + struct pcb *pcb = td->td_pcb; /* LINUXTODO: validate */ LIN_SDT_PROBE0(sysvec, linux_exec_setregs, todo); @@ -365,14 +366,19 @@ linux_exec_setregs(struct thread *td, struct image_params *imgp, #endif regs->tf_elr = imgp->entry_addr; - td->td_pcb->pcb_tpidr_el0 = 0; - td->td_pcb->pcb_tpidrro_el0 = 0; + pcb->pcb_tpidr_el0 = 0; + pcb->pcb_tpidrro_el0 = 0; WRITE_SPECIALREG(tpidrro_el0, 0); WRITE_SPECIALREG(tpidr_el0, 0); #ifdef VFP - vfp_reset_state(td, td->td_pcb); + vfp_reset_state(td, pcb); #endif + + /* + * Clear debug register state. It is not applicable to the new process. + */ + bzero(&pcb->pcb_dbg_regs, sizeof(pcb->pcb_dbg_regs)); } int From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 13:52:47 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 C23CB5D2AB6; Fri, 16 Apr 2021 13:52:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMHhv4m74z4SZG; Fri, 16 Apr 2021 13:52:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 940A625E19; Fri, 16 Apr 2021 13:52:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GDqlGt022031; Fri, 16 Apr 2021 13:52:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GDqlHl022030; Fri, 16 Apr 2021 13:52:47 GMT (envelope-from git) Date: Fri, 16 Apr 2021 13:52:47 GMT Message-Id: <202104161352.13GDqlHl022030@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: dbc54475c142 - stable/13 - arm64: adjust comments in dbg_monitor_exit() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dbc54475c142215a8b85667b7ec2791cc06eb377 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 13:52:47 -0000 The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=dbc54475c142215a8b85667b7ec2791cc06eb377 commit dbc54475c142215a8b85667b7ec2791cc06eb377 Author: Mitchell Horne AuthorDate: 2021-04-13 17:34:58 +0000 Commit: Mitchell Horne CommitDate: 2021-04-16 13:49:05 +0000 arm64: adjust comments in dbg_monitor_exit() These comments were copied from dbg_monitor_enter(), but the intended modifications weren't made. Update them to reflect what this code actually does. Sponsored by: The FreeBSD Foundation (cherry picked from commit 5742f2d89c03311e8b2d92422c0e2e4063cb2e1d) --- sys/arm64/arm64/debug_monitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/debug_monitor.c b/sys/arm64/arm64/debug_monitor.c index d302c8c95b4f..a2b4b7e8b40b 100644 --- a/sys/arm64/arm64/debug_monitor.c +++ b/sys/arm64/arm64/debug_monitor.c @@ -549,11 +549,11 @@ dbg_monitor_exit(struct thread *thread, struct trapframe *frame) if (!(SV_PROC_FLAG(thread->td_proc, SV_ILP32))) frame->tf_spsr |= PSR_D; if ((thread->td_pcb->pcb_dbg_regs.dbg_flags & DBGMON_ENABLED) != 0) { - /* Install the kernel version of the registers */ + /* Install the thread's version of the registers */ dbg_register_sync(&thread->td_pcb->pcb_dbg_regs); frame->tf_spsr &= ~PSR_D; } else if ((kernel_monitor.dbg_flags & DBGMON_ENABLED) != 0) { - /* Disable the user breakpoints until we return to userspace */ + /* Disable the kernel breakpoints until we re-enter */ for (i = 0; i < dbg_watchpoint_num; i++) { dbg_wb_write_reg(DBG_REG_BASE_WCR, i, 0); dbg_wb_write_reg(DBG_REG_BASE_WVR, i, 0); From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 14:22:33 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 73C855D32FC; Fri, 16 Apr 2021 14:22:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMJMF2s3Qz4Tj6; Fri, 16 Apr 2021 14:22:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 551AC262D3; Fri, 16 Apr 2021 14:22:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GEMXRx062719; Fri, 16 Apr 2021 14:22:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GEMXqW062718; Fri, 16 Apr 2021 14:22:33 GMT (envelope-from git) Date: Fri, 16 Apr 2021 14:22:33 GMT Message-Id: <202104161422.13GEMXqW062718@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 67bf33e04652 - stable/12 - rmlock(9): add an RM_DUPOK flag MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 67bf33e04652b6dd1a948c8b93bb6bebbb1519d5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 14:22:33 -0000 The branch stable/12 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=67bf33e04652b6dd1a948c8b93bb6bebbb1519d5 commit 67bf33e04652b6dd1a948c8b93bb6bebbb1519d5 Author: Mitchell Horne AuthorDate: 2021-04-08 17:41:19 +0000 Commit: Mitchell Horne CommitDate: 2021-04-16 14:20:37 +0000 rmlock(9): add an RM_DUPOK flag Allows for duplicate locks to be acquired without witness complaining. Similar flags exists already for rwlock(9) and sx(9). Reviewed by: markj Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. (cherry picked from commit 2816bd8442bc323d50434d0e64cb4b7c10a195e8) --- share/man/man9/rmlock.9 | 5 ++++- sys/kern/kern_rmlock.c | 2 ++ sys/sys/rmlock.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/share/man/man9/rmlock.9 b/share/man/man9/rmlock.9 index d56d97cef6e1..a1e91b08812c 100644 --- a/share/man/man9/rmlock.9 +++ b/share/man/man9/rmlock.9 @@ -26,7 +26,7 @@ .\" $FreeBSD$ .\" .\" Based on rwlock.9 man page -.Dd November 11, 2017 +.Dd April 12, 2021 .Dt RMLOCK 9 .Os .Sh NAME @@ -167,6 +167,9 @@ will assert that the has not been initialized multiple times without intervening calls to .Fn rm_destroy unless this option is specified. +.It Dv RM_DUPOK +.Xr witness 4 +should not log messages about duplicate locks being acquired. .El .It Fn rm_rlock "struct rmlock *rm" "struct rm_priotracker* tracker" Lock diff --git a/sys/kern/kern_rmlock.c b/sys/kern/kern_rmlock.c index de2a5818c5bf..585ccce6d2a4 100644 --- a/sys/kern/kern_rmlock.c +++ b/sys/kern/kern_rmlock.c @@ -288,6 +288,8 @@ rm_init_flags(struct rmlock *rm, const char *name, int opts) liflags |= LO_RECURSABLE; if (opts & RM_NEW) liflags |= LO_NEW; + if (opts & RM_DUPOK) + liflags |= LO_DUPOK; rm->rm_writecpus = all_cpus; LIST_INIT(&rm->rm_activeReaders); if (opts & RM_SLEEPABLE) { diff --git a/sys/sys/rmlock.h b/sys/sys/rmlock.h index cdcb6edc3b92..0eed3d3044bd 100644 --- a/sys/sys/rmlock.h +++ b/sys/sys/rmlock.h @@ -48,6 +48,7 @@ #define RM_RECURSE 0x00000002 #define RM_SLEEPABLE 0x00000004 #define RM_NEW 0x00000008 +#define RM_DUPOK 0x00000010 void rm_init(struct rmlock *rm, const char *name); void rm_init_flags(struct rmlock *rm, const char *name, int opts); From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 14:25:42 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 F20645D3A0A; Fri, 16 Apr 2021 14:25:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMJQt6Zctz4TRf; Fri, 16 Apr 2021 14:25:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D044426438; Fri, 16 Apr 2021 14:25:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GEPg75063045; Fri, 16 Apr 2021 14:25:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GEPgRr063044; Fri, 16 Apr 2021 14:25:42 GMT (envelope-from git) Date: Fri, 16 Apr 2021 14:25:42 GMT Message-Id: <202104161425.13GEPgRr063044@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: cd1729e8b69f - stable/13 - lpd(8): Mention the author of a paper in the SEE ALSO section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cd1729e8b69faeb025a25d63925c4010fe3b38fa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 14:25:43 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=cd1729e8b69faeb025a25d63925c4010fe3b38fa commit cd1729e8b69faeb025a25d63925c4010fe3b38fa Author: Gordon Bergling AuthorDate: 2021-04-09 09:29:18 +0000 Commit: Gordon Bergling CommitDate: 2021-04-16 14:24:37 +0000 lpd(8): Mention the author of a paper in the SEE ALSO section Obtained from: OpenBSD (cherry picked from commit c07aa0a5878f55ef22b8d0ba5f66a728b1407427) --- usr.sbin/lpr/lpd/lpd.8 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/lpr/lpd/lpd.8 b/usr.sbin/lpr/lpd/lpd.8 index 46c254c6dceb..2554aba2f834 100644 --- a/usr.sbin/lpr/lpd/lpd.8 +++ b/usr.sbin/lpr/lpd/lpd.8 @@ -28,7 +28,7 @@ .\" @(#)lpd.8 8.3 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd June 6, 2001 +.Dd April 9, 2021 .Dt LPD 8 .Os .Sh NAME @@ -333,6 +333,8 @@ but not under same administrative control. .Xr lpc 8 , .Xr pac 8 .Rs +.\" 4.4BSD SMM:7 +.%A Ralph Campbell .%T "4.2 BSD Line Printer Spooler Manual" .Re .Sh HISTORY From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 14:25:44 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 30B915D3A0F; Fri, 16 Apr 2021 14:25:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMJQw0WjXz4TjV; Fri, 16 Apr 2021 14:25:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F2B1326587; Fri, 16 Apr 2021 14:25:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GEPhVO063070; Fri, 16 Apr 2021 14:25:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GEPhsv063069; Fri, 16 Apr 2021 14:25:43 GMT (envelope-from git) Date: Fri, 16 Apr 2021 14:25:43 GMT Message-Id: <202104161425.13GEPhsv063069@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: e981fc617700 - stable/13 - config(8): Mention the authors of a paper in the SEE ALSO section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e981fc617700ea8c1db12be0b8b50d757aecbcc2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 14:25:44 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e981fc617700ea8c1db12be0b8b50d757aecbcc2 commit e981fc617700ea8c1db12be0b8b50d757aecbcc2 Author: Gordon Bergling AuthorDate: 2021-04-09 09:20:49 +0000 Commit: Gordon Bergling CommitDate: 2021-04-16 14:25:03 +0000 config(8): Mention the authors of a paper in the SEE ALSO section Obtained from: OpenBSD (cherry picked from commit 2b59392cb0da804e825c63469beb1934ec4267db) --- usr.sbin/config/config.8 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr.sbin/config/config.8 b/usr.sbin/config/config.8 index c8c92b5eddab..b4147843376b 100644 --- a/usr.sbin/config/config.8 +++ b/usr.sbin/config/config.8 @@ -28,7 +28,7 @@ .\" @(#)config.8 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd June 29, 2020 +.Dd April 9, 2021 .Dt CONFIG 8 .Os .Sh NAME @@ -259,7 +259,11 @@ The .Sx SYNOPSIS portion of each device in section 4. .Rs +.\" 4.4BSD SMM:2 +.%A S. J. Leffler +.%A M. J. Karels .%T "Building 4.3 BSD UNIX System with Config" +.%B 4.4BSD System Manager's Manual (SMM) .Re .Sh HISTORY The From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 14:25:45 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 536A55D3A97; Fri, 16 Apr 2021 14:25:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMJQx1WM6z4TWf; Fri, 16 Apr 2021 14:25:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D400261E8; Fri, 16 Apr 2021 14:25:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GEPjJe063094; Fri, 16 Apr 2021 14:25:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GEPiHx063093; Fri, 16 Apr 2021 14:25:44 GMT (envelope-from git) Date: Fri, 16 Apr 2021 14:25:44 GMT Message-Id: <202104161425.13GEPiHx063093@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: ddb7a5056f25 - stable/13 - ed(1): Add two references in the SEE ALSO section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ddb7a5056f25c62d36fadaf6ecd8575cfae9f2ae Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 14:25:45 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ddb7a5056f25c62d36fadaf6ecd8575cfae9f2ae commit ddb7a5056f25c62d36fadaf6ecd8575cfae9f2ae Author: Gordon Bergling AuthorDate: 2021-04-09 07:43:49 +0000 Commit: Gordon Bergling CommitDate: 2021-04-16 14:25:25 +0000 ed(1): Add two references in the SEE ALSO section Obtained from: OpenBSD (cherry picked from commit 3ce579325e424ce9297546553fb453a4ec62c20b) --- bin/ed/ed.1 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bin/ed/ed.1 b/bin/ed/ed.1 index 0cdd1b9c3e3c..9ced0f96a872 100644 --- a/bin/ed/ed.1 +++ b/bin/ed/ed.1 @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd November 3, 2018 +.Dd April 9, 2021 .Dt ED 1 .Os .Sh NAME @@ -961,6 +961,16 @@ USD:12-13 .%O Addison-Wesley .%D 1981 .Re +.Rs +.\" 4.4BSD USD:9 +.%A B. W. Kernighan +.%T A Tutorial Introduction to the UNIX Text Editor +.Re +.Rs +.\" 4.4BSD USD:10 +.%A B. W. Kernighan +.%T Advanced Editing on UNIX +.Re .Sh LIMITATIONS The .Nm From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 14:29:19 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 CA5E15D3AED; Fri, 16 Apr 2021 14:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMJW35NdNz4TXc; Fri, 16 Apr 2021 14:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABB952643A; Fri, 16 Apr 2021 14:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GETJsK063460; Fri, 16 Apr 2021 14:29:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GETJ0o063459; Fri, 16 Apr 2021 14:29:19 GMT (envelope-from git) Date: Fri, 16 Apr 2021 14:29:19 GMT Message-Id: <202104161429.13GETJ0o063459@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 7e55fdf88bce - stable/12 - lpd(8): Mention the author of a paper in the SEE ALSO section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 7e55fdf88bce317e4b3cfb4bbd00c1393e5d1bd4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 14:29:19 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=7e55fdf88bce317e4b3cfb4bbd00c1393e5d1bd4 commit 7e55fdf88bce317e4b3cfb4bbd00c1393e5d1bd4 Author: Gordon Bergling AuthorDate: 2021-04-09 09:29:18 +0000 Commit: Gordon Bergling CommitDate: 2021-04-16 14:28:15 +0000 lpd(8): Mention the author of a paper in the SEE ALSO section Obtained from: OpenBSD (cherry picked from commit c07aa0a5878f55ef22b8d0ba5f66a728b1407427) --- usr.sbin/lpr/lpd/lpd.8 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/lpr/lpd/lpd.8 b/usr.sbin/lpr/lpd/lpd.8 index 46c254c6dceb..2554aba2f834 100644 --- a/usr.sbin/lpr/lpd/lpd.8 +++ b/usr.sbin/lpr/lpd/lpd.8 @@ -28,7 +28,7 @@ .\" @(#)lpd.8 8.3 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd June 6, 2001 +.Dd April 9, 2021 .Dt LPD 8 .Os .Sh NAME @@ -333,6 +333,8 @@ but not under same administrative control. .Xr lpc 8 , .Xr pac 8 .Rs +.\" 4.4BSD SMM:7 +.%A Ralph Campbell .%T "4.2 BSD Line Printer Spooler Manual" .Re .Sh HISTORY From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 14:29:20 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 F02865D3A7B; Fri, 16 Apr 2021 14:29:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMJW46VvQz4Ts3; Fri, 16 Apr 2021 14:29:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D0B8026604; Fri, 16 Apr 2021 14:29:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GETKrG063481; Fri, 16 Apr 2021 14:29:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GETKKu063480; Fri, 16 Apr 2021 14:29:20 GMT (envelope-from git) Date: Fri, 16 Apr 2021 14:29:20 GMT Message-Id: <202104161429.13GETKKu063480@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 9cfb2dfada93 - stable/12 - config(8): Mention the authors of a paper in the SEE ALSO section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 9cfb2dfada93c84934046d8f8b97c9b2ebb2c02a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 14:29:21 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=9cfb2dfada93c84934046d8f8b97c9b2ebb2c02a commit 9cfb2dfada93c84934046d8f8b97c9b2ebb2c02a Author: Gordon Bergling AuthorDate: 2021-04-09 09:20:49 +0000 Commit: Gordon Bergling CommitDate: 2021-04-16 14:28:38 +0000 config(8): Mention the authors of a paper in the SEE ALSO section Obtained from: OpenBSD (cherry picked from commit 2b59392cb0da804e825c63469beb1934ec4267db) --- usr.sbin/config/config.8 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr.sbin/config/config.8 b/usr.sbin/config/config.8 index c8c92b5eddab..b4147843376b 100644 --- a/usr.sbin/config/config.8 +++ b/usr.sbin/config/config.8 @@ -28,7 +28,7 @@ .\" @(#)config.8 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd June 29, 2020 +.Dd April 9, 2021 .Dt CONFIG 8 .Os .Sh NAME @@ -259,7 +259,11 @@ The .Sx SYNOPSIS portion of each device in section 4. .Rs +.\" 4.4BSD SMM:2 +.%A S. J. Leffler +.%A M. J. Karels .%T "Building 4.3 BSD UNIX System with Config" +.%B 4.4BSD System Manager's Manual (SMM) .Re .Sh HISTORY The From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 19:25:58 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 AE1005DC952; Fri, 16 Apr 2021 19:25:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMR5L4Xbjz4kpn; Fri, 16 Apr 2021 19:25:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8EA9624AC; Fri, 16 Apr 2021 19:25:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GJPwwv060255; Fri, 16 Apr 2021 19:25:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GJPwsd060254; Fri, 16 Apr 2021 19:25:58 GMT (envelope-from git) Date: Fri, 16 Apr 2021 19:25:58 GMT Message-Id: <202104161925.13GJPwsd060254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 13d418a967c9 - stable/13 - Export sbuf_drain to orchestrate lock and drain action MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 13d418a967c90cfd845f41db96383ac7eb5862aa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 19:25:58 -0000 The branch stable/13 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=13d418a967c90cfd845f41db96383ac7eb5862aa commit 13d418a967c90cfd845f41db96383ac7eb5862aa Author: Richard Scheffenegger AuthorDate: 2021-03-31 16:25:53 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 18:50:48 +0000 Export sbuf_drain to orchestrate lock and drain action While exporting large amounts of data to a sysctl request, datastructures may need to be locked. Exporting the sbuf_drain function allows the coordination between drain events and held locks, to avoid stalls. PR: 254333 Reviewed By: jhb MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29481 (cherry picked from commit c804c8f2c58ba42d476de07fbceff9ac4dd95f0e) --- sys/kern/subr_sbuf.c | 2 +- sys/sys/sbuf.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_sbuf.c b/sys/kern/subr_sbuf.c index 20a831aa75b2..66822115dbcb 100644 --- a/sys/kern/subr_sbuf.c +++ b/sys/kern/subr_sbuf.c @@ -383,7 +383,7 @@ sbuf_set_drain(struct sbuf *s, sbuf_drain_func *func, void *ctx) /* * Call the drain and process the return. */ -static int +int sbuf_drain(struct sbuf *s) { int len; diff --git a/sys/sys/sbuf.h b/sys/sys/sbuf.h index 10b59f360cd0..d87e3917b84c 100644 --- a/sys/sys/sbuf.h +++ b/sys/sys/sbuf.h @@ -95,6 +95,7 @@ int sbuf_vprintf(struct sbuf *, const char *, __va_list) int sbuf_nl_terminate(struct sbuf *); int sbuf_putc(struct sbuf *, int); void sbuf_set_drain(struct sbuf *, sbuf_drain_func *, void *); +int sbuf_drain(struct sbuf *); int sbuf_trim(struct sbuf *); int sbuf_error(const struct sbuf *); int sbuf_finish(struct sbuf *); From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 19:25:59 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 E04095DC8BE; Fri, 16 Apr 2021 19:25:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMR5M5fFnz4kdX; Fri, 16 Apr 2021 19:25:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD9272516; Fri, 16 Apr 2021 19:25:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GJPx3f060283; Fri, 16 Apr 2021 19:25:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GJPxkA060282; Fri, 16 Apr 2021 19:25:59 GMT (envelope-from git) Date: Fri, 16 Apr 2021 19:25:59 GMT Message-Id: <202104161925.13GJPxkA060282@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: f1650b162d26 - stable/13 - Make sbuf_drain safe for external use MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f1650b162d26b91b6b170f10250f46617a0bcedc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 19:26:00 -0000 The branch stable/13 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=f1650b162d26b91b6b170f10250f46617a0bcedc commit f1650b162d26b91b6b170f10250f46617a0bcedc Author: Richard Scheffenegger AuthorDate: 2021-04-02 18:11:45 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 18:51:20 +0000 Make sbuf_drain safe for external use While sbuf_drain was an internal function, two KASSERTS checked the sanity of it being called. However, an external caller may be ignorant if there is any data to drain, or if an error has already accumulated. Be nice and return immediately with the accumulated error. MFC after: 2 weeks Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29544 (cherry picked from commit cad4fd0365a5e3235e715e072e6ee9dffaa7a3ab) --- sys/kern/subr_sbuf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/kern/subr_sbuf.c b/sys/kern/subr_sbuf.c index 66822115dbcb..cdeaf690208f 100644 --- a/sys/kern/subr_sbuf.c +++ b/sys/kern/subr_sbuf.c @@ -388,8 +388,12 @@ sbuf_drain(struct sbuf *s) { int len; - KASSERT(s->s_len > 0, ("Shouldn't drain empty sbuf %p", s)); - KASSERT(s->s_error == 0, ("Called %s with error on %p", __func__, s)); + /* + * Immediately return when no work to do, + * or an error has already been accumulated. + */ + if ((s->s_len == 0) || (s->s_error != 0)) + return(s->s_error); if (SBUF_DODRAINTOEOR(s) && s->s_rec_off == 0) return (s->s_error = EDEADLK); From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 19:36:19 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 CDF6A5DCFA0; Fri, 16 Apr 2021 19:36:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMRKH5KrNz4l7d; Fri, 16 Apr 2021 19:36:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA15227AA; Fri, 16 Apr 2021 19:36:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GJaJNj073798; Fri, 16 Apr 2021 19:36:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GJaJse073797; Fri, 16 Apr 2021 19:36:19 GMT (envelope-from git) Date: Fri, 16 Apr 2021 19:36:19 GMT Message-Id: <202104161936.13GJaJse073797@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: dc5281a7d439 - stable/12 - Export sbuf_drain to orchestrate lock and drain action MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: dc5281a7d43917c55905d8b83a5bef69b8013071 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 19:36:19 -0000 The branch stable/12 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=dc5281a7d43917c55905d8b83a5bef69b8013071 commit dc5281a7d43917c55905d8b83a5bef69b8013071 Author: Richard Scheffenegger AuthorDate: 2021-03-31 16:25:53 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 19:27:15 +0000 Export sbuf_drain to orchestrate lock and drain action While exporting large amounts of data to a sysctl request, datastructures may need to be locked. Exporting the sbuf_drain function allows the coordination between drain events and held locks, to avoid stalls. PR: 254333 Reviewed By: jhb MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29481 (cherry picked from commit c804c8f2c58ba42d476de07fbceff9ac4dd95f0e) --- sys/kern/subr_sbuf.c | 2 +- sys/sys/sbuf.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_sbuf.c b/sys/kern/subr_sbuf.c index 8fba9710debc..c8f2af2ebca2 100644 --- a/sys/kern/subr_sbuf.c +++ b/sys/kern/subr_sbuf.c @@ -375,7 +375,7 @@ sbuf_set_drain(struct sbuf *s, sbuf_drain_func *func, void *ctx) /* * Call the drain and process the return. */ -static int +int sbuf_drain(struct sbuf *s) { int len; diff --git a/sys/sys/sbuf.h b/sys/sys/sbuf.h index a3b0a179c268..1927996c8f38 100644 --- a/sys/sys/sbuf.h +++ b/sys/sys/sbuf.h @@ -92,6 +92,7 @@ int sbuf_vprintf(struct sbuf *, const char *, __va_list) __printflike(2, 0); int sbuf_putc(struct sbuf *, int); void sbuf_set_drain(struct sbuf *, sbuf_drain_func *, void *); +int sbuf_drain(struct sbuf *); int sbuf_trim(struct sbuf *); int sbuf_error(const struct sbuf *); int sbuf_finish(struct sbuf *); From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 19:36:21 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 028315DD00C; Fri, 16 Apr 2021 19:36:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMRKJ67yxz4lS7; Fri, 16 Apr 2021 19:36:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C0AF124DE; Fri, 16 Apr 2021 19:36:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GJaK6P073819; Fri, 16 Apr 2021 19:36:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GJaK8M073818; Fri, 16 Apr 2021 19:36:20 GMT (envelope-from git) Date: Fri, 16 Apr 2021 19:36:20 GMT Message-Id: <202104161936.13GJaK8M073818@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 424f6363927a - stable/12 - Make sbuf_drain safe for external use MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 424f6363927a113fe5a1dcb4691039ec25cf3680 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 19:36:21 -0000 The branch stable/12 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=424f6363927a113fe5a1dcb4691039ec25cf3680 commit 424f6363927a113fe5a1dcb4691039ec25cf3680 Author: Richard Scheffenegger AuthorDate: 2021-04-02 18:11:45 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 19:34:26 +0000 Make sbuf_drain safe for external use While sbuf_drain was an internal function, two KASSERTS checked the sanity of it being called. However, an external caller may be ignorant if there is any data to drain, or if an error has already accumulated. Be nice and return immediately with the accumulated error. MFC after: 2 weeks Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29544 (cherry picked from commit cad4fd0365a5e3235e715e072e6ee9dffaa7a3ab) --- sys/kern/subr_sbuf.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/kern/subr_sbuf.c b/sys/kern/subr_sbuf.c index c8f2af2ebca2..ac6bc14b7a8c 100644 --- a/sys/kern/subr_sbuf.c +++ b/sys/kern/subr_sbuf.c @@ -380,8 +380,13 @@ sbuf_drain(struct sbuf *s) { int len; - KASSERT(s->s_len > 0, ("Shouldn't drain empty sbuf %p", s)); - KASSERT(s->s_error == 0, ("Called %s with error on %p", __func__, s)); + /* + * Immediately return when no work to do, + * or an error has already been accumulated. + */ + if ((s->s_len == 0) || (s->s_error != 0)) + return(s->s_error); + if (SBUF_DODRAINTOEOR(s) && s->s_rec_off == 0) return (s->s_error = EDEADLK); len = s->s_drain_func(s->s_drain_arg, s->s_buf, From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 19:40:59 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 12F0B5DD1D8; Fri, 16 Apr 2021 19:40:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMRQg04xHz4lf6; Fri, 16 Apr 2021 19:40:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA3352477; Fri, 16 Apr 2021 19:40:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GJewfK083261; Fri, 16 Apr 2021 19:40:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GJewjs083260; Fri, 16 Apr 2021 19:40:58 GMT (envelope-from git) Date: Fri, 16 Apr 2021 19:40:58 GMT Message-Id: <202104161940.13GJewjs083260@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 6ab67f3b20ac - stable/11 - Export sbuf_drain to orchestrate lock and drain action MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 6ab67f3b20ac44e9e9741bd0bdf557c3aa118d32 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 19:40:59 -0000 The branch stable/11 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=6ab67f3b20ac44e9e9741bd0bdf557c3aa118d32 commit 6ab67f3b20ac44e9e9741bd0bdf557c3aa118d32 Author: Richard Scheffenegger AuthorDate: 2021-03-31 16:25:53 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 19:37:02 +0000 Export sbuf_drain to orchestrate lock and drain action While exporting large amounts of data to a sysctl request, datastructures may need to be locked. Exporting the sbuf_drain function allows the coordination between drain events and held locks, to avoid stalls. PR: 254333 Reviewed By: jhb MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29481 (cherry picked from commit c804c8f2c58ba42d476de07fbceff9ac4dd95f0e) --- sys/kern/subr_sbuf.c | 2 +- sys/sys/sbuf.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_sbuf.c b/sys/kern/subr_sbuf.c index d7465f9dd758..164209988670 100644 --- a/sys/kern/subr_sbuf.c +++ b/sys/kern/subr_sbuf.c @@ -355,7 +355,7 @@ sbuf_set_drain(struct sbuf *s, sbuf_drain_func *func, void *ctx) /* * Call the drain and process the return. */ -static int +int sbuf_drain(struct sbuf *s) { int len; diff --git a/sys/sys/sbuf.h b/sys/sys/sbuf.h index c05bafd1e598..be574fe7910b 100644 --- a/sys/sys/sbuf.h +++ b/sys/sys/sbuf.h @@ -88,6 +88,7 @@ int sbuf_vprintf(struct sbuf *, const char *, __va_list) __printflike(2, 0); int sbuf_putc(struct sbuf *, int); void sbuf_set_drain(struct sbuf *, sbuf_drain_func *, void *); +int sbuf_drain(struct sbuf *); int sbuf_trim(struct sbuf *); int sbuf_error(const struct sbuf *); int sbuf_finish(struct sbuf *); From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 19:41:00 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 5E0F15DD31C; Fri, 16 Apr 2021 19:41:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMRQh1Tkzz4lnJ; Fri, 16 Apr 2021 19:41:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 11F3E27B5; Fri, 16 Apr 2021 19:41:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GJexvX083282; Fri, 16 Apr 2021 19:40:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GJexef083281; Fri, 16 Apr 2021 19:40:59 GMT (envelope-from git) Date: Fri, 16 Apr 2021 19:40:59 GMT Message-Id: <202104161940.13GJexef083281@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 2e96d6ef392e - stable/11 - Make sbuf_drain safe for external use MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 2e96d6ef392e2280a8cb39d89932596c3524ddda Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 19:41:00 -0000 The branch stable/11 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=2e96d6ef392e2280a8cb39d89932596c3524ddda commit 2e96d6ef392e2280a8cb39d89932596c3524ddda Author: Richard Scheffenegger AuthorDate: 2021-04-02 18:11:45 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 19:39:52 +0000 Make sbuf_drain safe for external use While sbuf_drain was an internal function, two KASSERTS checked the sanity of it being called. However, an external caller may be ignorant if there is any data to drain, or if an error has already accumulated. Be nice and return immediately with the accumulated error. MFC after: 2 weeks Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29544 (cherry picked from commit cad4fd0365a5e3235e715e072e6ee9dffaa7a3ab) --- sys/kern/subr_sbuf.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/kern/subr_sbuf.c b/sys/kern/subr_sbuf.c index 164209988670..01865ac259ab 100644 --- a/sys/kern/subr_sbuf.c +++ b/sys/kern/subr_sbuf.c @@ -360,8 +360,13 @@ sbuf_drain(struct sbuf *s) { int len; - KASSERT(s->s_len > 0, ("Shouldn't drain empty sbuf %p", s)); - KASSERT(s->s_error == 0, ("Called %s with error on %p", __func__, s)); + /* + * Immediately return when no work to do, + * or an error has already been accumulated. + */ + if ((s->s_len == 0) || (s->s_error != 0)) + return(s->s_error); + len = s->s_drain_func(s->s_drain_arg, s->s_buf, s->s_len); if (len < 0) { s->s_error = -len; From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 20:45:31 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 8550A5DF81D; Fri, 16 Apr 2021 20:45:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMSs73LBXz4ppD; Fri, 16 Apr 2021 20:45:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 65EAB3079; Fri, 16 Apr 2021 20:45:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GKjVOF065948; Fri, 16 Apr 2021 20:45:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GKjV95065947; Fri, 16 Apr 2021 20:45:31 GMT (envelope-from git) Date: Fri, 16 Apr 2021 20:45:31 GMT Message-Id: <202104162045.13GKjV95065947@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 831be7fa19ef - stable/13 - tcp: reduce memory footprint when listing tcp hostcache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 831be7fa19ef10c78da51c222693a5a2083d1da4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 20:45:31 -0000 The branch stable/13 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=831be7fa19ef10c78da51c222693a5a2083d1da4 commit 831be7fa19ef10c78da51c222693a5a2083d1da4 Author: Richard Scheffenegger AuthorDate: 2021-03-28 21:12:03 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 19:42:45 +0000 tcp: reduce memory footprint when listing tcp hostcache In tcp_hostcache_list, the sbuf used would need a large (~2MB) blocking allocation of memory (M_WAITOK), when listing a full hostcache. This may stall the requestor for an indeterminate time. A further optimization is to return the expected userspace buffersize right away, rather than preparing the output of each current entry of the hostcase, provided by: @tuexen. This makes use of the ready-made functions of sbuf to work with sysctl, and repeatedly drain the much smaller buffer. PR: 254333 MFC after: 2 weeks Reviewed By: #transport, tuexen Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29471 (cherry picked from commit cb0dd7e122b8936ad61a141e65ef8ef874bfebe5) --- sys/netinet/tcp_hostcache.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index de999bcfda22..5fe905d9abf5 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -628,7 +628,7 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) { const int linesize = 128; struct sbuf sb; - int i, error; + int i, error, len; struct hc_metrics *hc_entry; char ip4buf[INET_ADDRSTRLEN]; #ifdef INET6 @@ -638,11 +638,22 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) if (jailed_without_vnet(curthread->td_ucred) != 0) return (EPERM); - sbuf_new(&sb, NULL, linesize * (V_tcp_hostcache.cache_count + 1), - SBUF_INCLUDENUL); + /* Optimize Buffer length query by sbin/sysctl */ + if (req->oldptr == NULL) { + len = (V_tcp_hostcache.cache_count + 1) * linesize; + return (SYSCTL_OUT(req, NULL, len)); + } + + error = sysctl_wire_old_buffer(req, 0); + if (error != 0) { + return(error); + } + + /* Use a buffer for 16 lines */ + sbuf_new_for_sysctl(&sb, NULL, 16 * linesize, req); sbuf_printf(&sb, - "\nIP address MTU SSTRESH RTT RTTVAR " + "\nIP address MTU SSTRESH RTT RTTVAR " " CWND SENDPIPE RECVPIPE HITS UPD EXP\n"); #define msec(u) (((u) + 500) / 1000) @@ -677,8 +688,6 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) } #undef msec error = sbuf_finish(&sb); - if (error == 0) - error = SYSCTL_OUT(req, sbuf_data(&sb), sbuf_len(&sb)); sbuf_delete(&sb); return(error); } From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 20:45:32 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 B0D2F5DF532; Fri, 16 Apr 2021 20:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMSs84WWdz4prQ; Fri, 16 Apr 2021 20:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C71A372F; Fri, 16 Apr 2021 20:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GKjW31065972; Fri, 16 Apr 2021 20:45:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GKjWfI065971; Fri, 16 Apr 2021 20:45:32 GMT (envelope-from git) Date: Fri, 16 Apr 2021 20:45:32 GMT Message-Id: <202104162045.13GKjWfI065971@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: e610ebe5d351 - stable/13 - tcp: drain tcp_hostcache_list in between per-bucket locks MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e610ebe5d351c0570101ec58f1642904a30051ae Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 20:45:32 -0000 The branch stable/13 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=e610ebe5d351c0570101ec58f1642904a30051ae commit e610ebe5d351c0570101ec58f1642904a30051ae Author: Richard Scheffenegger AuthorDate: 2021-03-31 17:24:01 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 19:42:58 +0000 tcp: drain tcp_hostcache_list in between per-bucket locks Explicitly drain the sbuf after completing each hash bucket to minimize the work performed while holding the hash bucket lock. PR: 254333 MFC after: 2 weeks Reviewed By: tuexen, jhb, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29483 (cherry picked from commit 869880463cc2ce64e2e6599eaec880a981f3ced6) --- sys/netinet/tcp_hostcache.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index 5fe905d9abf5..b6d0c0410df9 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -649,12 +649,13 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) return(error); } - /* Use a buffer for 16 lines */ - sbuf_new_for_sysctl(&sb, NULL, 16 * linesize, req); + /* Use a buffer sized for one full bucket */ + sbuf_new_for_sysctl(&sb, NULL, V_tcp_hostcache.bucket_limit * linesize, req); sbuf_printf(&sb, "\nIP address MTU SSTRESH RTT RTTVAR " " CWND SENDPIPE RECVPIPE HITS UPD EXP\n"); + sbuf_drain(&sb); #define msec(u) (((u) + 500) / 1000) for (i = 0; i < V_tcp_hostcache.hashsize; i++) { @@ -685,6 +686,7 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) hc_entry->rmx_expire); } THC_UNLOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); + sbuf_drain(&sb); } #undef msec error = sbuf_finish(&sb); From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 20:45:35 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 1CDBC5DF822; Fri, 16 Apr 2021 20:45:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMSsC01ptz4prb; Fri, 16 Apr 2021 20:45:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C748D389A; Fri, 16 Apr 2021 20:45:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GKjY0m066014; Fri, 16 Apr 2021 20:45:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GKjYvH066013; Fri, 16 Apr 2021 20:45:34 GMT (envelope-from git) Date: Fri, 16 Apr 2021 20:45:34 GMT Message-Id: <202104162045.13GKjYvH066013@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 4052275c2fc5 - stable/13 - tcp: For hostcache performance, use atomics instead of counters MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4052275c2fc5f96b4a208404733713959afe68f6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 20:45:35 -0000 The branch stable/13 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=4052275c2fc5f96b4a208404733713959afe68f6 commit 4052275c2fc5f96b4a208404733713959afe68f6 Author: Richard Scheffenegger AuthorDate: 2021-04-01 08:00:32 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 19:44:00 +0000 tcp: For hostcache performance, use atomics instead of counters As accessing the tcp hostcache happens frequently on some classes of servers, it was recommended to use atomic_add/subtract rather than (per-CPU distributed) counters, which have to be summed up at high cost to cache efficiency in a hot codepath. PR: 254333 MFC after: 2 weeks Sponsored by: NetApp, Inc. Reviewed By: #transport, tuexen, jtl Differential Revision: https://reviews.freebsd.org/D29522 (cherry picked from commit 529a2a0f2765f6c57c50a5af6be242c03bf714e3) --- sys/netinet/tcp_hostcache.c | 24 +++++++++++------------- sys/netinet/tcp_hostcache.h | 2 +- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index 67da97405c3f..87023cc1a760 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -147,8 +147,8 @@ SYSCTL_UINT(_net_inet_tcp_hostcache, OID_AUTO, bucketlimit, CTLFLAG_VNET | CTLFLAG_RDTUN, &VNET_NAME(tcp_hostcache.bucket_limit), 0, "Per-bucket hash limit for hostcache"); -SYSCTL_COUNTER_U64(_net_inet_tcp_hostcache, OID_AUTO, count, CTLFLAG_VNET | CTLFLAG_RD, - &VNET_NAME(tcp_hostcache.cache_count), +SYSCTL_UINT(_net_inet_tcp_hostcache, OID_AUTO, count, CTLFLAG_VNET | CTLFLAG_RD, + &VNET_NAME(tcp_hostcache.cache_count), 0, "Current number of entries in hostcache"); SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, expire, CTLFLAG_VNET | CTLFLAG_RW, @@ -199,8 +199,7 @@ tcp_hc_init(void) /* * Initialize hostcache structures. */ - V_tcp_hostcache.cache_count = counter_u64_alloc(M_WAITOK); - counter_u64_zero(V_tcp_hostcache.cache_count); + atomic_store_int(&V_tcp_hostcache.cache_count, 0); V_tcp_hostcache.hashsize = TCP_HOSTCACHE_HASHSIZE; V_tcp_hostcache.bucket_limit = TCP_HOSTCACHE_BUCKETLIMIT; V_tcp_hostcache.expire = TCP_HOSTCACHE_EXPIRE; @@ -268,9 +267,6 @@ tcp_hc_destroy(void) /* Purge all hc entries. */ tcp_hc_purge_internal(1); - /* Release the counter */ - counter_u64_free(V_tcp_hostcache.cache_count); - /* Free the uma zone and the allocated hash table. */ uma_zdestroy(V_tcp_hostcache.zone); @@ -378,7 +374,7 @@ tcp_hc_insert(struct in_conninfo *inc) * If the bucket limit is reached, reuse the least-used element. */ if (hc_head->hch_length >= V_tcp_hostcache.bucket_limit || - counter_u64_fetch(V_tcp_hostcache.cache_count) >= V_tcp_hostcache.cache_limit) { + atomic_load_int(&V_tcp_hostcache.cache_count) >= V_tcp_hostcache.cache_limit) { hc_entry = TAILQ_LAST(&hc_head->hch_bucket, hc_qhead); /* * At first we were dropping the last element, just to @@ -395,7 +391,7 @@ tcp_hc_insert(struct in_conninfo *inc) } TAILQ_REMOVE(&hc_head->hch_bucket, hc_entry, rmx_q); V_tcp_hostcache.hashbase[hash].hch_length--; - counter_u64_add(V_tcp_hostcache.cache_count, -1); + atomic_subtract_int(&V_tcp_hostcache.cache_count, 1); TCPSTAT_INC(tcps_hc_bucketoverflow); #if 0 uma_zfree(V_tcp_hostcache.zone, hc_entry); @@ -428,7 +424,7 @@ tcp_hc_insert(struct in_conninfo *inc) */ TAILQ_INSERT_HEAD(&hc_head->hch_bucket, hc_entry, rmx_q); V_tcp_hostcache.hashbase[hash].hch_length++; - counter_u64_add(V_tcp_hostcache.cache_count, 1); + atomic_add_int(&V_tcp_hostcache.cache_count, 1); TCPSTAT_INC(tcps_hc_added); return hc_entry; @@ -644,7 +640,8 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) /* Optimize Buffer length query by sbin/sysctl */ if (req->oldptr == NULL) { - len = (counter_u64_fetch(V_tcp_hostcache.cache_count) + 1) * linesize; + len = (atomic_load_int(&V_tcp_hostcache.cache_count) + 1) * + linesize; return (SYSCTL_OUT(req, NULL, len)); } @@ -654,7 +651,8 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) } /* Use a buffer sized for one full bucket */ - sbuf_new_for_sysctl(&sb, NULL, V_tcp_hostcache.bucket_limit * linesize, req); + sbuf_new_for_sysctl(&sb, NULL, V_tcp_hostcache.bucket_limit * + linesize, req); sbuf_printf(&sb, "\nIP address MTU SSTRESH RTT RTTVAR " @@ -716,7 +714,7 @@ tcp_hc_purge_internal(int all) hc_entry, rmx_q); uma_zfree(V_tcp_hostcache.zone, hc_entry); V_tcp_hostcache.hashbase[i].hch_length--; - counter_u64_add(V_tcp_hostcache.cache_count, -1); + atomic_subtract_int(&V_tcp_hostcache.cache_count, 1); } else hc_entry->rmx_expire -= V_tcp_hostcache.prune; } diff --git a/sys/netinet/tcp_hostcache.h b/sys/netinet/tcp_hostcache.h index b5237392acc2..2f7035c0c6af 100644 --- a/sys/netinet/tcp_hostcache.h +++ b/sys/netinet/tcp_hostcache.h @@ -74,7 +74,7 @@ struct tcp_hostcache { u_int hashsize; u_int hashmask; u_int bucket_limit; - counter_u64_t cache_count; + u_int cache_count; u_int cache_limit; int expire; int prune; From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 20:45:34 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 EB3895DF820; Fri, 16 Apr 2021 20:45:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMSs95XC5z4prW; Fri, 16 Apr 2021 20:45:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A04693730; Fri, 16 Apr 2021 20:45:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GKjXNS065993; Fri, 16 Apr 2021 20:45:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GKjXaK065992; Fri, 16 Apr 2021 20:45:33 GMT (envelope-from git) Date: Fri, 16 Apr 2021 20:45:33 GMT Message-Id: <202104162045.13GKjXaK065992@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 632e3363087c - stable/13 - tcp: Make hostcache.cache_count MPSAFE by using a counter_u64_t MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 632e3363087cb6ef2a7b26a291a044b97afabea7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 20:45:34 -0000 The branch stable/13 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=632e3363087cb6ef2a7b26a291a044b97afabea7 commit 632e3363087cb6ef2a7b26a291a044b97afabea7 Author: Richard Scheffenegger AuthorDate: 2021-03-31 17:30:20 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 19:43:14 +0000 tcp: Make hostcache.cache_count MPSAFE by using a counter_u64_t Addressing the underlying root cause for cache_count to show unexpectedly high values, by protecting all arithmetic on that global variable by using counter(9). PR: 254333 Reviewed By: tuexen, #transport MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29510 (cherry picked from commit 95e56d31e348594973affd0ea81d8f8383bc3031) --- sys/netinet/tcp_hostcache.c | 20 ++++++++++++-------- sys/netinet/tcp_hostcache.h | 20 ++++++++++---------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index b6d0c0410df9..67da97405c3f 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -147,8 +147,8 @@ SYSCTL_UINT(_net_inet_tcp_hostcache, OID_AUTO, bucketlimit, CTLFLAG_VNET | CTLFLAG_RDTUN, &VNET_NAME(tcp_hostcache.bucket_limit), 0, "Per-bucket hash limit for hostcache"); -SYSCTL_UINT(_net_inet_tcp_hostcache, OID_AUTO, count, CTLFLAG_VNET | CTLFLAG_RD, - &VNET_NAME(tcp_hostcache.cache_count), 0, +SYSCTL_COUNTER_U64(_net_inet_tcp_hostcache, OID_AUTO, count, CTLFLAG_VNET | CTLFLAG_RD, + &VNET_NAME(tcp_hostcache.cache_count), "Current number of entries in hostcache"); SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, expire, CTLFLAG_VNET | CTLFLAG_RW, @@ -199,7 +199,8 @@ tcp_hc_init(void) /* * Initialize hostcache structures. */ - V_tcp_hostcache.cache_count = 0; + V_tcp_hostcache.cache_count = counter_u64_alloc(M_WAITOK); + counter_u64_zero(V_tcp_hostcache.cache_count); V_tcp_hostcache.hashsize = TCP_HOSTCACHE_HASHSIZE; V_tcp_hostcache.bucket_limit = TCP_HOSTCACHE_BUCKETLIMIT; V_tcp_hostcache.expire = TCP_HOSTCACHE_EXPIRE; @@ -267,6 +268,9 @@ tcp_hc_destroy(void) /* Purge all hc entries. */ tcp_hc_purge_internal(1); + /* Release the counter */ + counter_u64_free(V_tcp_hostcache.cache_count); + /* Free the uma zone and the allocated hash table. */ uma_zdestroy(V_tcp_hostcache.zone); @@ -374,7 +378,7 @@ tcp_hc_insert(struct in_conninfo *inc) * If the bucket limit is reached, reuse the least-used element. */ if (hc_head->hch_length >= V_tcp_hostcache.bucket_limit || - V_tcp_hostcache.cache_count >= V_tcp_hostcache.cache_limit) { + counter_u64_fetch(V_tcp_hostcache.cache_count) >= V_tcp_hostcache.cache_limit) { hc_entry = TAILQ_LAST(&hc_head->hch_bucket, hc_qhead); /* * At first we were dropping the last element, just to @@ -391,7 +395,7 @@ tcp_hc_insert(struct in_conninfo *inc) } TAILQ_REMOVE(&hc_head->hch_bucket, hc_entry, rmx_q); V_tcp_hostcache.hashbase[hash].hch_length--; - V_tcp_hostcache.cache_count--; + counter_u64_add(V_tcp_hostcache.cache_count, -1); TCPSTAT_INC(tcps_hc_bucketoverflow); #if 0 uma_zfree(V_tcp_hostcache.zone, hc_entry); @@ -424,7 +428,7 @@ tcp_hc_insert(struct in_conninfo *inc) */ TAILQ_INSERT_HEAD(&hc_head->hch_bucket, hc_entry, rmx_q); V_tcp_hostcache.hashbase[hash].hch_length++; - V_tcp_hostcache.cache_count++; + counter_u64_add(V_tcp_hostcache.cache_count, 1); TCPSTAT_INC(tcps_hc_added); return hc_entry; @@ -640,7 +644,7 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) /* Optimize Buffer length query by sbin/sysctl */ if (req->oldptr == NULL) { - len = (V_tcp_hostcache.cache_count + 1) * linesize; + len = (counter_u64_fetch(V_tcp_hostcache.cache_count) + 1) * linesize; return (SYSCTL_OUT(req, NULL, len)); } @@ -712,7 +716,7 @@ tcp_hc_purge_internal(int all) hc_entry, rmx_q); uma_zfree(V_tcp_hostcache.zone, hc_entry); V_tcp_hostcache.hashbase[i].hch_length--; - V_tcp_hostcache.cache_count--; + counter_u64_add(V_tcp_hostcache.cache_count, -1); } else hc_entry->rmx_expire -= V_tcp_hostcache.prune; } diff --git a/sys/netinet/tcp_hostcache.h b/sys/netinet/tcp_hostcache.h index f4e1013aac60..b5237392acc2 100644 --- a/sys/netinet/tcp_hostcache.h +++ b/sys/netinet/tcp_hostcache.h @@ -69,16 +69,16 @@ struct hc_metrics { }; struct tcp_hostcache { - struct hc_head *hashbase; - uma_zone_t zone; - u_int hashsize; - u_int hashmask; - u_int bucket_limit; - u_int cache_count; - u_int cache_limit; - int expire; - int prune; - int purgeall; + struct hc_head *hashbase; + uma_zone_t zone; + u_int hashsize; + u_int hashmask; + u_int bucket_limit; + counter_u64_t cache_count; + u_int cache_limit; + int expire; + int prune; + int purgeall; }; #endif /* !_NETINET_TCP_HOSTCACHE_H_*/ From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 20:45:36 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 31D995DF777; Fri, 16 Apr 2021 20:45:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMSsD07jCz4px1; Fri, 16 Apr 2021 20:45:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E73653152; Fri, 16 Apr 2021 20:45:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GKjZDA066035; Fri, 16 Apr 2021 20:45:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GKjZMs066034; Fri, 16 Apr 2021 20:45:35 GMT (envelope-from git) Date: Fri, 16 Apr 2021 20:45:35 GMT Message-Id: <202104162045.13GKjZMs066034@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 38088b12fe64 - stable/13 - tcp: Add hash histogram output and validate bucket length accounting MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 38088b12fe64f35d4f80b5a8f257b1edcdd6ffae Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 20:45:36 -0000 The branch stable/13 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=38088b12fe64f35d4f80b5a8f257b1edcdd6ffae commit 38088b12fe64f35d4f80b5a8f257b1edcdd6ffae Author: Richard Scheffenegger AuthorDate: 2021-04-01 12:44:05 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 19:53:15 +0000 tcp: Add hash histogram output and validate bucket length accounting Provide a histogram output to check, if the hashsize or bucketlimit could be optimized. Also add some basic sanity checks around the accounting of the hash utilization. MFC after: 2 weeks Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29506 (cherry picked from commit 02f26e98c7f4d43d6bd077421286da455e069146) --- sys/netinet/tcp_hostcache.c | 62 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index 87023cc1a760..36439e90a611 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -121,6 +121,7 @@ VNET_DEFINE_STATIC(struct callout, tcp_hc_callout); static struct hc_metrics *tcp_hc_lookup(struct in_conninfo *); static struct hc_metrics *tcp_hc_insert(struct in_conninfo *); static int sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS); +static int sysctl_tcp_hc_histo(SYSCTL_HANDLER_ARGS); static int sysctl_tcp_hc_purgenow(SYSCTL_HANDLER_ARGS); static void tcp_hc_purge_internal(int); static void tcp_hc_purge(void *); @@ -168,6 +169,11 @@ SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, list, 0, 0, sysctl_tcp_hc_list, "A", "List of all hostcache entries"); +SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, histo, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE, + 0, 0, sysctl_tcp_hc_histo, "A", + "Print a histogram of hostcache hashbucket utilization"); + SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, purgenow, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0, sysctl_tcp_hc_purgenow, "I", @@ -390,6 +396,11 @@ tcp_hc_insert(struct in_conninfo *inc) return NULL; } TAILQ_REMOVE(&hc_head->hch_bucket, hc_entry, rmx_q); + KASSERT(V_tcp_hostcache.hashbase[hash].hch_length > 0 && + V_tcp_hostcache.hashbase[hash].hch_length <= + V_tcp_hostcache.bucket_limit, + ("tcp_hostcache: bucket length range violated at %u: %u", + hash, V_tcp_hostcache.hashbase[hash].hch_length)); V_tcp_hostcache.hashbase[hash].hch_length--; atomic_subtract_int(&V_tcp_hostcache.cache_count, 1); TCPSTAT_INC(tcps_hc_bucketoverflow); @@ -424,6 +435,10 @@ tcp_hc_insert(struct in_conninfo *inc) */ TAILQ_INSERT_HEAD(&hc_head->hch_bucket, hc_entry, rmx_q); V_tcp_hostcache.hashbase[hash].hch_length++; + KASSERT(V_tcp_hostcache.hashbase[hash].hch_length < + V_tcp_hostcache.bucket_limit, + ("tcp_hostcache: bucket length too high at %u: %u", + hash, V_tcp_hostcache.hashbase[hash].hch_length)); atomic_add_int(&V_tcp_hostcache.cache_count, 1); TCPSTAT_INC(tcps_hc_added); @@ -696,6 +711,48 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) return(error); } +/* + * Sysctl function: prints a histogram of the hostcache hashbucket + * utilization. + */ +static int +sysctl_tcp_hc_histo(SYSCTL_HANDLER_ARGS) +{ + const int linesize = 50; + struct sbuf sb; + int i, error; + int *histo; + u_int hch_length; + + if (jailed_without_vnet(curthread->td_ucred) != 0) + return (EPERM); + + histo = (int *)malloc(sizeof(int) * (V_tcp_hostcache.bucket_limit + 1), + M_TEMP, M_NOWAIT|M_ZERO); + if (histo == NULL) + return(ENOMEM); + + for (i = 0; i < V_tcp_hostcache.hashsize; i++) { + hch_length = V_tcp_hostcache.hashbase[i].hch_length; + KASSERT(hch_length <= V_tcp_hostcache.bucket_limit, + ("tcp_hostcache: bucket limit exceeded at %u: %u", + i, hch_length)); + histo[hch_length]++; + } + + /* Use a buffer for 16 lines */ + sbuf_new_for_sysctl(&sb, NULL, 16 * linesize, req); + + sbuf_printf(&sb, "\nLength\tCount\n"); + for (i = 0; i <= V_tcp_hostcache.bucket_limit; i++) { + sbuf_printf(&sb, "%u\t%u\n", i, histo[i]); + } + error = sbuf_finish(&sb); + sbuf_delete(&sb); + free(histo, M_TEMP); + return(error); +} + /* * Caller has to make sure the curvnet is set properly. */ @@ -709,6 +766,11 @@ tcp_hc_purge_internal(int all) THC_LOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); TAILQ_FOREACH_SAFE(hc_entry, &V_tcp_hostcache.hashbase[i].hch_bucket, rmx_q, hc_next) { + KASSERT(V_tcp_hostcache.hashbase[i].hch_length > 0 && + V_tcp_hostcache.hashbase[i].hch_length <= + V_tcp_hostcache.bucket_limit, + ("tcp_hostcache: bucket langth out of range at %u: %u", + i, V_tcp_hostcache.hashbase[i].hch_length)); if (all || hc_entry->rmx_expire <= 0) { TAILQ_REMOVE(&V_tcp_hostcache.hashbase[i].hch_bucket, hc_entry, rmx_q); From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 20:45:37 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 8DCAD5DF54B; Fri, 16 Apr 2021 20:45:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMSsF2Fmpz4prp; Fri, 16 Apr 2021 20:45:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1668F307A; Fri, 16 Apr 2021 20:45:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GKjaVL066056; Fri, 16 Apr 2021 20:45:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GKjanT066055; Fri, 16 Apr 2021 20:45:36 GMT (envelope-from git) Date: Fri, 16 Apr 2021 20:45:36 GMT Message-Id: <202104162045.13GKjanT066055@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 9f3835013032 - stable/13 - tcp: Shouldn't drain empty sbuf MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9f38350130322d0fbfaa250946f0841f50d743b5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 20:45:37 -0000 The branch stable/13 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=9f38350130322d0fbfaa250946f0841f50d743b5 commit 9f38350130322d0fbfaa250946f0841f50d743b5 Author: Richard Scheffenegger AuthorDate: 2021-04-01 15:18:04 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 19:53:36 +0000 tcp: Shouldn't drain empty sbuf MFC after: 2 weeks Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29524 (cherry picked from commit 9aef4e7c2bd4371e526e4e3feb26064d361ad8ce) --- sys/netinet/tcp_hostcache.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index 36439e90a611..a8c4b2b178cd 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -644,6 +644,7 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) const int linesize = 128; struct sbuf sb; int i, error, len; + bool do_drain = false; struct hc_metrics *hc_entry; char ip4buf[INET_ADDRSTRLEN]; #ifdef INET6 @@ -701,9 +702,16 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) hc_entry->rmx_hits, hc_entry->rmx_updates, hc_entry->rmx_expire); + do_drain = true; } THC_UNLOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); - sbuf_drain(&sb); + /* Need to track if sbuf has data, to avoid + * a KASSERT when calling sbuf_drain. + */ + if (do_drain) { + sbuf_drain(&sb); + do_drain = false; + } } #undef msec error = sbuf_finish(&sb); @@ -769,7 +777,7 @@ tcp_hc_purge_internal(int all) KASSERT(V_tcp_hostcache.hashbase[i].hch_length > 0 && V_tcp_hostcache.hashbase[i].hch_length <= V_tcp_hostcache.bucket_limit, - ("tcp_hostcache: bucket langth out of range at %u: %u", + ("tcp_hostcache: bucket length out of range at %u: %u", i, V_tcp_hostcache.hashbase[i].hch_length)); if (all || hc_entry->rmx_expire <= 0) { TAILQ_REMOVE(&V_tcp_hostcache.hashbase[i].hch_bucket, From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 20:45:39 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 A2BE55DF823; Fri, 16 Apr 2021 20:45:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMSsH3Kkxz4px8; Fri, 16 Apr 2021 20:45:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5F4C3391F; Fri, 16 Apr 2021 20:45:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GKjdOe066104; Fri, 16 Apr 2021 20:45:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GKjdna066103; Fri, 16 Apr 2021 20:45:39 GMT (envelope-from git) Date: Fri, 16 Apr 2021 20:45:39 GMT Message-Id: <202104162045.13GKjdna066103@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 139576030ff3 - stable/13 - tcp: Use jenkins_hash32() in hostcache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 139576030ff339e164f7b6a41bf382e147d41053 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 20:45:39 -0000 The branch stable/13 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=139576030ff339e164f7b6a41bf382e147d41053 commit 139576030ff339e164f7b6a41bf382e147d41053 Author: Richard Scheffenegger AuthorDate: 2021-04-08 18:28:43 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 20:44:03 +0000 tcp: Use jenkins_hash32() in hostcache As other parts of the base tcp stack (eg. tcp fastopen) already use jenkins_hash32, and the properties appear reasonably good, switching to use that. Reviewed By: tuexen, #transport, ae MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29515 (cherry picked from commit b878ec024bbee063f4181c9be08476a864fa6a7b) --- share/man/man4/tcp.4 | 52 +++++++++++++++++++++++++++++++++++++++++++-- sys/netinet/tcp_hostcache.c | 18 ++++++++++------ sys/netinet/tcp_hostcache.h | 1 + 3 files changed, 62 insertions(+), 9 deletions(-) diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index 16cf02184516..d01505e58427 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -34,7 +34,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd February 13, 2021 +.Dd April 8, 2021 .Dt TCP 4 .Os .Sh NAME @@ -628,7 +628,6 @@ Defaults to 60 seconds. Enable support for TCP Explicit Congestion Notification (ECN). ECN allows a TCP sender to reduce the transmission rate in order to avoid packet drops. -Settings: .Bl -tag -compact .It 0 Disable ECN. @@ -638,6 +637,7 @@ Outgoing connections will request ECN. .It 2 Allow incoming connections to request ECN. Outgoing connections will not request ECN. +(default) .El .It Va ecn.maxretries Number of retries (SYN or SYN/ACK retransmits) before disabling ECN on a @@ -674,6 +674,54 @@ Enable path MTU blackhole detection only for IPv6. MSS to try for IPv4 if PMTU blackhole detection is turned on. .It Va v6pmtud_blackhole_mss MSS to try for IPv6 if PMTU blackhole detection is turned on. +.It Va hostcache.enable +The TCP host cache is used to cache connection details and metrics to +improve future performance of connections between the same hosts. +At the completion of a TCP connection, a host will cache information +for the connection for some defined period of time. +.Bl -tag -compact +.It 0 +Disable the host cache. +.It 1 +Enable the host cache. (default) +.It Va hostcache.purgenow +Immediately purge all entries once set to any value. +Setting this to 2 will also reseed the hash salt. +.It Va hostcache.purge +Expire all entires on next pruning of host cache entries. +Any non-zero setting will be reset to zero, once the pruge +is running. +.Bl -tag -compact +.It 0 +Do not purge all entries when pruning the host cache. (default) +.It 1 +Purge all entries when doing the next pruning. +.It 2 +Purge all entries, and also reseed the hash salt. +.It Va hostcache.prune +Time in seconds between pruning expired host cache entries. +Defaults to 300 (5 minutes). +.It Va hostcache.expire +Time in seconds, how long a entry should be kept in the +host cache since last accessed. +Defaults to 3600 (1 hour). +.It Va hostcache.count +The current number of entries in the host cache. +.It Va hostcache.bucketlimit +The maximum number of entries for the same hash. +Defaults to 30. +.It Va hostcache.hashsize +Size of TCP hostcache hashtable. +This number has to be a power of two, or will be rejected. +Defaults to 512. +.It Va hostcache.cachelimit +Overall entry limit for hostcache. +Defaults to hashsize * bucketlimit. +.It Va hostcache.histo +Provide a Histogram of the hostcache hash utilization. +.It Va hostcache.list +Provide a complete list of all current entries in the host +cache. .It Va functions_available List of available TCP function blocks (TCP stacks). .It Va functions_default diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index a873558621d1..11db8c6cf90e 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -181,16 +182,14 @@ SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, purgenow, static MALLOC_DEFINE(M_HOSTCACHE, "hostcache", "TCP hostcache"); +/* Use jenkins_hash32(), as in other parts of the tcp stack */ #define HOSTCACHE_HASH(ip) \ - (((ip)->s_addr ^ ((ip)->s_addr >> 7) ^ ((ip)->s_addr >> 17)) & \ - V_tcp_hostcache.hashmask) + (jenkins_hash32((uint32_t *)(ip), 1, V_tcp_hostcache.hashsalt) & \ + V_tcp_hostcache.hashmask) -/* XXX: What is the recommended hash to get good entropy for IPv6 addresses? */ #define HOSTCACHE_HASH6(ip6) \ - (((ip6)->s6_addr32[0] ^ \ - (ip6)->s6_addr32[1] ^ \ - (ip6)->s6_addr32[2] ^ \ - (ip6)->s6_addr32[3]) & \ + (jenkins_hash32((uint32_t *)&((ip6)->s6_addr32[0]), 4, \ + V_tcp_hostcache.hashsalt) & \ V_tcp_hostcache.hashmask) #define THC_LOCK(lp) mtx_lock(lp) @@ -210,6 +209,7 @@ tcp_hc_init(void) V_tcp_hostcache.bucket_limit = TCP_HOSTCACHE_BUCKETLIMIT; V_tcp_hostcache.expire = TCP_HOSTCACHE_EXPIRE; V_tcp_hostcache.prune = TCP_HOSTCACHE_PRUNE; + V_tcp_hostcache.hashsalt = arc4random(); TUNABLE_INT_FETCH("net.inet.tcp.hostcache.hashsize", &V_tcp_hostcache.hashsize); @@ -795,6 +795,8 @@ tcp_hc_purge(void *arg) int all = 0; if (V_tcp_hostcache.purgeall) { + if (V_tcp_hostcache.purgeall == 2) + V_tcp_hostcache.hashsalt = arc4random(); all = 1; V_tcp_hostcache.purgeall = 0; } @@ -819,6 +821,8 @@ sysctl_tcp_hc_purgenow(SYSCTL_HANDLER_ARGS) if (error || !req->newptr) return (error); + if (val == 2) + V_tcp_hostcache.hashsalt = arc4random(); tcp_hc_purge_internal(1); callout_reset(&V_tcp_hc_callout, V_tcp_hostcache.prune * hz, diff --git a/sys/netinet/tcp_hostcache.h b/sys/netinet/tcp_hostcache.h index 2f7035c0c6af..bfb46a371104 100644 --- a/sys/netinet/tcp_hostcache.h +++ b/sys/netinet/tcp_hostcache.h @@ -73,6 +73,7 @@ struct tcp_hostcache { uma_zone_t zone; u_int hashsize; u_int hashmask; + u_int hashsalt; u_int bucket_limit; u_int cache_count; u_int cache_limit; From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 20:45:38 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 5E53A5DF8C5; Fri, 16 Apr 2021 20:45:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMSsG237Sz4prs; Fri, 16 Apr 2021 20:45:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 375D2307B; Fri, 16 Apr 2021 20:45:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GKjcuh066083; Fri, 16 Apr 2021 20:45:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GKjcqG066082; Fri, 16 Apr 2021 20:45:38 GMT (envelope-from git) Date: Fri, 16 Apr 2021 20:45:38 GMT Message-Id: <202104162045.13GKjcqG066082@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: e5bbb777cbfa - stable/13 - tcp: Use sbuf_drain unconditionally MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e5bbb777cbfafbd915ce815b8d0f2d3db8d26431 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 20:45:38 -0000 The branch stable/13 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=e5bbb777cbfafbd915ce815b8d0f2d3db8d26431 commit e5bbb777cbfafbd915ce815b8d0f2d3db8d26431 Author: Richard Scheffenegger AuthorDate: 2021-04-02 18:26:48 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 20:43:54 +0000 tcp: Use sbuf_drain unconditionally After making sbuf_drain safe for external use, there is no need to protect the call. MFC after: 2 weeks Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29545 (cherry picked from commit 38ea2bd0698e434ec531b97fa94b24db24e16629) (cherry picked from commit a04906f0273fa6d80eb3ebf22b9b84e53e6b21e0) --- sys/netinet/tcp_hostcache.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index a8c4b2b178cd..a873558621d1 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -644,7 +644,6 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) const int linesize = 128; struct sbuf sb; int i, error, len; - bool do_drain = false; struct hc_metrics *hc_entry; char ip4buf[INET_ADDRSTRLEN]; #ifdef INET6 @@ -702,16 +701,9 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) hc_entry->rmx_hits, hc_entry->rmx_updates, hc_entry->rmx_expire); - do_drain = true; } THC_UNLOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); - /* Need to track if sbuf has data, to avoid - * a KASSERT when calling sbuf_drain. - */ - if (do_drain) { - sbuf_drain(&sb); - do_drain = false; - } + sbuf_drain(&sb); } #undef msec error = sbuf_finish(&sb); From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 21:32:24 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 C5A015E14E1; Fri, 16 Apr 2021 21:32:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMTvD5Hdwz4sTV; Fri, 16 Apr 2021 21:32:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9DF5A3AF1; Fri, 16 Apr 2021 21:32:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GLWOpm033915; Fri, 16 Apr 2021 21:32:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GLWOjg033914; Fri, 16 Apr 2021 21:32:24 GMT (envelope-from git) Date: Fri, 16 Apr 2021 21:32:24 GMT Message-Id: <202104162132.13GLWOjg033914@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 54beb1ef2c83 - stable/12 - tcp: reduce memory footprint when listing tcp hostcache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 54beb1ef2c831394ef908ef52bac690a4fe362e0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 21:32:24 -0000 The branch stable/12 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=54beb1ef2c831394ef908ef52bac690a4fe362e0 commit 54beb1ef2c831394ef908ef52bac690a4fe362e0 Author: Richard Scheffenegger AuthorDate: 2021-03-28 21:12:03 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 20:51:57 +0000 tcp: reduce memory footprint when listing tcp hostcache In tcp_hostcache_list, the sbuf used would need a large (~2MB) blocking allocation of memory (M_WAITOK), when listing a full hostcache. This may stall the requestor for an indeterminate time. A further optimization is to return the expected userspace buffersize right away, rather than preparing the output of each current entry of the hostcase, provided by: @tuexen. This makes use of the ready-made functions of sbuf to work with sysctl, and repeatedly drain the much smaller buffer. PR: 254333 MFC after: 2 weeks Reviewed By: #transport, tuexen Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29471 (cherry picked from commit cb0dd7e122b8936ad61a141e65ef8ef874bfebe5) --- sys/netinet/tcp_hostcache.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index 2753d511c9d5..6dfe3941c9d8 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -625,7 +625,7 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) { const int linesize = 128; struct sbuf sb; - int i, error; + int i, error, len; struct hc_metrics *hc_entry; char ip4buf[INET_ADDRSTRLEN]; #ifdef INET6 @@ -635,11 +635,22 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) if (jailed_without_vnet(curthread->td_ucred) != 0) return (EPERM); - sbuf_new(&sb, NULL, linesize * (V_tcp_hostcache.cache_count + 1), - SBUF_INCLUDENUL); + /* Optimize Buffer length query by sbin/sysctl */ + if (req->oldptr == NULL) { + len = (V_tcp_hostcache.cache_count + 1) * linesize; + return (SYSCTL_OUT(req, NULL, len)); + } + + error = sysctl_wire_old_buffer(req, 0); + if (error != 0) { + return(error); + } + + /* Use a buffer for 16 lines */ + sbuf_new_for_sysctl(&sb, NULL, 16 * linesize, req); sbuf_printf(&sb, - "\nIP address MTU SSTRESH RTT RTTVAR " + "\nIP address MTU SSTRESH RTT RTTVAR " " CWND SENDPIPE RECVPIPE HITS UPD EXP\n"); #define msec(u) (((u) + 500) / 1000) @@ -674,8 +685,6 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) } #undef msec error = sbuf_finish(&sb); - if (error == 0) - error = SYSCTL_OUT(req, sbuf_data(&sb), sbuf_len(&sb)); sbuf_delete(&sb); return(error); } From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 21:32:26 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 EE7C25E1693; Fri, 16 Apr 2021 21:32:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMTvF696vz4sd1; Fri, 16 Apr 2021 21:32:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B64C94258; Fri, 16 Apr 2021 21:32:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GLWPIa033936; Fri, 16 Apr 2021 21:32:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GLWPSx033935; Fri, 16 Apr 2021 21:32:25 GMT (envelope-from git) Date: Fri, 16 Apr 2021 21:32:25 GMT Message-Id: <202104162132.13GLWPSx033935@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 12ce9e4868d1 - stable/12 - tcp: drain tcp_hostcache_list in between per-bucket locks MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 12ce9e4868d1454b263a2330ce95e91b145c1c8f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 21:32:26 -0000 The branch stable/12 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=12ce9e4868d1454b263a2330ce95e91b145c1c8f commit 12ce9e4868d1454b263a2330ce95e91b145c1c8f Author: Richard Scheffenegger AuthorDate: 2021-03-31 17:24:01 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 20:52:09 +0000 tcp: drain tcp_hostcache_list in between per-bucket locks Explicitly drain the sbuf after completing each hash bucket to minimize the work performed while holding the hash bucket lock. PR: 254333 MFC after: 2 weeks Reviewed By: tuexen, jhb, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29483 (cherry picked from commit 869880463cc2ce64e2e6599eaec880a981f3ced6) --- sys/netinet/tcp_hostcache.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index 6dfe3941c9d8..db68fd5de90d 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -646,12 +646,13 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) return(error); } - /* Use a buffer for 16 lines */ - sbuf_new_for_sysctl(&sb, NULL, 16 * linesize, req); + /* Use a buffer sized for one full bucket */ + sbuf_new_for_sysctl(&sb, NULL, V_tcp_hostcache.bucket_limit * linesize, req); sbuf_printf(&sb, "\nIP address MTU SSTRESH RTT RTTVAR " " CWND SENDPIPE RECVPIPE HITS UPD EXP\n"); + sbuf_drain(&sb); #define msec(u) (((u) + 500) / 1000) for (i = 0; i < V_tcp_hostcache.hashsize; i++) { @@ -682,6 +683,7 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) hc_entry->rmx_expire); } THC_UNLOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); + sbuf_drain(&sb); } #undef msec error = sbuf_finish(&sb); From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 21:32:27 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 4A6335E10DF; Fri, 16 Apr 2021 21:32:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMTvG71wCz4stR; Fri, 16 Apr 2021 21:32:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E1C9A3EC7; Fri, 16 Apr 2021 21:32:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GLWQB4033957; Fri, 16 Apr 2021 21:32:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GLWQoZ033956; Fri, 16 Apr 2021 21:32:26 GMT (envelope-from git) Date: Fri, 16 Apr 2021 21:32:26 GMT Message-Id: <202104162132.13GLWQoZ033956@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: c0f8ed6ff812 - stable/12 - tcp: Make hostcache.cache_count MPSAFE by using a counter_u64_t MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c0f8ed6ff81260fb4a26da354d3f06aaa83e74de Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 21:32:27 -0000 The branch stable/12 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=c0f8ed6ff81260fb4a26da354d3f06aaa83e74de commit c0f8ed6ff81260fb4a26da354d3f06aaa83e74de Author: Richard Scheffenegger AuthorDate: 2021-03-31 17:30:20 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 20:52:21 +0000 tcp: Make hostcache.cache_count MPSAFE by using a counter_u64_t Addressing the underlying root cause for cache_count to show unexpectedly high values, by protecting all arithmetic on that global variable by using counter(9). PR: 254333 Reviewed By: tuexen, #transport MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29510 (cherry picked from commit 95e56d31e348594973affd0ea81d8f8383bc3031) --- sys/netinet/tcp_hostcache.c | 20 ++++++++++++-------- sys/netinet/tcp_hostcache.h | 20 ++++++++++---------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index db68fd5de90d..5a7e3fb63c7e 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -146,8 +146,8 @@ SYSCTL_UINT(_net_inet_tcp_hostcache, OID_AUTO, bucketlimit, CTLFLAG_VNET | CTLFLAG_RDTUN, &VNET_NAME(tcp_hostcache.bucket_limit), 0, "Per-bucket hash limit for hostcache"); -SYSCTL_UINT(_net_inet_tcp_hostcache, OID_AUTO, count, CTLFLAG_VNET | CTLFLAG_RD, - &VNET_NAME(tcp_hostcache.cache_count), 0, +SYSCTL_COUNTER_U64(_net_inet_tcp_hostcache, OID_AUTO, count, CTLFLAG_VNET | CTLFLAG_RD, + &VNET_NAME(tcp_hostcache.cache_count), "Current number of entries in hostcache"); SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, expire, CTLFLAG_VNET | CTLFLAG_RW, @@ -196,7 +196,8 @@ tcp_hc_init(void) /* * Initialize hostcache structures. */ - V_tcp_hostcache.cache_count = 0; + V_tcp_hostcache.cache_count = counter_u64_alloc(M_WAITOK); + counter_u64_zero(V_tcp_hostcache.cache_count); V_tcp_hostcache.hashsize = TCP_HOSTCACHE_HASHSIZE; V_tcp_hostcache.bucket_limit = TCP_HOSTCACHE_BUCKETLIMIT; V_tcp_hostcache.expire = TCP_HOSTCACHE_EXPIRE; @@ -264,6 +265,9 @@ tcp_hc_destroy(void) /* Purge all hc entries. */ tcp_hc_purge_internal(1); + /* Release the counter */ + counter_u64_free(V_tcp_hostcache.cache_count); + /* Free the uma zone and the allocated hash table. */ uma_zdestroy(V_tcp_hostcache.zone); @@ -371,7 +375,7 @@ tcp_hc_insert(struct in_conninfo *inc) * If the bucket limit is reached, reuse the least-used element. */ if (hc_head->hch_length >= V_tcp_hostcache.bucket_limit || - V_tcp_hostcache.cache_count >= V_tcp_hostcache.cache_limit) { + counter_u64_fetch(V_tcp_hostcache.cache_count) >= V_tcp_hostcache.cache_limit) { hc_entry = TAILQ_LAST(&hc_head->hch_bucket, hc_qhead); /* * At first we were dropping the last element, just to @@ -388,7 +392,7 @@ tcp_hc_insert(struct in_conninfo *inc) } TAILQ_REMOVE(&hc_head->hch_bucket, hc_entry, rmx_q); V_tcp_hostcache.hashbase[hash].hch_length--; - V_tcp_hostcache.cache_count--; + counter_u64_add(V_tcp_hostcache.cache_count, -1); TCPSTAT_INC(tcps_hc_bucketoverflow); #if 0 uma_zfree(V_tcp_hostcache.zone, hc_entry); @@ -421,7 +425,7 @@ tcp_hc_insert(struct in_conninfo *inc) */ TAILQ_INSERT_HEAD(&hc_head->hch_bucket, hc_entry, rmx_q); V_tcp_hostcache.hashbase[hash].hch_length++; - V_tcp_hostcache.cache_count++; + counter_u64_add(V_tcp_hostcache.cache_count, 1); TCPSTAT_INC(tcps_hc_added); return hc_entry; @@ -637,7 +641,7 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) /* Optimize Buffer length query by sbin/sysctl */ if (req->oldptr == NULL) { - len = (V_tcp_hostcache.cache_count + 1) * linesize; + len = (counter_u64_fetch(V_tcp_hostcache.cache_count) + 1) * linesize; return (SYSCTL_OUT(req, NULL, len)); } @@ -709,7 +713,7 @@ tcp_hc_purge_internal(int all) hc_entry, rmx_q); uma_zfree(V_tcp_hostcache.zone, hc_entry); V_tcp_hostcache.hashbase[i].hch_length--; - V_tcp_hostcache.cache_count--; + counter_u64_add(V_tcp_hostcache.cache_count, -1); } else hc_entry->rmx_expire -= V_tcp_hostcache.prune; } diff --git a/sys/netinet/tcp_hostcache.h b/sys/netinet/tcp_hostcache.h index f4e1013aac60..b5237392acc2 100644 --- a/sys/netinet/tcp_hostcache.h +++ b/sys/netinet/tcp_hostcache.h @@ -69,16 +69,16 @@ struct hc_metrics { }; struct tcp_hostcache { - struct hc_head *hashbase; - uma_zone_t zone; - u_int hashsize; - u_int hashmask; - u_int bucket_limit; - u_int cache_count; - u_int cache_limit; - int expire; - int prune; - int purgeall; + struct hc_head *hashbase; + uma_zone_t zone; + u_int hashsize; + u_int hashmask; + u_int bucket_limit; + counter_u64_t cache_count; + u_int cache_limit; + int expire; + int prune; + int purgeall; }; #endif /* !_NETINET_TCP_HOSTCACHE_H_*/ From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 21:32:28 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 6C9175E180A; Fri, 16 Apr 2021 21:32:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMTvJ1XbGz4skl; Fri, 16 Apr 2021 21:32:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 080BD452D; Fri, 16 Apr 2021 21:32:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GLWRqa033985; Fri, 16 Apr 2021 21:32:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GLWRqW033984; Fri, 16 Apr 2021 21:32:27 GMT (envelope-from git) Date: Fri, 16 Apr 2021 21:32:27 GMT Message-Id: <202104162132.13GLWRqW033984@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: e9ca38abc79b - stable/12 - tcp: For hostcache performance, use atomics instead of counters MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: e9ca38abc79b5ee0cc0052fb4e213b3dd5720716 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 21:32:28 -0000 The branch stable/12 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=e9ca38abc79b5ee0cc0052fb4e213b3dd5720716 commit e9ca38abc79b5ee0cc0052fb4e213b3dd5720716 Author: Richard Scheffenegger AuthorDate: 2021-04-01 08:00:32 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 20:52:37 +0000 tcp: For hostcache performance, use atomics instead of counters As accessing the tcp hostcache happens frequently on some classes of servers, it was recommended to use atomic_add/subtract rather than (per-CPU distributed) counters, which have to be summed up at high cost to cache efficiency. PR: 254333 MFC after: 2 weeks Sponsored by: NetApp, Inc. Reviewed By: #transport, tuexen, jtl Differential Revision: https://reviews.freebsd.org/D29522 (cherry picked from commit 529a2a0f2765f6c57c50a5af6be242c03bf714e3) --- sys/netinet/tcp_hostcache.c | 24 +++++++++++------------- sys/netinet/tcp_hostcache.h | 2 +- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index 5a7e3fb63c7e..a92a12109bc4 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -146,8 +146,8 @@ SYSCTL_UINT(_net_inet_tcp_hostcache, OID_AUTO, bucketlimit, CTLFLAG_VNET | CTLFLAG_RDTUN, &VNET_NAME(tcp_hostcache.bucket_limit), 0, "Per-bucket hash limit for hostcache"); -SYSCTL_COUNTER_U64(_net_inet_tcp_hostcache, OID_AUTO, count, CTLFLAG_VNET | CTLFLAG_RD, - &VNET_NAME(tcp_hostcache.cache_count), +SYSCTL_UINT(_net_inet_tcp_hostcache, OID_AUTO, count, CTLFLAG_VNET | CTLFLAG_RD, + &VNET_NAME(tcp_hostcache.cache_count), 0, "Current number of entries in hostcache"); SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, expire, CTLFLAG_VNET | CTLFLAG_RW, @@ -196,8 +196,7 @@ tcp_hc_init(void) /* * Initialize hostcache structures. */ - V_tcp_hostcache.cache_count = counter_u64_alloc(M_WAITOK); - counter_u64_zero(V_tcp_hostcache.cache_count); + atomic_store_int(&V_tcp_hostcache.cache_count, 0); V_tcp_hostcache.hashsize = TCP_HOSTCACHE_HASHSIZE; V_tcp_hostcache.bucket_limit = TCP_HOSTCACHE_BUCKETLIMIT; V_tcp_hostcache.expire = TCP_HOSTCACHE_EXPIRE; @@ -265,9 +264,6 @@ tcp_hc_destroy(void) /* Purge all hc entries. */ tcp_hc_purge_internal(1); - /* Release the counter */ - counter_u64_free(V_tcp_hostcache.cache_count); - /* Free the uma zone and the allocated hash table. */ uma_zdestroy(V_tcp_hostcache.zone); @@ -375,7 +371,7 @@ tcp_hc_insert(struct in_conninfo *inc) * If the bucket limit is reached, reuse the least-used element. */ if (hc_head->hch_length >= V_tcp_hostcache.bucket_limit || - counter_u64_fetch(V_tcp_hostcache.cache_count) >= V_tcp_hostcache.cache_limit) { + atomic_load_int(&V_tcp_hostcache.cache_count) >= V_tcp_hostcache.cache_limit) { hc_entry = TAILQ_LAST(&hc_head->hch_bucket, hc_qhead); /* * At first we were dropping the last element, just to @@ -392,7 +388,7 @@ tcp_hc_insert(struct in_conninfo *inc) } TAILQ_REMOVE(&hc_head->hch_bucket, hc_entry, rmx_q); V_tcp_hostcache.hashbase[hash].hch_length--; - counter_u64_add(V_tcp_hostcache.cache_count, -1); + atomic_subtract_int(&V_tcp_hostcache.cache_count, 1); TCPSTAT_INC(tcps_hc_bucketoverflow); #if 0 uma_zfree(V_tcp_hostcache.zone, hc_entry); @@ -425,7 +421,7 @@ tcp_hc_insert(struct in_conninfo *inc) */ TAILQ_INSERT_HEAD(&hc_head->hch_bucket, hc_entry, rmx_q); V_tcp_hostcache.hashbase[hash].hch_length++; - counter_u64_add(V_tcp_hostcache.cache_count, 1); + atomic_add_int(&V_tcp_hostcache.cache_count, 1); TCPSTAT_INC(tcps_hc_added); return hc_entry; @@ -641,7 +637,8 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) /* Optimize Buffer length query by sbin/sysctl */ if (req->oldptr == NULL) { - len = (counter_u64_fetch(V_tcp_hostcache.cache_count) + 1) * linesize; + len = (atomic_load_int(&V_tcp_hostcache.cache_count) + 1) * + linesize; return (SYSCTL_OUT(req, NULL, len)); } @@ -651,7 +648,8 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) } /* Use a buffer sized for one full bucket */ - sbuf_new_for_sysctl(&sb, NULL, V_tcp_hostcache.bucket_limit * linesize, req); + sbuf_new_for_sysctl(&sb, NULL, V_tcp_hostcache.bucket_limit * + linesize, req); sbuf_printf(&sb, "\nIP address MTU SSTRESH RTT RTTVAR " @@ -713,7 +711,7 @@ tcp_hc_purge_internal(int all) hc_entry, rmx_q); uma_zfree(V_tcp_hostcache.zone, hc_entry); V_tcp_hostcache.hashbase[i].hch_length--; - counter_u64_add(V_tcp_hostcache.cache_count, -1); + atomic_subtract_int(&V_tcp_hostcache.cache_count, 1); } else hc_entry->rmx_expire -= V_tcp_hostcache.prune; } diff --git a/sys/netinet/tcp_hostcache.h b/sys/netinet/tcp_hostcache.h index b5237392acc2..2f7035c0c6af 100644 --- a/sys/netinet/tcp_hostcache.h +++ b/sys/netinet/tcp_hostcache.h @@ -74,7 +74,7 @@ struct tcp_hostcache { u_int hashsize; u_int hashmask; u_int bucket_limit; - counter_u64_t cache_count; + u_int cache_count; u_int cache_limit; int expire; int prune; From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 21:32:30 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 81AF55E1908; Fri, 16 Apr 2021 21:32:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMTvL2bMbz4t03; Fri, 16 Apr 2021 21:32:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 478E74598; Fri, 16 Apr 2021 21:32:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GLWUgQ034027; Fri, 16 Apr 2021 21:32:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GLWU3i034026; Fri, 16 Apr 2021 21:32:30 GMT (envelope-from git) Date: Fri, 16 Apr 2021 21:32:30 GMT Message-Id: <202104162132.13GLWU3i034026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 5934587a3130 - stable/12 - tcp: Use sbuf_drain unconditionally MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 5934587a3130c7058c14c19dc6b991a9b5dd3642 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 21:32:30 -0000 The branch stable/12 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=5934587a3130c7058c14c19dc6b991a9b5dd3642 commit 5934587a3130c7058c14c19dc6b991a9b5dd3642 Author: Richard Scheffenegger AuthorDate: 2021-04-02 18:26:48 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 20:54:58 +0000 tcp: Use sbuf_drain unconditionally After making sbuf_drain safe for external use, there is no need to protect the call. MFC after: 2 weeks Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29545 (cherry picked from commit 38ea2bd0698e434ec531b97fa94b24db24e16629) (cherry picked from commit a04906f0273fa6d80eb3ebf22b9b84e53e6b21e0) --- sys/netinet/tcp_hostcache.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index 14b3a34fc606..a92a12109bc4 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -626,7 +626,6 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) const int linesize = 128; struct sbuf sb; int i, error, len; - bool do_drain = false; struct hc_metrics *hc_entry; char ip4buf[INET_ADDRSTRLEN]; #ifdef INET6 @@ -684,16 +683,9 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) hc_entry->rmx_hits, hc_entry->rmx_updates, hc_entry->rmx_expire); - do_drain = true; } THC_UNLOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); - /* Need to track if sbuf has data, to avoid - * a KASSERT when calling sbuf_drain. - */ - if (do_drain) { - sbuf_drain(&sb); - do_drain = false; - } + sbuf_drain(&sb); } #undef msec error = sbuf_finish(&sb); From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 21:32:29 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 EF9EB5E1905; Fri, 16 Apr 2021 21:32:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMTvK1ZW3z4t4v; Fri, 16 Apr 2021 21:32:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 26606425D; Fri, 16 Apr 2021 21:32:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GLWTHc034006; Fri, 16 Apr 2021 21:32:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GLWTZO034005; Fri, 16 Apr 2021 21:32:29 GMT (envelope-from git) Date: Fri, 16 Apr 2021 21:32:29 GMT Message-Id: <202104162132.13GLWTZO034005@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 2a9ce2734f8b - stable/12 - tcp: Shouldn't drain empty sbuf MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2a9ce2734f8bbb39f4fddb048ab0a605459dbe80 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 21:32:30 -0000 The branch stable/12 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=2a9ce2734f8bbb39f4fddb048ab0a605459dbe80 commit 2a9ce2734f8bbb39f4fddb048ab0a605459dbe80 Author: Richard Scheffenegger AuthorDate: 2021-04-01 15:18:04 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 20:53:51 +0000 tcp: Shouldn't drain empty sbuf MFC after: 2 weeks Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29524 (cherry picked from commit 9aef4e7c2bd4371e526e4e3feb26064d361ad8ce) --- sys/netinet/tcp_hostcache.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index a92a12109bc4..14b3a34fc606 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -626,6 +626,7 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) const int linesize = 128; struct sbuf sb; int i, error, len; + bool do_drain = false; struct hc_metrics *hc_entry; char ip4buf[INET_ADDRSTRLEN]; #ifdef INET6 @@ -683,9 +684,16 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) hc_entry->rmx_hits, hc_entry->rmx_updates, hc_entry->rmx_expire); + do_drain = true; } THC_UNLOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); - sbuf_drain(&sb); + /* Need to track if sbuf has data, to avoid + * a KASSERT when calling sbuf_drain. + */ + if (do_drain) { + sbuf_drain(&sb); + do_drain = false; + } } #undef msec error = sbuf_finish(&sb); From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 22:11:58 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 E93D35E2EE7; Fri, 16 Apr 2021 22:11:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMVmt5r1Bz3Bs1; Fri, 16 Apr 2021 22:11:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BB45F4C19; Fri, 16 Apr 2021 22:11:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GMBwVW087152; Fri, 16 Apr 2021 22:11:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GMBwvU087151; Fri, 16 Apr 2021 22:11:58 GMT (envelope-from git) Date: Fri, 16 Apr 2021 22:11:58 GMT Message-Id: <202104162211.13GMBwvU087151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: c449b8a71bce - stable/11 - tcp: reduce memory footprint when listing tcp hostcache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: c449b8a71bce7d7838164f6a5595f71c91b5b91b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 22:11:59 -0000 The branch stable/11 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=c449b8a71bce7d7838164f6a5595f71c91b5b91b commit c449b8a71bce7d7838164f6a5595f71c91b5b91b Author: Richard Scheffenegger AuthorDate: 2021-03-28 21:12:03 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 21:33:09 +0000 tcp: reduce memory footprint when listing tcp hostcache In tcp_hostcache_list, the sbuf used would need a large (~2MB) blocking allocation of memory (M_WAITOK), when listing a full hostcache. This may stall the requestor for an indeterminate time. A further optimization is to return the expected userspace buffersize right away, rather than preparing the output of each current entry of the hostcase, provided by: @tuexen. This makes use of the ready-made functions of sbuf to work with sysctl, and repeatedly drain the much smaller buffer. PR: 254333 MFC after: 2 weeks Reviewed By: #transport, tuexen Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29471 (cherry picked from commit cb0dd7e122b8936ad61a141e65ef8ef874bfebe5) --- sys/netinet/tcp_hostcache.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index 9b5680020a1d..e71f13243f0c 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -621,7 +621,7 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) { const int linesize = 128; struct sbuf sb; - int i, error; + int i, error, len; struct hc_metrics *hc_entry; char ip4buf[INET_ADDRSTRLEN]; #ifdef INET6 @@ -631,11 +631,22 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) if (jailed_without_vnet(curthread->td_ucred) != 0) return (EPERM); - sbuf_new(&sb, NULL, linesize * (V_tcp_hostcache.cache_count + 1), - SBUF_INCLUDENUL); + /* Optimize Buffer length query by sbin/sysctl */ + if (req->oldptr == NULL) { + len = (V_tcp_hostcache.cache_count + 1) * linesize; + return (SYSCTL_OUT(req, NULL, len)); + } + + error = sysctl_wire_old_buffer(req, 0); + if (error != 0) { + return(error); + } + + /* Use a buffer for 16 lines */ + sbuf_new_for_sysctl(&sb, NULL, 16 * linesize, req); sbuf_printf(&sb, - "\nIP address MTU SSTRESH RTT RTTVAR " + "\nIP address MTU SSTRESH RTT RTTVAR " " CWND SENDPIPE RECVPIPE HITS UPD EXP\n"); #define msec(u) (((u) + 500) / 1000) @@ -670,8 +681,6 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) } #undef msec error = sbuf_finish(&sb); - if (error == 0) - error = SYSCTL_OUT(req, sbuf_data(&sb), sbuf_len(&sb)); sbuf_delete(&sb); return(error); } From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 22:11:59 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 EC0DF5E2D72; Fri, 16 Apr 2021 22:11:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMVmv6HJDz4vsm; Fri, 16 Apr 2021 22:11:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C5BF74CA4; Fri, 16 Apr 2021 22:11:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GMBx7D087182; Fri, 16 Apr 2021 22:11:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GMBx72087180; Fri, 16 Apr 2021 22:11:59 GMT (envelope-from git) Date: Fri, 16 Apr 2021 22:11:59 GMT Message-Id: <202104162211.13GMBx72087180@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: a85003abdad4 - stable/11 - tcp: drain tcp_hostcache_list in between per-bucket locks MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: a85003abdad402c27c12cf1a31b243c39483f263 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 22:12:00 -0000 The branch stable/11 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=a85003abdad402c27c12cf1a31b243c39483f263 commit a85003abdad402c27c12cf1a31b243c39483f263 Author: Richard Scheffenegger AuthorDate: 2021-03-31 17:24:01 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 21:33:20 +0000 tcp: drain tcp_hostcache_list in between per-bucket locks Explicitly drain the sbuf after completing each hash bucket to minimize the work performed while holding the hash bucket lock. PR: 254333 MFC after: 2 weeks Reviewed By: tuexen, jhb, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29483 (cherry picked from commit 869880463cc2ce64e2e6599eaec880a981f3ced6) --- sys/netinet/tcp_hostcache.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index e71f13243f0c..c4d51dd0bd59 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -642,12 +642,13 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) return(error); } - /* Use a buffer for 16 lines */ - sbuf_new_for_sysctl(&sb, NULL, 16 * linesize, req); + /* Use a buffer sized for one full bucket */ + sbuf_new_for_sysctl(&sb, NULL, V_tcp_hostcache.bucket_limit * linesize, req); sbuf_printf(&sb, "\nIP address MTU SSTRESH RTT RTTVAR " " CWND SENDPIPE RECVPIPE HITS UPD EXP\n"); + sbuf_drain(&sb); #define msec(u) (((u) + 500) / 1000) for (i = 0; i < V_tcp_hostcache.hashsize; i++) { @@ -678,6 +679,7 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) hc_entry->rmx_expire); } THC_UNLOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); + sbuf_drain(&sb); } #undef msec error = sbuf_finish(&sb); From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 22:12:01 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 5442B5E2C78; Fri, 16 Apr 2021 22:12:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMVmx0vhhz4vkT; Fri, 16 Apr 2021 22:12:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00C614D1D; Fri, 16 Apr 2021 22:12:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GMC0BR087211; Fri, 16 Apr 2021 22:12:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GMC0oD087210; Fri, 16 Apr 2021 22:12:00 GMT (envelope-from git) Date: Fri, 16 Apr 2021 22:12:00 GMT Message-Id: <202104162212.13GMC0oD087210@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: d20563819b92 - stable/11 - tcp: Make hostcache.cache_count MPSAFE by using a counter_u64_t MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: d20563819b9292ddcd42caf3449636b84825b1d6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 22:12:01 -0000 The branch stable/11 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=d20563819b9292ddcd42caf3449636b84825b1d6 commit d20563819b9292ddcd42caf3449636b84825b1d6 Author: Richard Scheffenegger AuthorDate: 2021-03-31 17:30:20 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 21:33:31 +0000 tcp: Make hostcache.cache_count MPSAFE by using a counter_u64_t Addressing the underlying root cause for cache_count to show unexpectedly high values, by protecting all arithmetic on that global variable by using counter(9). PR: 254333 Reviewed By: tuexen, #transport MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29510 (cherry picked from commit 95e56d31e348594973affd0ea81d8f8383bc3031) --- sys/netinet/tcp_hostcache.c | 20 ++++++++++++-------- sys/netinet/tcp_hostcache.h | 20 ++++++++++---------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index c4d51dd0bd59..0b5a212c4897 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -144,8 +144,8 @@ SYSCTL_UINT(_net_inet_tcp_hostcache, OID_AUTO, bucketlimit, CTLFLAG_VNET | CTLFLAG_RDTUN, &VNET_NAME(tcp_hostcache.bucket_limit), 0, "Per-bucket hash limit for hostcache"); -SYSCTL_UINT(_net_inet_tcp_hostcache, OID_AUTO, count, CTLFLAG_VNET | CTLFLAG_RD, - &VNET_NAME(tcp_hostcache.cache_count), 0, +SYSCTL_COUNTER_U64(_net_inet_tcp_hostcache, OID_AUTO, count, CTLFLAG_VNET | CTLFLAG_RD, + &VNET_NAME(tcp_hostcache.cache_count), "Current number of entries in hostcache"); SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, expire, CTLFLAG_VNET | CTLFLAG_RW, @@ -194,7 +194,8 @@ tcp_hc_init(void) /* * Initialize hostcache structures. */ - V_tcp_hostcache.cache_count = 0; + V_tcp_hostcache.cache_count = counter_u64_alloc(M_WAITOK); + counter_u64_zero(V_tcp_hostcache.cache_count); V_tcp_hostcache.hashsize = TCP_HOSTCACHE_HASHSIZE; V_tcp_hostcache.bucket_limit = TCP_HOSTCACHE_BUCKETLIMIT; V_tcp_hostcache.expire = TCP_HOSTCACHE_EXPIRE; @@ -262,6 +263,9 @@ tcp_hc_destroy(void) /* Purge all hc entries. */ tcp_hc_purge_internal(1); + /* Release the counter */ + counter_u64_free(V_tcp_hostcache.cache_count); + /* Free the uma zone and the allocated hash table. */ uma_zdestroy(V_tcp_hostcache.zone); @@ -369,7 +373,7 @@ tcp_hc_insert(struct in_conninfo *inc) * If the bucket limit is reached, reuse the least-used element. */ if (hc_head->hch_length >= V_tcp_hostcache.bucket_limit || - V_tcp_hostcache.cache_count >= V_tcp_hostcache.cache_limit) { + counter_u64_fetch(V_tcp_hostcache.cache_count) >= V_tcp_hostcache.cache_limit) { hc_entry = TAILQ_LAST(&hc_head->hch_bucket, hc_qhead); /* * At first we were dropping the last element, just to @@ -386,7 +390,7 @@ tcp_hc_insert(struct in_conninfo *inc) } TAILQ_REMOVE(&hc_head->hch_bucket, hc_entry, rmx_q); V_tcp_hostcache.hashbase[hash].hch_length--; - V_tcp_hostcache.cache_count--; + counter_u64_add(V_tcp_hostcache.cache_count, -1); TCPSTAT_INC(tcps_hc_bucketoverflow); #if 0 uma_zfree(V_tcp_hostcache.zone, hc_entry); @@ -419,7 +423,7 @@ tcp_hc_insert(struct in_conninfo *inc) */ TAILQ_INSERT_HEAD(&hc_head->hch_bucket, hc_entry, rmx_q); V_tcp_hostcache.hashbase[hash].hch_length++; - V_tcp_hostcache.cache_count++; + counter_u64_add(V_tcp_hostcache.cache_count, 1); TCPSTAT_INC(tcps_hc_added); return hc_entry; @@ -633,7 +637,7 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) /* Optimize Buffer length query by sbin/sysctl */ if (req->oldptr == NULL) { - len = (V_tcp_hostcache.cache_count + 1) * linesize; + len = (counter_u64_fetch(V_tcp_hostcache.cache_count) + 1) * linesize; return (SYSCTL_OUT(req, NULL, len)); } @@ -705,7 +709,7 @@ tcp_hc_purge_internal(int all) hc_entry, rmx_q); uma_zfree(V_tcp_hostcache.zone, hc_entry); V_tcp_hostcache.hashbase[i].hch_length--; - V_tcp_hostcache.cache_count--; + counter_u64_add(V_tcp_hostcache.cache_count, -1); } else hc_entry->rmx_expire -= V_tcp_hostcache.prune; } diff --git a/sys/netinet/tcp_hostcache.h b/sys/netinet/tcp_hostcache.h index 44875ff68f6e..4eddfaa806c5 100644 --- a/sys/netinet/tcp_hostcache.h +++ b/sys/netinet/tcp_hostcache.h @@ -67,16 +67,16 @@ struct hc_metrics { }; struct tcp_hostcache { - struct hc_head *hashbase; - uma_zone_t zone; - u_int hashsize; - u_int hashmask; - u_int bucket_limit; - u_int cache_count; - u_int cache_limit; - int expire; - int prune; - int purgeall; + struct hc_head *hashbase; + uma_zone_t zone; + u_int hashsize; + u_int hashmask; + u_int bucket_limit; + counter_u64_t cache_count; + u_int cache_limit; + int expire; + int prune; + int purgeall; }; #endif /* !_NETINET_TCP_HOSTCACHE_H_*/ From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 22:12:03 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 6E5475E3189; Fri, 16 Apr 2021 22:12:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMVmz2cvMz3Bq5; Fri, 16 Apr 2021 22:12:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 492D24E53; Fri, 16 Apr 2021 22:12:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GMC32Q087253; Fri, 16 Apr 2021 22:12:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GMC3kX087252; Fri, 16 Apr 2021 22:12:03 GMT (envelope-from git) Date: Fri, 16 Apr 2021 22:12:03 GMT Message-Id: <202104162212.13GMC3kX087252@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: cca0fba78e5f - stable/11 - tcp: Shouldn't drain empty sbuf MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: cca0fba78e5f299a8a42aa9f5022274179b918ef Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 22:12:03 -0000 The branch stable/11 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=cca0fba78e5f299a8a42aa9f5022274179b918ef commit cca0fba78e5f299a8a42aa9f5022274179b918ef Author: Richard Scheffenegger AuthorDate: 2021-04-01 15:18:04 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 21:34:29 +0000 tcp: Shouldn't drain empty sbuf MFC after: 2 weeks Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29524 (cherry picked from commit 9aef4e7c2bd4371e526e4e3feb26064d361ad8ce) --- sys/netinet/tcp_hostcache.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index 47846040d9db..b3dbf0583cc9 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -622,6 +622,7 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) const int linesize = 128; struct sbuf sb; int i, error, len; + bool do_drain = false; struct hc_metrics *hc_entry; char ip4buf[INET_ADDRSTRLEN]; #ifdef INET6 @@ -679,9 +680,16 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) hc_entry->rmx_hits, hc_entry->rmx_updates, hc_entry->rmx_expire); + do_drain = true; } THC_UNLOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); - sbuf_drain(&sb); + /* Need to track if sbuf has data, to avoid + * a KASSERT when calling sbuf_drain. + */ + if (do_drain) { + sbuf_drain(&sb); + do_drain = false; + } } #undef msec error = sbuf_finish(&sb); From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 22:12:02 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 9038D5E2F98; Fri, 16 Apr 2021 22:12:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMVmy20dPz4vst; Fri, 16 Apr 2021 22:12:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 24EE34D20; Fri, 16 Apr 2021 22:12:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GMC24K087232; Fri, 16 Apr 2021 22:12:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GMC2is087231; Fri, 16 Apr 2021 22:12:02 GMT (envelope-from git) Date: Fri, 16 Apr 2021 22:12:02 GMT Message-Id: <202104162212.13GMC2is087231@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 254b56ac2a9e - stable/11 - tcp: For hostcache performance, use atomics instead of counters MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 254b56ac2a9ee43d10b0a4f8eeb20b722bb7fd74 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 22:12:02 -0000 The branch stable/11 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=254b56ac2a9ee43d10b0a4f8eeb20b722bb7fd74 commit 254b56ac2a9ee43d10b0a4f8eeb20b722bb7fd74 Author: Richard Scheffenegger AuthorDate: 2021-04-01 08:00:32 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 21:33:41 +0000 tcp: For hostcache performance, use atomics instead of counters As accessing the tcp hostcache happens frequently on some classes of servers, it was recommended to use atomic_add/subtract rather than (per-CPU distributed) counters, which have to be summed up at high cost to cache efficiency. PR: 254333 MFC after: 2 weeks Sponsored by: NetApp, Inc. Reviewed By: #transport, tuexen, jtl Differential Revision: https://reviews.freebsd.org/D29522 (cherry picked from commit 529a2a0f2765f6c57c50a5af6be242c03bf714e3) --- sys/netinet/tcp_hostcache.c | 24 +++++++++++------------- sys/netinet/tcp_hostcache.h | 2 +- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index 0b5a212c4897..47846040d9db 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -144,8 +144,8 @@ SYSCTL_UINT(_net_inet_tcp_hostcache, OID_AUTO, bucketlimit, CTLFLAG_VNET | CTLFLAG_RDTUN, &VNET_NAME(tcp_hostcache.bucket_limit), 0, "Per-bucket hash limit for hostcache"); -SYSCTL_COUNTER_U64(_net_inet_tcp_hostcache, OID_AUTO, count, CTLFLAG_VNET | CTLFLAG_RD, - &VNET_NAME(tcp_hostcache.cache_count), +SYSCTL_UINT(_net_inet_tcp_hostcache, OID_AUTO, count, CTLFLAG_VNET | CTLFLAG_RD, + &VNET_NAME(tcp_hostcache.cache_count), 0, "Current number of entries in hostcache"); SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, expire, CTLFLAG_VNET | CTLFLAG_RW, @@ -194,8 +194,7 @@ tcp_hc_init(void) /* * Initialize hostcache structures. */ - V_tcp_hostcache.cache_count = counter_u64_alloc(M_WAITOK); - counter_u64_zero(V_tcp_hostcache.cache_count); + atomic_store_int(&V_tcp_hostcache.cache_count, 0); V_tcp_hostcache.hashsize = TCP_HOSTCACHE_HASHSIZE; V_tcp_hostcache.bucket_limit = TCP_HOSTCACHE_BUCKETLIMIT; V_tcp_hostcache.expire = TCP_HOSTCACHE_EXPIRE; @@ -263,9 +262,6 @@ tcp_hc_destroy(void) /* Purge all hc entries. */ tcp_hc_purge_internal(1); - /* Release the counter */ - counter_u64_free(V_tcp_hostcache.cache_count); - /* Free the uma zone and the allocated hash table. */ uma_zdestroy(V_tcp_hostcache.zone); @@ -373,7 +369,7 @@ tcp_hc_insert(struct in_conninfo *inc) * If the bucket limit is reached, reuse the least-used element. */ if (hc_head->hch_length >= V_tcp_hostcache.bucket_limit || - counter_u64_fetch(V_tcp_hostcache.cache_count) >= V_tcp_hostcache.cache_limit) { + atomic_load_int(&V_tcp_hostcache.cache_count) >= V_tcp_hostcache.cache_limit) { hc_entry = TAILQ_LAST(&hc_head->hch_bucket, hc_qhead); /* * At first we were dropping the last element, just to @@ -390,7 +386,7 @@ tcp_hc_insert(struct in_conninfo *inc) } TAILQ_REMOVE(&hc_head->hch_bucket, hc_entry, rmx_q); V_tcp_hostcache.hashbase[hash].hch_length--; - counter_u64_add(V_tcp_hostcache.cache_count, -1); + atomic_subtract_int(&V_tcp_hostcache.cache_count, 1); TCPSTAT_INC(tcps_hc_bucketoverflow); #if 0 uma_zfree(V_tcp_hostcache.zone, hc_entry); @@ -423,7 +419,7 @@ tcp_hc_insert(struct in_conninfo *inc) */ TAILQ_INSERT_HEAD(&hc_head->hch_bucket, hc_entry, rmx_q); V_tcp_hostcache.hashbase[hash].hch_length++; - counter_u64_add(V_tcp_hostcache.cache_count, 1); + atomic_add_int(&V_tcp_hostcache.cache_count, 1); TCPSTAT_INC(tcps_hc_added); return hc_entry; @@ -637,7 +633,8 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) /* Optimize Buffer length query by sbin/sysctl */ if (req->oldptr == NULL) { - len = (counter_u64_fetch(V_tcp_hostcache.cache_count) + 1) * linesize; + len = (atomic_load_int(&V_tcp_hostcache.cache_count) + 1) * + linesize; return (SYSCTL_OUT(req, NULL, len)); } @@ -647,7 +644,8 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) } /* Use a buffer sized for one full bucket */ - sbuf_new_for_sysctl(&sb, NULL, V_tcp_hostcache.bucket_limit * linesize, req); + sbuf_new_for_sysctl(&sb, NULL, V_tcp_hostcache.bucket_limit * + linesize, req); sbuf_printf(&sb, "\nIP address MTU SSTRESH RTT RTTVAR " @@ -709,7 +707,7 @@ tcp_hc_purge_internal(int all) hc_entry, rmx_q); uma_zfree(V_tcp_hostcache.zone, hc_entry); V_tcp_hostcache.hashbase[i].hch_length--; - counter_u64_add(V_tcp_hostcache.cache_count, -1); + atomic_subtract_int(&V_tcp_hostcache.cache_count, 1); } else hc_entry->rmx_expire -= V_tcp_hostcache.prune; } diff --git a/sys/netinet/tcp_hostcache.h b/sys/netinet/tcp_hostcache.h index 4eddfaa806c5..db8ab4bf4d08 100644 --- a/sys/netinet/tcp_hostcache.h +++ b/sys/netinet/tcp_hostcache.h @@ -72,7 +72,7 @@ struct tcp_hostcache { u_int hashsize; u_int hashmask; u_int bucket_limit; - counter_u64_t cache_count; + u_int cache_count; u_int cache_limit; int expire; int prune; From owner-dev-commits-src-branches@freebsd.org Fri Apr 16 22:12:04 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 BF07E5E2EF6; Fri, 16 Apr 2021 22:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMVn04bTMz3C3w; Fri, 16 Apr 2021 22:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5FCD94E55; Fri, 16 Apr 2021 22:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13GMC4Dd087274; Fri, 16 Apr 2021 22:12:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13GMC4sT087273; Fri, 16 Apr 2021 22:12:04 GMT (envelope-from git) Date: Fri, 16 Apr 2021 22:12:04 GMT Message-Id: <202104162212.13GMC4sT087273@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 4d8601e916cd - stable/11 - tcp: Use sbuf_drain unconditionally MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 4d8601e916cd2a7dad0e6490a1b4a1a51b2e19c8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 22:12:04 -0000 The branch stable/11 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=4d8601e916cd2a7dad0e6490a1b4a1a51b2e19c8 commit 4d8601e916cd2a7dad0e6490a1b4a1a51b2e19c8 Author: Richard Scheffenegger AuthorDate: 2021-04-02 18:26:48 +0000 Commit: Richard Scheffenegger CommitDate: 2021-04-16 21:35:29 +0000 tcp: Use sbuf_drain unconditionally After making sbuf_drain safe for external use, there is no need to protect the call. MFC after: 2 weeks Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29545 (cherry picked from commit 38ea2bd0698e434ec531b97fa94b24db24e16629) (cherry picked from commit a04906f0273fa6d80eb3ebf22b9b84e53e6b21e0) --- sys/netinet/tcp_hostcache.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index b3dbf0583cc9..47846040d9db 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -622,7 +622,6 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) const int linesize = 128; struct sbuf sb; int i, error, len; - bool do_drain = false; struct hc_metrics *hc_entry; char ip4buf[INET_ADDRSTRLEN]; #ifdef INET6 @@ -680,16 +679,9 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) hc_entry->rmx_hits, hc_entry->rmx_updates, hc_entry->rmx_expire); - do_drain = true; } THC_UNLOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); - /* Need to track if sbuf has data, to avoid - * a KASSERT when calling sbuf_drain. - */ - if (do_drain) { - sbuf_drain(&sb); - do_drain = false; - } + sbuf_drain(&sb); } #undef msec error = sbuf_finish(&sb); From owner-dev-commits-src-branches@freebsd.org Sat Apr 17 05:55:44 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 078385EFE32; Sat, 17 Apr 2021 05:55:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FMj3z6LJPz3qDP; Sat, 17 Apr 2021 05:55:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC96113360; Sat, 17 Apr 2021 05:55:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13H5thc9095640; Sat, 17 Apr 2021 05:55:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13H5thrn095639; Sat, 17 Apr 2021 05:55:43 GMT (envelope-from git) Date: Sat, 17 Apr 2021 05:55:43 GMT Message-Id: <202104170555.13H5thrn095639@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 53c0fd84096c - stable/13 - ossl(4): Install the man page also for arm64 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 53c0fd84096c770383e41964c066f1c4fe851064 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2021 05:55:44 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=53c0fd84096c770383e41964c066f1c4fe851064 commit 53c0fd84096c770383e41964c066f1c4fe851064 Author: Gordon Bergling AuthorDate: 2021-04-14 16:32:56 +0000 Commit: Gordon Bergling CommitDate: 2021-04-17 05:55:29 +0000 ossl(4): Install the man page also for arm64 In 22bd0c9731d7 ossl(4) was ported to arm64. The manual page was adapted, but never installed since the ossl(4) manual page was i386 / amd64 only. Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D29762 (cherry picked from commit b1ab802ce4908b6af93e3a3b4328377003735357) --- share/man/man4/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index f3896d6516be..1e5df4bb2eec 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -838,7 +838,6 @@ _ntb_transport.4=ntb_transport.4 _nvd.4= nvd.4 _nvme.4= nvme.4 _nvram.4= nvram.4 -_ossl.4= ossl.4 _padlock.4= padlock.4 _pchtherm.4= pchtherm.4 _qat.4= qat.4 @@ -892,6 +891,11 @@ _nvd.4= nvd.4 _nvme.4= nvme.4 .endif +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \ + ${MACHINE_CPUARCH} == "aarch64" +_ossl.4= ossl.4 +.endif + .if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "aarch64" || \ ${MACHINE_CPUARCH} == "riscv" _cgem.4= cgem.4 From owner-dev-commits-src-branches@freebsd.org Sat Apr 17 18:58:27 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 289155DF25B; Sat, 17 Apr 2021 18:58:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FN2R70PQlz3DjD; Sat, 17 Apr 2021 18:58:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F00431D5D6; Sat, 17 Apr 2021 18:58:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13HIwQ63028194; Sat, 17 Apr 2021 18:58:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13HIwQAQ028193; Sat, 17 Apr 2021 18:58:26 GMT (envelope-from git) Date: Sat, 17 Apr 2021 18:58:26 GMT Message-Id: <202104171858.13HIwQAQ028193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: c21e3f07fe9e - stable/12 - systat.1: Fix synopsis MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c21e3f07fe9e703aa3c6462a666f2c2c4c8c3f87 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2021 18:58:27 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c21e3f07fe9e703aa3c6462a666f2c2c4c8c3f87 commit c21e3f07fe9e703aa3c6462a666f2c2c4c8c3f87 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-02-10 17:02:14 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-04-17 18:58:21 +0000 systat.1: Fix synopsis systat does not have a "-display" flag. Use Ar to indicate that "display" is meant to be substituted with an actual display command. (cherry picked from commit e6f59be239aa17f80b44ded4779e29f5d5352b28) --- usr.bin/systat/systat.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/systat/systat.1 b/usr.bin/systat/systat.1 index 802c7cd7614a..484b272b557d 100644 --- a/usr.bin/systat/systat.1 +++ b/usr.bin/systat/systat.1 @@ -36,7 +36,7 @@ .Nd display system statistics .Sh SYNOPSIS .Nm -.Op Fl display +.Op Fl Ar display .Op Ar display-commands .Op Ar refresh-interval .Sh DESCRIPTION From owner-dev-commits-src-branches@freebsd.org Sat Apr 17 18:59:11 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 CCA7D5DFA72; Sat, 17 Apr 2021 18:59:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FN2Rz5X29z3Dp9; Sat, 17 Apr 2021 18:59:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B0BBA1D790; Sat, 17 Apr 2021 18:59:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13HIxBsg028348; Sat, 17 Apr 2021 18:59:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13HIxB4Q028347; Sat, 17 Apr 2021 18:59:11 GMT (envelope-from git) Date: Sat, 17 Apr 2021 18:59:11 GMT Message-Id: <202104171859.13HIxB4Q028347@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: e4b86779fbcd - stable/11 - systat.1: Fix synopsis MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: e4b86779fbcdca796cf34a4ee042ac6798c52725 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2021 18:59:11 -0000 The branch stable/11 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e4b86779fbcdca796cf34a4ee042ac6798c52725 commit e4b86779fbcdca796cf34a4ee042ac6798c52725 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-02-10 17:02:14 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-04-17 18:59:04 +0000 systat.1: Fix synopsis systat does not have a "-display" flag. Use Ar to indicate that "display" is meant to be substituted with an actual display command. (cherry picked from commit e6f59be239aa17f80b44ded4779e29f5d5352b28) --- usr.bin/systat/systat.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/systat/systat.1 b/usr.bin/systat/systat.1 index 9e2dd9bf7428..1526263c0f34 100644 --- a/usr.bin/systat/systat.1 +++ b/usr.bin/systat/systat.1 @@ -36,7 +36,7 @@ .Nd display system statistics .Sh SYNOPSIS .Nm -.Op Fl display +.Op Fl Ar display .Op Ar display-commands .Op Ar refresh-interval .Sh DESCRIPTION From owner-dev-commits-src-branches@freebsd.org Sat Apr 17 19:00:36 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 B2E055DFAF0; Sat, 17 Apr 2021 19:00:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FN2Tc4mVbz3Dlx; Sat, 17 Apr 2021 19:00:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 96CBF1D720; Sat, 17 Apr 2021 19:00:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13HJ0aHN037545; Sat, 17 Apr 2021 19:00:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13HJ0aG4037544; Sat, 17 Apr 2021 19:00:36 GMT (envelope-from git) Date: Sat, 17 Apr 2021 19:00:36 GMT Message-Id: <202104171900.13HJ0aG4037544@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 56b873b2184e - stable/13 - systat.1: Fix synopsis MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 56b873b2184eb1c445a4dc926ee57fa2a9387169 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2021 19:00:36 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=56b873b2184eb1c445a4dc926ee57fa2a9387169 commit 56b873b2184eb1c445a4dc926ee57fa2a9387169 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-02-10 17:02:14 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-04-17 19:00:24 +0000 systat.1: Fix synopsis systat does not have a "-display" flag. Use Ar to indicate that "display" is meant to be substituted with an actual display command. (cherry picked from commit e6f59be239aa17f80b44ded4779e29f5d5352b28) --- usr.bin/systat/systat.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/systat/systat.1 b/usr.bin/systat/systat.1 index d2eeb2854816..218c51cc3f27 100644 --- a/usr.bin/systat/systat.1 +++ b/usr.bin/systat/systat.1 @@ -36,7 +36,7 @@ .Nd display system statistics .Sh SYNOPSIS .Nm -.Op Fl display +.Op Fl Ar display .Op Ar display-commands .Op Ar refresh-interval .Sh DESCRIPTION From owner-dev-commits-src-branches@freebsd.org Sat Apr 17 19:01:45 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 CAF245DFF81; Sat, 17 Apr 2021 19:01:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FN2Vx5M7nz3FBB; Sat, 17 Apr 2021 19:01:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB4851D903; Sat, 17 Apr 2021 19:01:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13HJ1jwm040949; Sat, 17 Apr 2021 19:01:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13HJ1jFs040948; Sat, 17 Apr 2021 19:01:45 GMT (envelope-from git) Date: Sat, 17 Apr 2021 19:01:45 GMT Message-Id: <202104171901.13HJ1jFs040948@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 51a07d6c94eb - stable/13 - systat.1: Remove Tn macros MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 51a07d6c94eb0e8b1b64b653bc6c37bf7ce64644 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2021 19:01:45 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=51a07d6c94eb0e8b1b64b653bc6c37bf7ce64644 commit 51a07d6c94eb0e8b1b64b653bc6c37bf7ce64644 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-02-06 13:14:20 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-04-17 19:01:34 +0000 systat.1: Remove Tn macros They are no longer supported by mdoc(7). MFC after: 1 week (cherry picked from commit fcbaf46b763a91bb41fe68afdcf59a7d210bc2f7) --- usr.bin/systat/systat.1 | 55 +++++++++++++------------------------------------ 1 file changed, 14 insertions(+), 41 deletions(-) diff --git a/usr.bin/systat/systat.1 b/usr.bin/systat/systat.1 index 218c51cc3f27..5ad8078a85a4 100644 --- a/usr.bin/systat/systat.1 +++ b/usr.bin/systat/systat.1 @@ -28,7 +28,7 @@ .\" @(#)systat.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd December 5, 2016 +.Dd February 10, 2021 .Dt SYSTAT 1 .Os .Sh NAME @@ -62,14 +62,11 @@ By default .Nm displays the processes getting the largest percentage of the processor in the lower window. -Other displays show swap space usage, disk -.Tn I/O -statistics (a la +Other displays show swap space usage, disk I/O statistics (a la .Xr iostat 8 ) , virtual memory statistics (a la .Xr vmstat 8 ) , -.Tn TCP/IP -statistics, +TCP/IP statistics, and network connections (a la .Xr netstat 1 ) . .Pp @@ -189,7 +186,7 @@ is accounted to the ``idle'' process. .It Ic icmp Display, in the lower window, statistics about messages received and transmitted by the Internet Control Message Protocol -.Pq Dq Tn ICMP . +.Pq Dq ICMP . The left half of the screen displays information about received packets, and the right half displays information regarding transmitted packets. @@ -232,32 +229,21 @@ but displays statistics for IPv6 ICMP. .It Ic ip Otherwise identical to the .Ic icmp -display, except that it displays -.Tn IP -and -.Tn UDP -statistics. +display, except that it displays IP and UDP statistics. .It Ic ip6 Like the .Ic ip display, -except that it displays -.Tn IPv6 -statistics. -It does not display -.Tn UDP statistics. +except that it displays IPv6 statistics. +It does not display UDP statistics. .It Ic sctp Like .Ic icmp , -but with -.Tn SCTP -statistics. +but with SCTP statistics. .It Ic tcp Like .Ic icmp , -but with -.Tn TCP -statistics. +but with TCP statistics. .It Ic iostat Display, in the lower window, statistics about processor use and disk throughput. @@ -281,15 +267,11 @@ display; the minimum unambiguous prefix may be supplied. .Pp .Bl -tag -width Fl -compact .It Cm numbers -Show the disk -.Tn I/O -statistics in numeric form. +Show the disk I/O statistics in numeric form. Values are displayed in numeric columns which scroll downward. .It Cm bars -Show the disk -.Tn I/O -statistics in bar graph form (default). +Show the disk I/O statistics in bar graph form (default). .It Cm kbpt Toggle the display of kilobytes per transaction. (the default is to @@ -310,9 +292,7 @@ Areas known to the kernel, but not in use are shown as not available. .It Ic vmstat Take over the entire display and show a (rather crowded) compendium of statistics related to virtual memory usage, process scheduling, -device interrupts, system name translation caching, disk -.Tn I/O -etc. +device interrupts, system name translation caching, disk I/O etc. .Pp The upper left quadrant of the screen shows the number of users logged in and the load average over the last one, five, @@ -666,18 +646,11 @@ and displays appeared in .Fx 3.0 ; the notion of having different display modes for the -.Tn ICMP , -.Tn IP , -.Tn TCP , -and -.Tn UDP -statistics was stolen from the +ICMP, IP, TCP, and UDP statistics was stolen from the .Fl C option to .Xr netstat 1 -in Silicon Graphics' -.Tn IRIX -system. +in Silicon Graphics' IRIX system. .Sh BUGS Certain displays presume a minimum of 80 characters per line. Ifstat does not detect new interfaces. From owner-dev-commits-src-branches@freebsd.org Sat Apr 17 19:02:25 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 D2DDC5E0145; Sat, 17 Apr 2021 19:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FN2Wj5hx2z3FSn; Sat, 17 Apr 2021 19:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AC7ED1D992; Sat, 17 Apr 2021 19:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13HJ2P0D041804; Sat, 17 Apr 2021 19:02:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13HJ2PrX041803; Sat, 17 Apr 2021 19:02:25 GMT (envelope-from git) Date: Sat, 17 Apr 2021 19:02:25 GMT Message-Id: <202104171902.13HJ2PrX041803@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 6acb6702ea04 - stable/12 - systat.1: Remove Tn macros MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 6acb6702ea04701bdade38d0238ef46cf2feb8c5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2021 19:02:25 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=6acb6702ea04701bdade38d0238ef46cf2feb8c5 commit 6acb6702ea04701bdade38d0238ef46cf2feb8c5 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-02-06 13:14:20 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-04-17 19:02:23 +0000 systat.1: Remove Tn macros They are no longer supported by mdoc(7). MFC after: 1 week (cherry picked from commit fcbaf46b763a91bb41fe68afdcf59a7d210bc2f7) --- usr.bin/systat/systat.1 | 55 +++++++++++++------------------------------------ 1 file changed, 14 insertions(+), 41 deletions(-) diff --git a/usr.bin/systat/systat.1 b/usr.bin/systat/systat.1 index 484b272b557d..5ed7fbd2cf69 100644 --- a/usr.bin/systat/systat.1 +++ b/usr.bin/systat/systat.1 @@ -28,7 +28,7 @@ .\" @(#)systat.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd December 5, 2016 +.Dd February 10, 2021 .Dt SYSTAT 1 .Os .Sh NAME @@ -62,14 +62,11 @@ By default .Nm displays the processes getting the largest percentage of the processor in the lower window. -Other displays show swap space usage, disk -.Tn I/O -statistics (a la +Other displays show swap space usage, disk I/O statistics (a la .Xr iostat 8 ) , virtual memory statistics (a la .Xr vmstat 8 ) , -.Tn TCP/IP -statistics, +TCP/IP statistics, and network connections (a la .Xr netstat 1 ) . .Pp @@ -189,7 +186,7 @@ is accounted to the ``idle'' process. .It Ic icmp Display, in the lower window, statistics about messages received and transmitted by the Internet Control Message Protocol -.Pq Dq Tn ICMP . +.Pq Dq ICMP . The left half of the screen displays information about received packets, and the right half displays information regarding transmitted packets. @@ -232,32 +229,21 @@ but displays statistics for IPv6 ICMP. .It Ic ip Otherwise identical to the .Ic icmp -display, except that it displays -.Tn IP -and -.Tn UDP -statistics. +display, except that it displays IP and UDP statistics. .It Ic ip6 Like the .Ic ip display, -except that it displays -.Tn IPv6 -statistics. -It does not display -.Tn UDP statistics. +except that it displays IPv6 statistics. +It does not display UDP statistics. .It Ic sctp Like .Ic icmp , -but with -.Tn SCTP -statistics. +but with SCTP statistics. .It Ic tcp Like .Ic icmp , -but with -.Tn TCP -statistics. +but with TCP statistics. .It Ic iostat Display, in the lower window, statistics about processor use and disk throughput. @@ -281,15 +267,11 @@ display; the minimum unambiguous prefix may be supplied. .Pp .Bl -tag -width Fl -compact .It Cm numbers -Show the disk -.Tn I/O -statistics in numeric form. +Show the disk I/O statistics in numeric form. Values are displayed in numeric columns which scroll downward. .It Cm bars -Show the disk -.Tn I/O -statistics in bar graph form (default). +Show the disk I/O statistics in bar graph form (default). .It Cm kbpt Toggle the display of kilobytes per transaction. (the default is to @@ -310,9 +292,7 @@ Areas known to the kernel, but not in use are shown as not available. .It Ic vmstat Take over the entire display and show a (rather crowded) compendium of statistics related to virtual memory usage, process scheduling, -device interrupts, system name translation caching, disk -.Tn I/O -etc. +device interrupts, system name translation caching, disk I/O etc. .Pp The upper left quadrant of the screen shows the number of users logged in and the load average over the last one, five, @@ -666,18 +646,11 @@ and displays appeared in .Fx 3.0 ; the notion of having different display modes for the -.Tn ICMP , -.Tn IP , -.Tn TCP , -and -.Tn UDP -statistics was stolen from the +ICMP, IP, TCP, and UDP statistics was stolen from the .Fl C option to .Xr netstat 1 -in Silicon Graphics' -.Tn IRIX -system. +in Silicon Graphics' IRIX system. .Sh BUGS Certain displays presume a minimum of 80 characters per line. Ifstat does not detect new interfaces. From owner-dev-commits-src-branches@freebsd.org Sat Apr 17 19:03:14 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 C3B8B5DFEDC; Sat, 17 Apr 2021 19:03:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FN2Xf4bDjz3F9F; Sat, 17 Apr 2021 19:03:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8F5AC1D8ED; Sat, 17 Apr 2021 19:03:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13HJ3ERM041974; Sat, 17 Apr 2021 19:03:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13HJ3EVb041973; Sat, 17 Apr 2021 19:03:14 GMT (envelope-from git) Date: Sat, 17 Apr 2021 19:03:14 GMT Message-Id: <202104171903.13HJ3EVb041973@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: edab15c47e7a - stable/11 - systat.1: Remove Tn macros MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: edab15c47e7a8adedfeebcaf481fca4bf36fd164 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2021 19:03:14 -0000 The branch stable/11 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=edab15c47e7a8adedfeebcaf481fca4bf36fd164 commit edab15c47e7a8adedfeebcaf481fca4bf36fd164 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-02-06 13:14:20 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-04-17 19:03:09 +0000 systat.1: Remove Tn macros They are no longer supported by mdoc(7). MFC after: 1 week (cherry picked from commit fcbaf46b763a91bb41fe68afdcf59a7d210bc2f7) --- usr.bin/systat/systat.1 | 55 +++++++++++++------------------------------------ 1 file changed, 14 insertions(+), 41 deletions(-) diff --git a/usr.bin/systat/systat.1 b/usr.bin/systat/systat.1 index 1526263c0f34..2df3c260f866 100644 --- a/usr.bin/systat/systat.1 +++ b/usr.bin/systat/systat.1 @@ -28,7 +28,7 @@ .\" @(#)systat.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd December 5, 2016 +.Dd February 10, 2021 .Dt SYSTAT 1 .Os .Sh NAME @@ -62,14 +62,11 @@ By default .Nm displays the processes getting the largest percentage of the processor in the lower window. -Other displays show swap space usage, disk -.Tn I/O -statistics (a la +Other displays show swap space usage, disk I/O statistics (a la .Xr iostat 8 ) , virtual memory statistics (a la .Xr vmstat 8 ) , -.Tn TCP/IP -statistics, +TCP/IP statistics, and network connections (a la .Xr netstat 1 ) . .Pp @@ -189,7 +186,7 @@ is accounted to the ``idle'' process. .It Ic icmp Display, in the lower window, statistics about messages received and transmitted by the Internet Control Message Protocol -.Pq Dq Tn ICMP . +.Pq Dq ICMP . The left half of the screen displays information about received packets, and the right half displays information regarding transmitted packets. @@ -232,32 +229,21 @@ but displays statistics for IPv6 ICMP. .It Ic ip Otherwise identical to the .Ic icmp -display, except that it displays -.Tn IP -and -.Tn UDP -statistics. +display, except that it displays IP and UDP statistics. .It Ic ip6 Like the .Ic ip display, -except that it displays -.Tn IPv6 -statistics. -It does not display -.Tn UDP statistics. +except that it displays IPv6 statistics. +It does not display UDP statistics. .It Ic sctp Like .Ic icmp , -but with -.Tn SCTP -statistics. +but with SCTP statistics. .It Ic tcp Like .Ic icmp , -but with -.Tn TCP -statistics. +but with TCP statistics. .It Ic iostat Display, in the lower window, statistics about processor use and disk throughput. @@ -281,15 +267,11 @@ display; the minimum unambiguous prefix may be supplied. .Pp .Bl -tag -width Fl -compact .It Cm numbers -Show the disk -.Tn I/O -statistics in numeric form. +Show the disk I/O statistics in numeric form. Values are displayed in numeric columns which scroll downward. .It Cm bars -Show the disk -.Tn I/O -statistics in bar graph form (default). +Show the disk I/O statistics in bar graph form (default). .It Cm kbpt Toggle the display of kilobytes per transaction. (the default is to @@ -310,9 +292,7 @@ Areas known to the kernel, but not in use are shown as not available. .It Ic vmstat Take over the entire display and show a (rather crowded) compendium of statistics related to virtual memory usage, process scheduling, -device interrupts, system name translation caching, disk -.Tn I/O -etc. +device interrupts, system name translation caching, disk I/O etc. .Pp The upper left quadrant of the screen shows the number of users logged in and the load average over the last one, five, @@ -666,18 +646,11 @@ and displays appeared in .Fx 3.0 ; the notion of having different display modes for the -.Tn ICMP , -.Tn IP , -.Tn TCP , -and -.Tn UDP -statistics was stolen from the +ICMP, IP, TCP, and UDP statistics was stolen from the .Fl C option to .Xr netstat 1 -in Silicon Graphics' -.Tn IRIX -system. +in Silicon Graphics' IRIX system. .Sh BUGS Certain displays presume a minimum of 80 characters per line. Ifstat does not detect new interfaces. From owner-dev-commits-src-branches@freebsd.org Sun Apr 18 01:47:14 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 11AED5EAFE1; Sun, 18 Apr 2021 01:47:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FNCVp017Hz3qP5; Sun, 18 Apr 2021 01:47:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E76CD229DE; Sun, 18 Apr 2021 01:47:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13I1lD3Z069976; Sun, 18 Apr 2021 01:47:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13I1lDuN069975; Sun, 18 Apr 2021 01:47:13 GMT (envelope-from git) Date: Sun, 18 Apr 2021 01:47:13 GMT Message-Id: <202104180147.13I1lDuN069975@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: daf3f4596a55 - stable/13 - nfsd: fix BindConnectionToSession so that it clears "cb path down" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: daf3f4596a553a3379c2feb0422924407f6f39df Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2021 01:47:14 -0000 The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=daf3f4596a553a3379c2feb0422924407f6f39df commit daf3f4596a553a3379c2feb0422924407f6f39df Author: Rick Macklem AuthorDate: 2021-04-04 22:05:39 +0000 Commit: Rick Macklem CommitDate: 2021-04-18 01:44:11 +0000 nfsd: fix BindConnectionToSession so that it clears "cb path down" Commit 01ae8969a9ee stopped the NFSv4.1/4.2 server from implicitly binding the back channel to a new TCP connection so that it conforms to RFC5661, for NFSv4.1/4.2. An effect of this for the Linux NFS client is that it will do a BindConnectionToSession when it sees NFSV4SEQ_CBPATHDOWN set in a sequence reply. It will do this for every RPC reply until it no longer sees the flag. Without that patch, this will happen until the client does an Open, which will clear LCL_CBDOWN. This patch clears LCL_CBDOWN right away, so that NFSV4SEQ_CBPATHDOWN will no longer be sent to the client in Sequence replies and the Linux client will not repeat the BindConnectionToSession RPCs. This is not critical for correct behaviour, but reduces RPC overheads for cases where the Open will not be done for a while. (cherry picked from commit 6f2addd838810ce33c7e9ad9543827d45e0b491c) --- sys/fs/nfsserver/nfs_nfsdstate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index 5ac37ed07cae..1cf0dcee99e9 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -6440,6 +6440,7 @@ nfsrv_bindconnsess(struct nfsrv_descript *nd, uint8_t *sessionid, int *foreaftp) sep->sess_crflags |= NFSV4CRSESS_CONNBACKCHAN; clp->lc_flags |= LCL_DONEBINDCONN | LCL_NEEDSCBNULL; + clp->lc_flags &= ~LCL_CBDOWN; if (*foreaftp == NFSCDFS4_BACK) *foreaftp = NFSCDFS4_BACK; else From owner-dev-commits-src-branches@freebsd.org Sun Apr 18 01:52:46 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 C38AF5EB52E; Sun, 18 Apr 2021 01:52:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FNCdB5D3Fz3qSy; Sun, 18 Apr 2021 01:52:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A69C5230AD; Sun, 18 Apr 2021 01:52:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13I1qkbB082518; Sun, 18 Apr 2021 01:52:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13I1qkjf082517; Sun, 18 Apr 2021 01:52:46 GMT (envelope-from git) Date: Sun, 18 Apr 2021 01:52:46 GMT Message-Id: <202104180152.13I1qkjf082517@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 926bb27c3014 - stable/12 - nfsd: fix BindConnectionToSession so that it clears "cb path down" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 926bb27c3014e2cc09aa09199a0b1f69c57e9263 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2021 01:52:46 -0000 The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=926bb27c3014e2cc09aa09199a0b1f69c57e9263 commit 926bb27c3014e2cc09aa09199a0b1f69c57e9263 Author: Rick Macklem AuthorDate: 2021-04-04 22:05:39 +0000 Commit: Rick Macklem CommitDate: 2021-04-18 01:49:47 +0000 nfsd: fix BindConnectionToSession so that it clears "cb path down" Commit 01ae8969a9ee stopped the NFSv4.1/4.2 server from implicitly binding the back channel to a new TCP connection so that it conforms to RFC5661, for NFSv4.1/4.2. An effect of this for the Linux NFS client is that it will do a BindConnectionToSession when it sees NFSV4SEQ_CBPATHDOWN set in a sequence reply. It will do this for every RPC reply until it no longer sees the flag. Without that patch, this will happen until the client does an Open, which will clear LCL_CBDOWN. This patch clears LCL_CBDOWN right away, so that NFSV4SEQ_CBPATHDOWN will no longer be sent to the client in Sequence replies and the Linux client will not repeat the BindConnectionToSession RPCs. This is not critical for correct behaviour, but reduces RPC overheads for cases where the Open will not be done for a while. (cherry picked from commit 6f2addd838810ce33c7e9ad9543827d45e0b491c) --- sys/fs/nfsserver/nfs_nfsdstate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index d9fd1bbb588d..09b637c14e52 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -6416,6 +6416,7 @@ nfsrv_bindconnsess(struct nfsrv_descript *nd, uint8_t *sessionid, int *foreaftp) sep->sess_crflags |= NFSV4CRSESS_CONNBACKCHAN; clp->lc_flags |= LCL_DONEBINDCONN | LCL_NEEDSCBNULL; + clp->lc_flags &= ~LCL_CBDOWN; if (*foreaftp == NFSCDFS4_BACK) *foreaftp = NFSCDFS4_BACK; else From owner-dev-commits-src-branches@freebsd.org Sun Apr 18 14:55:04 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 F1A505EB71F; Sun, 18 Apr 2021 14:55:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FNXzr6WJBz3kmG; Sun, 18 Apr 2021 14:55:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D304F5A79; Sun, 18 Apr 2021 14:55:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13IEt4W1033736; Sun, 18 Apr 2021 14:55:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13IEt4TI033735; Sun, 18 Apr 2021 14:55:04 GMT (envelope-from git) Date: Sun, 18 Apr 2021 14:55:04 GMT Message-Id: <202104181455.13IEt4TI033735@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: be1fb99a727b - stable/12 - When we are about to send down to the driver layer we need to make sure that the m_nextpkt field is NULL else the lower layers may do unwanted things. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: be1fb99a727b784781f7d8d95bb6f14707e2d886 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2021 14:55:05 -0000 The branch stable/12 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=be1fb99a727b784781f7d8d95bb6f14707e2d886 commit be1fb99a727b784781f7d8d95bb6f14707e2d886 Author: Randall Stewart AuthorDate: 2021-01-27 18:32:52 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-04-18 14:54:14 +0000 When we are about to send down to the driver layer we need to make sure that the m_nextpkt field is NULL else the lower layers may do unwanted things. Reviewed By: gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D28377 PR: 253587 (cherry picked from commit 24a8f6d369962f189ad808f538029179b1e7dc2f) --- sys/netinet6/nd6.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index d1d4b7c7fa88..0a654fbd06e6 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -2446,6 +2446,7 @@ nd6_flush_holdchain(struct ifnet *ifp, struct mbuf *chain, while (m_head) { m = m_head; m_head = m_head->m_nextpkt; + m->m_nextpkt = NULL; error = nd6_output_ifp(ifp, ifp, m, dst, NULL); } From owner-dev-commits-src-branches@freebsd.org Sun Apr 18 14:59:43 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 7B7405EC08A; Sun, 18 Apr 2021 14:59:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FNY5C34qhz3kc7; Sun, 18 Apr 2021 14:59:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C8E55A7C; Sun, 18 Apr 2021 14:59:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13IExhUc034142; Sun, 18 Apr 2021 14:59:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13IExhDf034141; Sun, 18 Apr 2021 14:59:43 GMT (envelope-from git) Date: Sun, 18 Apr 2021 14:59:43 GMT Message-Id: <202104181459.13IExhDf034141@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: f974af4e59ee - stable/11 - When we are about to send down to the driver layer we need to make sure that the m_nextpkt field is NULL else the lower layers may do unwanted things. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: f974af4e59ee533906437b22a5b8b41219bde005 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2021 14:59:43 -0000 The branch stable/11 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=f974af4e59ee533906437b22a5b8b41219bde005 commit f974af4e59ee533906437b22a5b8b41219bde005 Author: Randall Stewart AuthorDate: 2021-01-27 18:32:52 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-04-18 14:57:22 +0000 When we are about to send down to the driver layer we need to make sure that the m_nextpkt field is NULL else the lower layers may do unwanted things. Reviewed By: gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D28377 PR: 253587 (cherry picked from commit 24a8f6d369962f189ad808f538029179b1e7dc2f) --- sys/netinet6/nd6.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index aba2d57cab9d..ab6bdc3ff2de 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -2518,6 +2518,7 @@ nd6_flush_holdchain(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *chain while (m_head) { m = m_head; m_head = m_head->m_nextpkt; + m->m_nextpkt = NULL; error = nd6_output_ifp(ifp, origifp, m, dst, NULL); } From owner-dev-commits-src-branches@freebsd.org Sun Apr 18 17:05:35 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 EBE6E5EEF19; Sun, 18 Apr 2021 17:05:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FNbtR6Pmpz3rH8; Sun, 18 Apr 2021 17:05:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF2067A46; Sun, 18 Apr 2021 17:05:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13IH5Z7k008115; Sun, 18 Apr 2021 17:05:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13IH5Zl3008114; Sun, 18 Apr 2021 17:05:35 GMT (envelope-from git) Date: Sun, 18 Apr 2021 17:05:35 GMT Message-Id: <202104181705.13IH5Zl3008114@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick Subject: git: 44f01dbeda67 - stable/13 - Ensure that the mount command shows "with quotas" when quotas are enabled. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 44f01dbeda6705602416cbd963a992360c1f1524 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2021 17:05:36 -0000 The branch stable/13 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=44f01dbeda6705602416cbd963a992360c1f1524 commit 44f01dbeda6705602416cbd963a992360c1f1524 Author: Kirk McKusick AuthorDate: 2021-04-14 22:22:12 +0000 Commit: Kirk McKusick CommitDate: 2021-04-18 17:08:49 +0000 Ensure that the mount command shows "with quotas" when quotas are enabled. (cherry picked from commit 14d0cd7225e250015eb6d9c79a7eb4e944211b23) --- sys/ufs/ufs/ufs_quota.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index 47c8133adc11..4dff74f75945 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -562,6 +562,7 @@ quotaon(struct thread *td, struct mount *mp, int type, void *fname) VOP_UNLOCK(vp); MNT_ILOCK(mp); mp->mnt_flag |= MNT_QUOTA; + mp->mnt_stat.f_flags |= MNT_QUOTA; MNT_IUNLOCK(mp); vpp = &ump->um_quotas[type]; @@ -764,6 +765,7 @@ quotaoff_inchange(struct thread *td, struct mount *mp, int type) if (i == MAXQUOTAS) { MNT_ILOCK(mp); mp->mnt_flag &= ~MNT_QUOTA; + mp->mnt_stat.f_flags &= ~MNT_QUOTA; MNT_IUNLOCK(mp); } UFS_UNLOCK(ump); From owner-dev-commits-src-branches@freebsd.org Sun Apr 18 17:08:55 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 991585EEF34; Sun, 18 Apr 2021 17:08:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FNbyH407dz3rCd; Sun, 18 Apr 2021 17:08:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7C4717835; Sun, 18 Apr 2021 17:08:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13IH8t24008547; Sun, 18 Apr 2021 17:08:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13IH8tId008546; Sun, 18 Apr 2021 17:08:55 GMT (envelope-from git) Date: Sun, 18 Apr 2021 17:08:55 GMT Message-Id: <202104181708.13IH8tId008546@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick Subject: git: b2b7ad916cb7 - stable/12 - Ensure that the mount command shows "with quotas" when quotas are enabled. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: b2b7ad916cb78dd01dd9ebf8ce569182159bf5f7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2021 17:08:55 -0000 The branch stable/12 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=b2b7ad916cb78dd01dd9ebf8ce569182159bf5f7 commit b2b7ad916cb78dd01dd9ebf8ce569182159bf5f7 Author: Kirk McKusick AuthorDate: 2021-04-14 22:22:12 +0000 Commit: Kirk McKusick CommitDate: 2021-04-18 17:12:24 +0000 Ensure that the mount command shows "with quotas" when quotas are enabled. (cherry picked from commit 14d0cd7225e250015eb6d9c79a7eb4e944211b23) --- sys/ufs/ufs/ufs_quota.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index 0e24d45eb9f6..60a8a19ae79a 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -562,6 +562,7 @@ quotaon(struct thread *td, struct mount *mp, int type, void *fname) VOP_UNLOCK(vp, 0); MNT_ILOCK(mp); mp->mnt_flag |= MNT_QUOTA; + mp->mnt_stat.f_flags |= MNT_QUOTA; MNT_IUNLOCK(mp); vpp = &ump->um_quotas[type]; @@ -764,6 +765,7 @@ quotaoff_inchange(struct thread *td, struct mount *mp, int type) if (i == MAXQUOTAS) { MNT_ILOCK(mp); mp->mnt_flag &= ~MNT_QUOTA; + mp->mnt_stat.f_flags &= ~MNT_QUOTA; MNT_IUNLOCK(mp); } UFS_UNLOCK(ump);